Skip to content

Comments

Hide manage model picker action item when required#296876

Draft
DonJayamanne wants to merge 1 commit intomainfrom
don/urgent-loon
Draft

Hide manage model picker action item when required#296876
DonJayamanne wants to merge 1 commit intomainfrom
don/urgent-loon

Conversation

@DonJayamanne
Copy link
Contributor

No description provided.

Copilot AI review requested due to automatic review settings February 22, 2026 23:11
@DonJayamanne DonJayamanne self-assigned this Feb 22, 2026
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 adds a canManageModels parameter to conditionally control the visibility of the "Manage Models..." action item in the chat model picker. This allows the model picker to hide the management option when used in specific contexts, such as sessions with specialized model requirements (indicated by getCurrentSessionType()).

Changes:

  • Added canManageModels: boolean parameter to buildModelPickerItems function
  • Modified conditional logic to check canManageModels before displaying the "Manage Models..." entry and its preceding separator
  • Updated all test call sites and added comprehensive test coverage for the new functionality

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.

File Description
src/vs/workbench/contrib/chat/browser/widget/input/chatModelPicker.ts Added canManageModels parameter to buildModelPickerItems function and updated conditional logic to respect this flag when showing the "Manage Models..." action
src/vs/workbench/contrib/chat/test/browser/widget/input/chatModelPicker.test.ts Updated test helper function to accept canManageModels option, added 6 new tests covering various scenarios, and updated existing direct call sites to pass true explicitly

@DonJayamanne DonJayamanne marked this pull request as ready for review February 23, 2026 00:18
@DonJayamanne DonJayamanne marked this pull request as draft February 23, 2026 00:18
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.

1 participant