Skip to content

Fix duplicate Rename action in Sessions window context menu#319556

Merged
benibenj merged 1 commit into
mainfrom
benibenj/agents/fix-duplicate-rename-action-sessions
Jun 2, 2026
Merged

Fix duplicate Rename action in Sessions window context menu#319556
benibenj merged 1 commit into
mainfrom
benibenj/agents/fix-duplicate-rename-action-sessions

Conversation

@benibenj
Copy link
Copy Markdown
Contributor

@benibenj benibenj commented Jun 2, 2026

Fixes #319388

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 in the Sessions window list.

Scoped both rename entries to chatSessionProviderId == default-copilot so they only show for sessions provided by the Copilot extension. This mirrors the pattern already used for DeleteSessionAction in copilotChatSessionsActions.ts.

The chatSessionProviderId overlay is set on both context-menu sites (sessionsList.ts and sessionsTitleBarWidget.ts), so the fix applies uniformly.

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>
Copilot AI review requested due to automatic review settings June 2, 2026 10:48
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

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.rename to chatSessionType == claude-code && chatSessionProviderId == default-copilot.
  • Scope github.copilot.cli.sessions.rename to chatSessionType == 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

@benibenj benibenj merged commit 6118c8c into main Jun 2, 2026
26 checks passed
@benibenj benibenj deleted the benibenj/agents/fix-duplicate-rename-action-sessions branch June 2, 2026 15:40
@vs-code-engineering vs-code-engineering Bot added this to the 1.124.0 milestone Jun 2, 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.

Extra "Rename" action shows up for AH sessions

3 participants