chat: add experimental default chat provider setting for VS Code window#320169
Merged
Conversation
- Adds `chat.agentHost.defaultChatProvider` setting that mirrors the Agents window's `chat.agentHost.defaultSessionsProvider` but controls the default chat provider in the VS Code window's session-target picker. This lets users opt the local agent host (Copilot CLI) in as their default chat provider end-to-end. - Wires the setting through the picker label/ordering, fresh chat session creation in `ChatViewPane`, and the 'new chat preserving type' flow so newly opened sidebar chats actually use the configured default. Explicit 'Local' selection from the picker still wins, so the override only applies when no explicit type is requested. - Registers the setting in `chat.shared.contribution.ts` so it is available in both the VS Code window and the Agents window, and factors the 'effective default session type' decision into a shared `getDefaultNewChatSessionType` helper to avoid drift between the three call sites. (Commit message generated by Copilot) Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Contributor
There was a problem hiding this comment.
Pull request overview
Adds an experimental setting to let users prefer the local Agent Host (Copilot CLI) as the default chat provider in the VS Code window, and wires that preference through new-session creation and “new chat” flows so the configured default is consistently applied.
Changes:
- Introduces
chat.agentHost.defaultChatProviderand a sharedgetDefaultNewChatSessionTypehelper to compute the effective default session type. - Updates the sidebar chat view to start a default (agent-host) session when enabled, while preserving explicit “Local” selection behavior.
- Adjusts “new chat preserving type” flows to use the configured default when there is no existing session to preserve.
Show a summary per file
| File | Description |
|---|---|
| src/vs/workbench/contrib/chat/common/constants.ts | Adds the new config key and shared helper to compute the effective default session type. |
| src/vs/workbench/contrib/chat/browser/widgetHosts/viewPane/chatViewPane.ts | Uses the shared helper to start agent-host sessions by default when enabled; adds an explicit “start local” entry point. |
| src/vs/workbench/contrib/chat/browser/widget/input/sessionTargetPickerActionItem.ts | Reorders/labels the session target picker based on the configured default and listens for config changes. |
| src/vs/workbench/contrib/chat/browser/widget/input/delegationSessionPickerActionItem.ts | Plumbs IConfigurationService through the picker subclass. |
| src/vs/workbench/contrib/chat/browser/chatSessions/chatSessions.contribution.ts | Ensures explicit “Local” selection starts a truly local session (not overridden by the default-provider setting). |
| src/vs/workbench/contrib/chat/browser/chat.shared.contribution.ts | Registers the new experimental setting in the shared chat configuration. |
| src/vs/workbench/contrib/chat/browser/actions/chatNewActions.ts | Passes configuration + session service into “new chat preserving type” logic. |
| src/vs/workbench/contrib/chat/browser/actions/chatExecuteActions.ts | Ensures “Send to New Chat” respects the configured default when there is no active session type to preserve. |
| src/vs/workbench/contrib/chat/browser/actions/chatActions.ts | Updates clearChatSessionPreservingType to use the effective default when starting from no active session. |
Copilot's findings
- Files reviewed: 9/9 changed files
- Comments generated: 1
Addresses Copilot review feedback: keeps the picker label and the dropdown's checked item consistent when no session is yet active. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
dmitrivMS
approved these changes
Jun 5, 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.
chat.agentHost.defaultChatProvidersetting that mirrors the Agents window'schat.agentHost.defaultSessionsProviderbut controls the default chat provider in the VS Code window's session-target picker. This lets users opt the local agent host (Copilot CLI) in as their default chat provider end-to-end.ChatViewPane, and the 'new chat preserving type' flow so newly opened sidebar chats actually use the configured default. Explicit 'Local' selection from the picker still wins, so the override only applies when no explicit type is requested.chat.shared.contribution.tsso it is available in both the VS Code window and the Agents window, and factors the 'effective default session type' decision into a sharedgetDefaultNewChatSessionTypehelper to avoid drift between the three call sites.(Commit message generated by Copilot)