From 375a654b1dec1c9708976170080a122343dd6239 Mon Sep 17 00:00:00 2001 From: Rob Bos Date: Fri, 17 Apr 2026 22:40:01 +0200 Subject: [PATCH] fix: skip VS filesystem scan on macOS/Linux to prevent extension hang The _discoverFromFilesystem() method in VisualStudioDataAccess recursively scanned the user's home directory (depth 7) looking for .vs/ directories. On macOS and Linux, Visual Studio does not exist and .vs/ directories are never created, so this scan was traversing thousands of directories synchronously -- causing the extension to hang on startup. Fixes: #611 (related: #493) Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- vscode-extension/src/visualstudio.ts | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/vscode-extension/src/visualstudio.ts b/vscode-extension/src/visualstudio.ts index 5ad11586..0a5cc061 100644 --- a/vscode-extension/src/visualstudio.ts +++ b/vscode-extension/src/visualstudio.ts @@ -117,8 +117,12 @@ results.push(sessionPath); * for `.vs//copilot-chat//sessions/` paths. * Scans: user home dir, and common named dev roots (C:\repos, C:\code, etc.). * Depth-limited and skips known heavy directories to stay fast. + * + * Visual Studio only runs on Windows — skip entirely on macOS/Linux to avoid + * a deep recursive home-directory walk that causes the extension to hang. */ private _discoverFromFilesystem(seen: Set, results: string[]): void { +if (os.platform() !== 'win32') { return; } const home = os.homedir(); // Drive letter(s): default to C, also try D if it exists const drives = ['C', 'D'];