Skip to content

chat: Honor preferred Copilot harness during session loading - #332607

Merged
roblourens merged 1 commit into
microsoft:mainfrom
roblourens:roblou/agents/fix-copilot-harness-defaulting-issue
Aug 26, 2026
Merged

chat: Honor preferred Copilot harness during session loading#332607
roblourens merged 1 commit into
microsoft:mainfrom
roblourens:roblou/agents/fix-copilot-harness-defaulting-issue

Conversation

@roblourens

Copy link
Copy Markdown
Member

Summary

  • apply chat.editor.preferCopilotHarness consistently when the session target picker temporarily has no bound chat model during session navigation
  • consolidate new-chat session type resolution behind a ServicesAccessor entry point and one Local-to-Copilot normalization step
  • preserve explicit Local, virtual workspace, disabled Agent Host, and non-local remembered/current selections

Root cause

The picker uses the services-based default resolver while a destination session is loading and the chat widget has no active model. That path did not apply the Copilot preference, while the command/action resolver did, so back navigation could flash Local and an interrupted load could leave that fallback visible.

Validation

  • npm run typecheck-client
  • ./scripts/test.sh --run src/vs/workbench/contrib/chat/test/common/constants.test.ts (35 passing)
  • pre-commit hygiene checks

(Written by Copilot)

Unify new-chat harness selection so the picker and creation paths apply the Copilot preference consistently when session navigation temporarily has no bound model. Consolidate the resolver around ServicesAccessor and cover remembered and current harness precedence.\n\n(Written by Copilot)\n\nCo-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot AI balanced review requested due to automatic review settings August 25, 2026 20:26

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Consistently applies the preferred Copilot harness while chat sessions load or navigate.

Changes:

  • Consolidates session-type resolution through a services-based resolver.
  • Normalizes Local to Copilot while preserving explicit and non-local selections.
  • Extends resolver tests for picker fallback and remembered selections.
Show a summary per file
File Description
constants.ts Centralizes harness resolution logic.
constants.test.ts Tests preference and selection precedence.
chatViewPane.ts Uses the renamed service-based resolver.
chatEditorInput.ts Uses consistent resolver behavior.
chatClear.ts Adopts the accessor-based entry point.
chatActions.ts Simplifies new/cleared chat resolution.

Review details

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

  • Files reviewed: 6/6 changed files
  • Comments generated: 0
  • Review effort level: Balanced

@roblourens
roblourens marked this pull request as ready for review August 25, 2026 23:31
@roblourens
roblourens enabled auto-merge (squash) August 25, 2026 23:31
@roblourens
roblourens merged commit fa73fe6 into microsoft:main Aug 26, 2026
44 of 45 checks passed
@vs-code-engineering vs-code-engineering Bot added this to the 1.136.0 milestone Aug 26, 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