Merged
Conversation
…tions The autorun that registers `openNewChatSessionInPlace.<type>` actions filters `_contributions` by `_contributionDisposables.has(...)`. Only extension-contributed providers were getting added to that map (via `_evaluateAvailability`), so programmatically-registered contributions (local + remote agent hosts) had no in-place action and the session-type picker in VS Code threw "command not found" when switching to the local Copilot CLI agent host. Mark programmatic registrations as active in `registerChatSessionContribution` so they participate in the autorun. Also disambiguate the agent-host displayName in VS Code by suffixing "- Agent Host", since the extension-host Copilot CLI harness uses the same "Copilot CLI" label. The Agents window keeps the original displayName. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Contributor
There was a problem hiding this comment.
Pull request overview
Fixes missing openNewChatSessionInPlace.<type> command registration for programmatic chat session contributions (notably local/remote agent-host providers), and disambiguates agent-host session labels in VS Code’s session-type picker.
Changes:
- Mark programmatic chat session contributions as “available” so the constructor autorun registers per-type in-place “New {0} Session” actions/commands.
- Ensure programmatic contributions clean up their availability/disposable entry on unregister.
- Suffix agent-host
displayNamewith “ - Agent Host” in VS Code (but not in the Agents window) to avoid label collisions.
Show a summary per file
| File | Description |
|---|---|
| src/vs/workbench/contrib/chat/browser/chatSessions/chatSessions.contribution.ts | Treat programmatic contributions as available for in-place action/command registration; dispose availability state on unregister. |
| src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/agentHostChatContribution.ts | Disambiguate agent-host provider display names in VS Code’s picker via a localized suffix. |
Copilot's findings
- Files reviewed: 2/2 changed files
- Comments generated: 1
…ister/unregister Programmatic chat session contributions bypass _evaluateAvailability, which was the only path that called _updateHasCanDelegateProvidersContextKey. Update the context key directly in registerChatSessionContribution and its dispose so UI gated on ChatContextKeys.hasCanDelegateProviders stays in sync. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
sandy081
approved these changes
Apr 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.
Fixes the "command 'workbench.action.chat.openNewChatSessionInPlace.agent-host-copilotcli' not found" error that fires when switching to the local Copilot CLI agent host from the session-type picker in VS Code.
What
ChatSessionsService.registerChatSessionContribution, also populate_contributionDisposablesso programmatic contributions participate in the autorun that registersopenNewChatSessionInPlace.<type>actions.AgentHostContribution._registerAgent, suffix the agent'sdisplayNamewith" - Agent Host"when running in VS Code, to disambiguate from the extension-host Copilot CLI harness which uses the same label. The Agents window keeps the originaldisplayName.Why
The autorun in
chatSessions.contribution.tsiterates_contributionsfiltered by_contributionDisposables.has(...)to register the per-type "New {0} Session" action. Only extension-contributed providers were being added to that map (via_evaluateAvailability); programmatic registrations (used by both local and remote agent hosts) only populated_contributions, so the autorun filtered them out and no command was registered.This affected both local agent host (
agent-host-copilotcli) and remote agent host (remote-*) types.Notes for reviewers
!_isSessionsWindow). The Agents window already shows only agent-host sessions, so no suffix is needed.AgentHostContribution.(Written by Copilot)