mirror of
https://github.com/google-gemini/gemini-cli.git
synced 2026-04-21 10:34:35 -07:00
fix(telemetry): Prevent duplicate StartSessionEvent logging (#12090)
This commit is contained in:
@@ -25,8 +25,6 @@ import {
|
||||
} from '../core/contentGenerator.js';
|
||||
import { GeminiClient } from '../core/client.js';
|
||||
import { GitService } from '../services/gitService.js';
|
||||
import { ClearcutLogger } from '../telemetry/clearcut-logger/clearcut-logger.js';
|
||||
|
||||
import { ShellTool } from '../tools/shell.js';
|
||||
import { ReadFileTool } from '../tools/read-file.js';
|
||||
import { GrepTool } from '../tools/grep.js';
|
||||
@@ -180,10 +178,6 @@ describe('Server Config (config.ts)', () => {
|
||||
beforeEach(() => {
|
||||
// Reset mocks if necessary
|
||||
vi.clearAllMocks();
|
||||
vi.spyOn(
|
||||
ClearcutLogger.prototype,
|
||||
'logStartSessionEvent',
|
||||
).mockImplementation(() => undefined);
|
||||
});
|
||||
|
||||
describe('initialize', () => {
|
||||
@@ -432,18 +426,6 @@ describe('Server Config (config.ts)', () => {
|
||||
expect(config.getUsageStatisticsEnabled()).toBe(enabled);
|
||||
},
|
||||
);
|
||||
|
||||
it('logs the session start event', async () => {
|
||||
const config = new Config({
|
||||
...baseParams,
|
||||
usageStatisticsEnabled: true,
|
||||
});
|
||||
await config.refreshAuth(AuthType.USE_GEMINI);
|
||||
|
||||
expect(
|
||||
ClearcutLogger.prototype.logStartSessionEvent,
|
||||
).toHaveBeenCalledOnce();
|
||||
});
|
||||
});
|
||||
|
||||
describe('Telemetry Settings', () => {
|
||||
|
||||
Reference in New Issue
Block a user