Commit 7c39207
Extract CopilotChat and CopilotCli adapters (#654)
Move VS Code Copilot Chat and Copilot CLI session discovery out of the monolithic sessionDiscovery.ts and into proper adapters under src/adapters/, mirroring the existing 7 adapters.
- Add CopilotChatAdapter: workspaceStorage chatSessions (3 layouts), globalStorage emptyWindowChatSessions, globalStorage {GitHub,github}.copilot-chat recursive scan, WSL Windows-side paths
- Add CopilotCliAdapter: ~/.copilot/session-state flat .json/.jsonl + UUID subdir events.jsonl
- Strip sessionDiscovery.ts to a thin generic adapter loop with dedup by normalized path
- Wire both adapters into extension.ts and cli/src/helpers.ts (registered last so more-specific adapters win)
- handles() returns false intentionally so the existing fallback parser keeps owning per-session parsing for these editors. Predicates (isCopilotChatSessionPath / isCopilotCliSessionPath) and helpers are exported for the planned follow-up that flips handles().
- Add 31 new unit tests across copilotChatAdapter.test.ts and copilotCliAdapter.test.ts
- Update ecosystemAdapters.test.ts to expect 9 adapters
- Update .github/instructions/{cli,vscode-extension}.instructions.md
Tests: 961 pass, 0 fail, 3 skipped (was 935 before).
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>1 parent b46da13 commit 7c39207
11 files changed
Lines changed: 1055 additions & 426 deletions
File tree
- .github/instructions
- cli/src
- vscode-extension
- src
- adapters
- test/unit
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
31 | 31 | | |
32 | 32 | | |
33 | 33 | | |
| 34 | + | |
| 35 | + | |
34 | 36 | | |
35 | 37 | | |
36 | 38 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
151 | 151 | | |
152 | 152 | | |
153 | 153 | | |
| 154 | + | |
| 155 | + | |
| 156 | + | |
| 157 | + | |
| 158 | + | |
| 159 | + | |
| 160 | + | |
| 161 | + | |
| 162 | + | |
| 163 | + | |
| 164 | + | |
| 165 | + | |
| 166 | + | |
| 167 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
15 | 15 | | |
16 | 16 | | |
17 | 17 | | |
18 | | - | |
| 18 | + | |
19 | 19 | | |
20 | 20 | | |
21 | 21 | | |
| |||
98 | 98 | | |
99 | 99 | | |
100 | 100 | | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
101 | 106 | | |
102 | 107 | | |
103 | 108 | | |
| |||
0 commit comments