You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
fix: discover Windows-side VS Code sessions when running inside WSL
When VS Code runs via Remote-WSL the extension host is a Linux process,
so os.homedir() returns /home/<user> and the existing Linux/remote paths
are checked. Sessions created in a native Windows VS Code window live
under %APPDATA%\Code\User\... and were never probed.
Changes:
- Add isWSL() helper that detects WSL via WSL_DISTRO_NAME / WSL_INTEROP
- Add async getWSLWindowsPaths() that enumerates /mnt/c/Users/ (read-only,
fully non-blocking, errors silently ignored) and returns candidate
Windows AppData paths for all VS Code variants
- In getCopilotSessionFiles(), when isWSL() include the Windows-side
paths alongside the regular scan so both locations are checked
- In getDiagnosticCandidatePaths(), synchronously add Windows-side paths
so they appear in the Diagnostics panel with their exists status
- In the diagnostics report, add a WSL-specific note when no session
files are found and vscode.env.remoteName === 'wsl'
Closes#647
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
0 commit comments