Skip to content

chat: add experimental default chat provider setting for VS Code window#320169

Merged
connor4312 merged 2 commits into
mainfrom
connor4312/agent-host-default-chat-provider
Jun 5, 2026
Merged

chat: add experimental default chat provider setting for VS Code window#320169
connor4312 merged 2 commits into
mainfrom
connor4312/agent-host-default-chat-provider

Conversation

@connor4312
Copy link
Copy Markdown
Member

  • 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)

- 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>
Copilot AI review requested due to automatic review settings June 5, 2026 19:54
@connor4312 connor4312 enabled auto-merge (squash) June 5, 2026 19:54
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.defaultChatProvider and a shared getDefaultNewChatSessionType helper 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>
@connor4312 connor4312 merged commit f027331 into main Jun 5, 2026
25 checks passed
@connor4312 connor4312 deleted the connor4312/agent-host-default-chat-provider branch June 5, 2026 20:57
@vs-code-engineering vs-code-engineering Bot added this to the 1.124.0 milestone Jun 5, 2026
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.

3 participants