From 116388427e4958d08a0b2e612269d9eba78b5615 Mon Sep 17 00:00:00 2001 From: David Date: Thu, 30 Apr 2026 16:27:22 +0200 Subject: [PATCH] fix(copilot): discover VS Code Insiders transcripts --- src/providers/copilot.ts | 27 +++++++++++++++++++-------- 1 file changed, 19 insertions(+), 8 deletions(-) diff --git a/src/providers/copilot.ts b/src/providers/copilot.ts index 9e5f771..6cf486f 100644 --- a/src/providers/copilot.ts +++ b/src/providers/copilot.ts @@ -300,14 +300,25 @@ function getCopilotSessionStateDir(override?: string): string { return override ?? join(homedir(), '.copilot', 'session-state') } -function getVSCodeWorkspaceStorageDir(): string { +function getVSCodeWorkspaceStorageDirs(): string[] { if (process.platform === 'darwin') { - return join(homedir(), 'Library', 'Application Support', 'Code', 'User', 'workspaceStorage') + return [ + join(homedir(), 'Library', 'Application Support', 'Code', 'User', 'workspaceStorage'), + join(homedir(), 'Library', 'Application Support', 'Code - Insiders', 'User', 'workspaceStorage'), + ] } + if (process.platform === 'win32') { - return join(homedir(), 'AppData', 'Roaming', 'Code', 'User', 'workspaceStorage') + return [ + join(homedir(), 'AppData', 'Roaming', 'Code', 'User', 'workspaceStorage'), + join(homedir(), 'AppData', 'Roaming', 'Code - Insiders', 'User', 'workspaceStorage'), + ] } - return join(homedir(), '.config', 'Code', 'User', 'workspaceStorage') + + return [ + join(homedir(), '.config', 'Code', 'User', 'workspaceStorage'), + join(homedir(), '.config', 'Code - Insiders', 'User', 'workspaceStorage'), + ] } function parseCwd(yaml: string): string | null { @@ -397,7 +408,7 @@ async function discoverVSCodeTranscripts(workspaceStorageDir: string): Promise { - const [legacy, vscode] = await Promise.all([ + const [legacy, ...vscodeResults] = await Promise.all([ discoverLegacySessions(legacyDir), - discoverVSCodeTranscripts(vscodeDir), + ...vscodeDirs.map(discoverVSCodeTranscripts), ]) - return [...legacy, ...vscode] + return [...legacy, ...vscodeResults.flat()] }, createSessionParser(source: SessionSource, seenKeys: Set): SessionParser {