telemetry: track interactive session state (#12856)

Co-authored-by: owenofbrien <86964623+owenofbrien@users.noreply.github.com>
This commit is contained in:
N. Taylor Mullen
2025-11-11 02:03:32 -08:00
committed by GitHub
parent e79f62694a
commit 7bb13d1c41
24 changed files with 132 additions and 25 deletions
+1
View File
@@ -110,6 +110,7 @@ describe('EditTool', () => {
getGeminiMdFileCount: () => 0,
setGeminiMdFileCount: vi.fn(),
getToolRegistry: () => ({}) as any, // Minimal mock for ToolRegistry
isInteractive: () => false,
} as unknown as Config;
// Reset mocks before each test
@@ -45,6 +45,7 @@ describe('ReadFileTool', () => {
storage: {
getProjectTempDir: () => path.join(tempRootDir, '.temp'),
},
isInteractive: () => false,
} as unknown as Config;
tool = new ReadFileTool(mockConfigInstance);
});
@@ -88,6 +88,7 @@ describe('ReadManyFilesTool', () => {
buildExcludePatterns: () => DEFAULT_FILE_EXCLUDES,
getReadManyFilesExcludes: () => DEFAULT_FILE_EXCLUDES,
}),
isInteractive: () => false,
} as Partial<Config> as Config;
tool = new ReadManyFilesTool(mockConfig);
@@ -502,6 +503,7 @@ describe('ReadManyFilesTool', () => {
buildExcludePatterns: () => [],
getReadManyFilesExcludes: () => [],
}),
isInteractive: () => false,
} as Partial<Config> as Config;
tool = new ReadManyFilesTool(mockConfig);
@@ -117,6 +117,7 @@ describe('SmartEditTool', () => {
getGeminiMdFileCount: () => 0,
setGeminiMdFileCount: vi.fn(),
getToolRegistry: () => ({}) as any,
isInteractive: () => false,
} as unknown as Config;
(mockConfig.getApprovalMode as Mock).mockClear();
@@ -142,6 +142,7 @@ describe('WebFetchTool', () => {
setApprovalMode: vi.fn(),
getProxy: vi.fn(),
getGeminiClient: mockGetGeminiClient,
isInteractive: () => false,
} as unknown as Config;
});
@@ -96,6 +96,7 @@ const mockConfigInternal = {
registerTool: vi.fn(),
discoverTools: vi.fn(),
}) as unknown as ToolRegistry,
isInteractive: () => false,
};
const mockConfig = mockConfigInternal as unknown as Config;