chat: Honor preferred Copilot harness during session loading - #332607
Merged
roblourens merged 1 commit intoAug 26, 2026
Merged
Conversation
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>
Contributor
There was a problem hiding this comment.
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
marked this pull request as ready for review
August 25, 2026 23:31
roblourens
enabled auto-merge (squash)
August 25, 2026 23:31
Connor Peet (connor4312)
approved these changes
Aug 26, 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.
Summary
chat.editor.preferCopilotHarnessconsistently when the session target picker temporarily has no bound chat model during session navigationServicesAccessorentry point and one Local-to-Copilot normalization stepRoot 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)(Written by Copilot)