Fix duplicate Rename action in Sessions window context menu#319556
Merged
benibenj merged 1 commit intoJun 2, 2026
Conversation
The Copilot extension's chatSessions/item/context rename entries were gated only on chatSessionType (copilotcli/claude-code), but agent host sessions reuse the same session type values via different providers (local-agent-host, agenthost-*). This caused both the workbench's built-in rename action and the extension's rename to appear on agent host session items. Scope both rename entries to chatSessionProviderId == default-copilot so they only show for sessions provided by the Copilot extension. Fixes #319388 Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Contributor
There was a problem hiding this comment.
Pull request overview
This PR fixes a duplicate Rename... entry in the Sessions window session-item context menu by narrowing the Copilot extension’s contributed rename actions to only apply when the session is provided by the default Copilot sessions provider (chatSessionProviderId == default-copilot), avoiding overlap with agent-host sessions that reuse the same chatSessionType values.
Changes:
- Scope
github.copilot.claude.sessions.renametochatSessionType == claude-code && chatSessionProviderId == default-copilot. - Scope
github.copilot.cli.sessions.renametochatSessionType == copilotcli && chatSessionProviderId == default-copilot.
Show a summary per file
| File | Description |
|---|---|
| extensions/copilot/package.json | Narrows Sessions window item context-menu rename contributions to the default-copilot provider to prevent duplicate Rename actions for agent-host sessions. |
Copilot's findings
- Files reviewed: 1/1 changed files
- Comments generated: 0
aeschli
approved these changes
Jun 2, 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 #319388
The Copilot extension's
chatSessions/item/contextrename entries were gated only onchatSessionType(copilotcli/claude-code), but agent host sessions reuse the same session type values via different providers (local-agent-host,agenthost-*). This caused both the workbench's built-in rename action and the extension's rename to appear on agent host session items in the Sessions window list.Scoped both rename entries to
chatSessionProviderId == default-copilotso they only show for sessions provided by the Copilot extension. This mirrors the pattern already used forDeleteSessionActionincopilotChatSessionsActions.ts.The
chatSessionProviderIdoverlay is set on both context-menu sites (sessionsList.tsandsessionsTitleBarWidget.ts), so the fix applies uniformly.