sessions: quick chats (workspace-less sessions) in the Agents window#323972
Merged
Conversation
Adds quick chats to the Agents window: lightweight chats not scoped to a workspace, backed by an agent-host session. The host infers workspace-less from an absent workingDirectory (forks excluded) and assigns a stable scratch dir; the workspaceless tag rides the generic _meta bag. Quick chats are single-chat, use the normal session presentation (Done hidden), render in an always-visible in-list "Chats" section, and persist across reloads. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
…pport-plan-f10b0626
The primary "New" action gated quick-chat routing on `isCreated && isQuickChat`, but a quick-chat draft is Untitled (isCreated=false), so it fell through to the workspace composer seeded with a throwaway scratch dir (no session-type picker, "No models available"). Route on `isQuickChat` alone so a quick chat — draft or committed — opens another quick chat mirroring its harness. Extract the routing into a pure, side-effect-free `openNewChatOrQuickChat` helper so it is unit-testable (chat.contribution.ts is not test-importable). Supersedes Round 14(2) and updates Round 22(3); the Round 14(2) discard branch and Round 17 picker re-parent are kept as internal defense. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
- Suppress the redundant per-row chat icon when a quick chat is rendered under the always-visible "Chats" section (the section header already carries a chat icon); keep it in Pinned/custom/date groups where the chat identity is useful. - Disable the "Toggle Side Panel" command for quick chats via precondition IsQuickChatSessionContext.negate(), since a quick chat has no side pane (the empty aux bar is hidden and the chat is full-width). Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
…ng legacy migration When a session has no legacy peer chats, write an empty catalog so _readPersistedPeerChatCatalog returns [] on subsequent restores and _migrateLegacyPeerChats never re-runs. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
…+K Cmd+N (Round 24) Per user feedback, Cmd+N must always open a NEW SESSION — never a quick chat. Drop the context-aware quick-chat routing from NewChatInSessionsWindowAction (rename its title "New Chat" -> "New Session", keep the id) so it unconditionally calls openNewSession from the active session; the helper is renamed openNewChatOrQuickChat -> openNewSessionFromActive. Quick chats are created only via the Chats-section "+" (NewQuickChatAction), which now has a default Cmd+K Cmd+N chord. The peer-chat "+" (Cmd+T) is unaffected. Supersedes the Round 22(3)/23 mirror routing; the Round 14(2) discard branch and Round 17 picker re-parent are untouched. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
…ce composer (Round 25) New from a quick chat must always land on the clean New Session composer with a visible session-type picker. Gate openNewSessionFromActive's folder inheritance on isQuickChat so a quick chat never carries a (possibly leaked scratch) workspace URI into openNewSession. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
…at mode (Round 25b) Cmd+N from a quick chat reuses the new-session composer and only _activate(undefined), leaving it session-less. The session-type picker hides itself when it has no folder types (no active session), so no picker showed. Re-run the constructor's workspace-draft seed from an autorun when the composer transitions out of quick-chat mode with no active session, matching a freshly opened new-session composer (folder + visible picker). Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
…ed helper (Round 26) An untitled quick chat's titlebar showed "New Session" because the empty-title fallback was hardcoded and not quick-chat aware. Add getUntitledSessionTitle(isQuickChat) to the common layer and route all 5 fallback sites (titlebar, session header x2, list hover, sessions picker) through it. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
The SessionsTitleBarWidget re-render autorun read the active session's title and workspace but not isQuickChat, which _render() consumes for the untitled title fallback. Track it as a reactive dependency for forward-safety and consistency with other reactive render sites. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Each agent used to persist and re-emit its own workspace-less (quick chat) marker (copilot.workspaceless / claude.workspaceless) in the shared session database, and agents that persist nothing (Codex) lost the marker on restart. Make the AH service the single owner: AgentService persists a single agentHost.workspaceless key at create/materialize (from the value it already infers in _buildInitialSummary) and overlays _meta.workspaceless onto every agent's summary in listSessions. Agents no longer write or namespace the marker; Copilot reads the shared key for its resume system prompt, and the now-dead workspace-less plumbing is removed from the Claude session. This fixes restored quick chats for every agent (including Codex) with no per-agent code. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
- Rename the workspace-less launch-plan flag from isQuickChat to workspaceless in CopilotSessionLaunchPlan and IAgentHostPromptContext (and the disposeSession local) so the flag matches the workspaceless marker it flows from throughout the AH layer. Feature-descriptive names (COPILOT_AGENT_HOST_QUICK_CHAT_INSTRUCTIONS, _quickChatScratchDir) are kept. - Inline openNewSessionFromActive back into NewChatInSessionsWindowAction.run and remove the single-caller seam module + its test. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
…rker Following the earlier ownership move, the agents still read + re-emitted _meta.workspaceless in their metadata projections, which was redundant on the listSessions path (AgentService overlays it centrally) and only load-bearing on the single-session restore path. Centralize the restore overlay in AgentService.restoreSession (reads agentHost.workspaceless in its existing batch metadata read and merges it into the restored summary _meta), then drop the per-agent re-emit: remove it from the Claude metadata store entirely (Claude has no runtime need) and from the Copilot listSessions/getSessionMetadata projections. Copilot keeps reading the AH key for its resume system prompt and scratch-dir cleanup. Codex is now covered centrally with no Codex code. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Single-caller helper folded into the action's run(). Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Replace the optional createQuickChat with a mandatory method that throws when the provider does not support quick chats; callers now gate solely on the supportsQuickChats capability instead of probing for the method. Workspace-bound providers (Copilot chat, local chat) get an explicit throwing implementation. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Rename the agent-host-internal quick-chat identifiers, prompt tags, and prose to workspace-less: COPILOT_AGENT_HOST_QUICK_CHAT_INSTRUCTIONS -> COPILOT_AGENT_HOST_WORKSPACELESS_INSTRUCTIONS, the <quick_chat> system-message tag -> <workspaceless_chat>, and the scratch-dir helpers (_quickChatScratchDir/_ensure*/_cleanup*/_withQuickChatScratch). The workbench UI term "Quick Chat" is kept only where the agent host documents that mapping. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
…pport-plan-f10b0626 # Conflicts: # src/vs/platform/agentHost/node/agentService.ts # src/vs/platform/agentHost/node/claude/claudeAgent.ts # src/vs/sessions/contrib/providers/agentHost/browser/baseAgentHostSessionsProvider.ts # src/vs/sessions/contrib/providers/agentHost/test/browser/localAgentHostSessionsProvider.test.ts
Contributor
📬 CODENOTIFYThe following users are being notified based on files changed in this PR: @benibenjMatched files:
@lszomoruMatched files:
|
Contributor
There was a problem hiding this comment.
Pull request overview
Adds Quick Chats (workspace-less sessions) to the Agents window by introducing a first-class “quick chat” session kind (tracked via _meta.workspaceless → ISession.isQuickChat), surfacing them in an always-visible Chats section in the sessions list, and ensuring the agent host consistently restores and runs these sessions in stable per-session scratch directories.
Changes:
- Introduces quick-chat capabilities and creation APIs across sessions providers/management/service layers, plus UI actions and list grouping (“Chats” section + placeholder row).
- Updates Agents window layout and aux-bar containers to hide/disable workspace-scoped surfaces for quick chats (full-width chat; Toggle Side Panel disabled).
- Implements agent-host workspaceless inference (absent
workingDirectory, forks excluded), centralized persistence/restore of the marker, shared scratch dir utilities, and prompt wiring/tests.
Show a summary per file
| File | Description |
|---|---|
| src/vs/sessions/SESSIONS.md | Documents quick-chat contract |
| src/vs/sessions/SESSIONS_LIST.md | Documents Chats section behavior |
| src/vs/sessions/services/sessions/test/common/session.test.ts | Adds title-fallback unit tests |
| src/vs/sessions/services/sessions/test/browser/sessionsManagementService.test.ts | Adds createQuickChat tests |
| src/vs/sessions/services/sessions/test/browser/sessionNavigation.test.ts | Updates mock service interface |
| src/vs/sessions/services/sessions/common/sessionsProvider.ts | Adds quick-chat capabilities + API |
| src/vs/sessions/services/sessions/common/sessionsManagement.ts | Adds quick-chat management APIs |
| src/vs/sessions/services/sessions/common/sessionContextKeys.ts | Adds quick-chat context key binding |
| src/vs/sessions/services/sessions/common/session.ts | Adds isQuickChat + title helper |
| src/vs/sessions/services/sessions/browser/visibleSessions.ts | Propagates isQuickChat to wrappers |
| src/vs/sessions/services/sessions/browser/sessionsService.ts | Adds openQuickChat + routing tweaks |
| src/vs/sessions/services/sessions/browser/sessionsManagementService.ts | Implements createQuickChat + storage |
| src/vs/sessions/LAYOUT_CONTROLLER.md | Specifies D10 empty-aux behavior |
| src/vs/sessions/contrib/sessions/test/browser/sessionsList.test.ts | Tests Chats section grouping |
| src/vs/sessions/contrib/sessions/browser/views/sessionsViewActions.ts | Adds New Quick Chat action/keys |
| src/vs/sessions/contrib/sessions/browser/views/sessionsView.ts | Minor sessions view state rename |
| src/vs/sessions/contrib/sessions/browser/views/sessionsList.ts | Renders Chats section + placeholder |
| src/vs/sessions/contrib/sessions/browser/sessionsTitleBarWidget.ts | Uses quick-chat-aware title fallback |
| src/vs/sessions/contrib/sessions/browser/sessionsActions.ts | Uses quick-chat-aware picker titles |
| src/vs/sessions/contrib/sessions/browser/sessionHoverContent.ts | Uses quick-chat-aware hover titles |
| src/vs/sessions/contrib/sessions/browser/media/sessionsList.css | Styles Chats header + placeholder |
| src/vs/sessions/contrib/providers/localChatSessions/browser/localChatSessionsProvider.ts | Throws for createQuickChat |
| src/vs/sessions/contrib/providers/copilotChatSessions/browser/copilotChatSessionsProvider.ts | Throws for createQuickChat |
| src/vs/sessions/contrib/providers/agentHost/test/browser/localAgentHostSessionsProvider.test.ts | Adds quick-chat provider tests |
| src/vs/sessions/contrib/providers/agentHost/browser/localAgentHostSessionsProvider.ts | SupportsQuickChats + capability event |
| src/vs/sessions/contrib/providers/agentHost/browser/baseAgentHostSessionsProvider.ts | Implements createQuickChat drafts |
| src/vs/sessions/contrib/providers/agentHost/browser/agentHostSessionConfigPicker.ts | Hides repo config for quick chats |
| src/vs/sessions/contrib/providers/agentHost/AGENT_HOST_SESSIONS_PROVIDER.md | Documents host-side quick chats |
| src/vs/sessions/contrib/layout/test/browser/layoutControllerTestUtils.ts | Adds aux-container gating harness |
| src/vs/sessions/contrib/layout/test/browser/desktopSessionLayoutController.test.ts | Tests D10 empty-aux behavior |
| src/vs/sessions/contrib/layout/browser/desktopSessionLayoutController.ts | Implements reactive empty-aux hiding |
| src/vs/sessions/contrib/layout/browser/desktopSessionLayoutController.md | Documents D10 behavior |
| src/vs/sessions/contrib/layout/browser/baseSessionLayoutController.ts | Disables toggle for quick chats; guards aux |
| src/vs/sessions/contrib/files/browser/files.contribution.ts | Gates Files container on workspace |
| src/vs/sessions/contrib/chat/test/browser/sessionWorkspacePicker.test.ts | Updates provider mock API |
| src/vs/sessions/contrib/chat/test/browser/sessionTypePicker.test.ts | Tests quick-chat type sourcing |
| src/vs/sessions/contrib/chat/browser/sessionTypePicker.ts | Uses quick-chat type list when needed |
| src/vs/sessions/contrib/chat/browser/newChatWidget.ts | Adds quick-chat composer mode |
| src/vs/sessions/contrib/chat/browser/newChatInput.ts | Adds host for type picker in controls |
| src/vs/sessions/contrib/chat/browser/media/chatWidget.css | Adds quick-chat composer styling |
| src/vs/sessions/contrib/chat/browser/chat.contribution.ts | Cmd+N now “New Session” semantics |
| src/vs/sessions/contrib/changes/browser/changes.contribution.ts | Gates Changes container on workspace |
| src/vs/sessions/common/contextkeys.ts | Adds IsQuickChatSessionContext |
| src/vs/sessions/browser/parts/sessionHeader.ts | Uses quick-chat-aware title fallback |
| src/vs/platform/agentHost/test/node/copilotAgent.test.ts | Tests scratch dir + workspaceless behavior |
| src/vs/platform/agentHost/test/node/claudeAgent.test.ts | Tests scratch-dir fallback for Claude |
| src/vs/platform/agentHost/test/node/agentService.test.ts | Tests marker overlay + inference |
| src/vs/platform/agentHost/test/node/agentHostPromptRegistry.test.ts | Tests workspaceless prompt append |
| src/vs/platform/agentHost/test/common/sessionWorkspacelessMeta.test.ts | Adds meta helper unit tests |
| src/vs/platform/agentHost/node/workspacelessScratchDir.ts | New shared scratch-dir helper |
| src/vs/platform/agentHost/node/copilot/prompts/systemMessage.ts | Adds workspaceless instructions block |
| src/vs/platform/agentHost/node/copilot/prompts/promptRegistry.ts | Appends workspaceless instructions |
| src/vs/platform/agentHost/node/copilot/copilotSessionLauncher.ts | Threads workspaceless into prompt context |
| src/vs/platform/agentHost/node/copilot/copilotAgent.ts | Stable scratch dir + cleanup on delete |
| src/vs/platform/agentHost/node/claude/claudeAgent.ts | Scratch dir fallback for missing cwd |
| src/vs/platform/agentHost/node/agentService.ts | Persists/overlays workspaceless marker |
| src/vs/platform/agentHost/common/state/sessionState.ts | Adds workspaceless meta helpers + DB key |
| .github/skills/sessions/SKILL.md | Adds quick-chat review guidance |
Review details
- Files reviewed: 58/58 changed files
- Comments generated: 3
- Review effort level: Low
- sessionsList: select the row chat icon from isQuickChatSession(), not from workspace === undefined, so a workspace session with a transiently-undefined workspace no longer briefly shows the chat icon. - sessionContextKeys: correct the isQuickChat comment to reflect that the key is sourced from the isQuickChat tag, never inferred from workspace absence. - Agents window accessibility help: document the New Quick Chat command (Cmd/Ctrl+K Cmd/Ctrl+N) and the Chats section plus button, and note that the workspace picker does not apply and Toggle Side Panel is disabled for quick chats. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
dmitrivMS
approved these changes
Jul 2, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Quick chats (workspace-less sessions) in the Agents window
Adds quick chats to the Agents window: lightweight chats that are not scoped to a workspace, backed by an agent-host session. A quick chat is a single-chat session with
workspace === undefined, created fresh from the composer and surfaced in an always-visible "Chats" section in the sessions list.What changed
Feature (sessions layer)
New Quick Chatcommand (Cmd/Ctrl+K Cmd/Ctrl+N). The inline composer session-type picker chooses the harness.Cmd/Ctrl+Nalways creates a new session (never a quick chat); quick chats are created only via the dedicated affordances above.getUntitledSessionTitle(isQuickChat)helper.Agent host (platform layer)
workingDirectory(forks excluded) and runs the session in a stable per-session scratch dir (workspacelessScratchDir.ts, shared by the Copilot and Claude agents).workspacelessmarker rides the generic_metabag — no AHP schema change.workspacelessmarker:AgentServicepersists it centrally (agentHost.workspaceless) at create/materialize and overlays it onto every agent's summary_metaonlistSessionsand restore. Agents no longer persist or re-emit it; Copilot only reads the AH key for its resume system prompt + scratch cleanup. This fixes restored quick chats for every agent (Copilot, Claude, and Codex) with no per-agent code.Notes for reviewers
ISessionsProvider.createQuickChatis a mandatory method (throws when unsupported); callers gate on thesupportsQuickChatscapability.isQuickChatis sourced from the_metatag, not fromworkspace === undefined(which can be transiently undefined for workspace sessions).Validation
typecheck-client(0 errors),valid-layers-check, agent-host node suites (2448), and the affected sessions suites (provider, management, list, layout, quick-chat) all pass.