Skip to content

remove duplicate code with MenuId.ChatNewMenu#280437

Merged
joshspicer merged 1 commit intomainfrom
joshspicer/dupe
Dec 1, 2025
Merged

remove duplicate code with MenuId.ChatNewMenu#280437
joshspicer merged 1 commit intomainfrom
joshspicer/dupe

Conversation

@joshspicer
Copy link
Member

No description provided.

Copilot AI review requested due to automatic review settings December 1, 2025 21:20
@joshspicer joshspicer enabled auto-merge (squash) December 1, 2025 21:20
@vs-code-engineering
Copy link

📬 CODENOTIFY

The following users are being notified based on files changed in this PR:

@bpasero

Matched files:

  • src/vs/workbench/contrib/chat/browser/agentSessions/agentSessionsActions.ts

Copy link
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 removes duplicate menu registration code for chat session types by consolidating the menu registration into the dynamic action registration mechanism in ChatSessionsService.

Key Changes:

  • Removed two hardcoded action classes (NewBackgroundChatAction and NewCloudChatAction) from agentSessionsActions.ts that were only executing dynamically registered commands
  • Added menu registration to the dynamic action creation in chatSessions.contribution.ts so all chat session types automatically register to the ChatNewMenu
  • Removed unused imports (CHAT_CATEGORY and NEW_CHAT_SESSION_ACTION_ID) from agentSessionsActions.ts

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.

File Description
src/vs/workbench/contrib/chat/browser/agentSessions/agentSessionsActions.ts Removed duplicate action classes for Background and Cloud chat that were wrappers around dynamic commands, and cleaned up unused imports
src/vs/workbench/contrib/chat/browser/chatSessions.contribution.ts Added menu registration to dynamic action creation so all chat session contributions automatically appear in ChatNewMenu

@joshspicer joshspicer merged commit 6ae7d8e into main Dec 1, 2025
33 of 34 checks passed
@joshspicer joshspicer deleted the joshspicer/dupe branch December 1, 2025 21:52
@vs-code-engineering vs-code-engineering bot locked and limited conversation to collaborators Jan 15, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants