Skip to content

fix: handle case-sensitive extension ID and nested chatSessions path#653

Merged
rajbos merged 1 commit intomainfrom
fix/copilot-chat-storage-path
Apr 23, 2026
Merged

fix: handle case-sensitive extension ID and nested chatSessions path#653
rajbos merged 1 commit intomainfrom
fix/copilot-chat-storage-path

Conversation

@rajbos
Copy link
Copy Markdown
Owner

@rajbos rajbos commented Apr 23, 2026

Problem

Two related bugs cause 0 session files to be found for users running VS Code natively inside WSL (reported in #647):

Bug 1 — Case-sensitive extension ID in globalStorage

VS Code creates the extension storage folder using the extension's publisher+name ID as-is. On a case-sensitive Linux filesystem GitHub.copilot-chat and github.copilot-chat are different paths. The extension hardcoded the all-lowercase variant github.copilot-chat, which silently found nothing when the real folder was GitHub.copilot-chat.

Bug 2 — Nested chatSessions path in newer Copilot Chat

Older versions of Copilot Chat stored sessions at:

workspaceStorage/<hash>/chatSessions/

Newer versions (v0.45.0, as reported by the user in #647) nest their storage under the extension subfolder:

workspaceStorage/<hash>/GitHub.copilot-chat/chatSessions/

The extension only checked the flat path, so all sessions from newer Copilot Chat versions were invisible.

Changes

sessionDiscovery.ts

  • workspaceStorage scan: for each workspace hash, now checks three candidate chatSessions locations:

    1. <hash>/chatSessions/ — legacy flat path (still used by some installs)
    2. <hash>/GitHub.copilot-chat/chatSessions/ — mixed-case extension subfolder (Linux)
    3. <hash>/github.copilot-chat/chatSessions/ — lowercase (Windows/macOS fallback)
  • globalStorage scan: iterates over both GitHub.copilot-chat and github.copilot-chat so the correct folder is found regardless of filesystem case-sensitivity.

Testing

935/935 unit tests pass. Compile and lint clean.

Closes #647

Newer versions of Copilot Chat (tested with v0.45.0) store workspace
sessions under workspaceStorage/<hash>/GitHub.copilot-chat/chatSessions/
rather than directly at workspaceStorage/<hash>/chatSessions/.

On Linux the filesystem is case-sensitive, so 'GitHub.copilot-chat'
and 'github.copilot-chat' are different paths. Our code hardcoded the
lowercase variant which silently found nothing.

Changes:
- workspaceStorage scan now checks three candidate chatSessions paths
  per workspace hash: the legacy flat path plus both casing variants of
  the GitHub.copilot-chat extension subfolder
- globalStorage copilot-chat scan now iterates over both 'GitHub.copilot-chat'
  (mixed case, as VS Code creates it on Linux) and 'github.copilot-chat'
  (lowercase, kept for Windows/macOS compatibility)

Fixes the root cause reported in #647 where a user running VS Code
natively inside WSL saw 0 session files despite having active Copilot
Chat sessions.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@rajbos rajbos enabled auto-merge April 23, 2026 16:57
@rajbos rajbos merged commit b46da13 into main Apr 23, 2026
16 checks passed
@rajbos rajbos deleted the fix/copilot-chat-storage-path branch April 23, 2026 17:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

see no data with VS Code and Github Copilot Chat

1 participant