Commit 78f83fc
committed
sessions: add multi-chat support to Copilot provider (#preview)
Add support for multiple chats within a single session in the Copilot
Chat sessions provider, gated behind the preview setting
`sessions.github.copilot.multiChatSessions`.
Key changes:
- Integrate SessionsGroupModel into CopilotChatSessionsProvider for
chat-to-session grouping with storage persistence
- Add _sendSubsequentChat() for creating new chats in existing sessions
with workspace isolation mode
- _chatToSession() builds multi-chat observable from group model with
aggregated status, updatedAt, isRead, lastTurnEnd across all chats
- Session title and properties always come from the primary (first) chat
- getSessions() deduplicates by group ID when multi-chat is enabled
- deleteSession() removes all chats in the group
- deleteChat() removes individual chats; delegates to deleteSession
when only one chat remains
- _refreshSessionCacheMultiChat() handles removed chats that belong to
groups with siblings as changed events on the parent session
- Management service tracks active chat via autorun on chats observable
- All multi-chat code paths fall back to single-chat behavior when the
setting is disabled
- Comprehensive unit tests for the provider1 parent 98f6cbe commit 78f83fc
4 files changed
Lines changed: 986 additions & 45 deletions
File tree
- src/vs/sessions/contrib
- copilotChatSessions
- browser
- test/browser
- sessions/browser
Lines changed: 16 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
6 | 6 | | |
7 | 7 | | |
8 | 8 | | |
9 | | - | |
| 9 | + | |
10 | 10 | | |
11 | 11 | | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
12 | 27 | | |
13 | 28 | | |
14 | 29 | | |
| |||
0 commit comments