Skip to content

Comments

refactor: remove redundant 'id' property from model control entries in chat model picker#296476

Merged
sandy081 merged 1 commit intomainfrom
sandy081/wicked-emu
Feb 20, 2026
Merged

refactor: remove redundant 'id' property from model control entries in chat model picker#296476
sandy081 merged 1 commit intomainfrom
sandy081/wicked-emu

Conversation

@sandy081
Copy link
Member

No description provided.

Copilot AI review requested due to automatic review settings February 20, 2026 09:28
@sandy081 sandy081 enabled auto-merge (squash) February 20, 2026 09:28
@sandy081 sandy081 self-assigned this Feb 20, 2026
@vs-code-engineering vs-code-engineering bot added this to the February 2026 milestone Feb 20, 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 refactors the chat model picker to remove the redundant id property from IModelControlEntry. Since these entries are stored in dictionaries keyed by their ID, storing the ID again as a property was redundant. The refactoring extracts the ID from the dictionary key when needed and passes it separately where required.

Changes:

  • Removed id property from IModelControlEntry interface
  • Updated code to use dictionary keys (via Object.entries()) instead of entry.id
  • Modified createUnavailableModelItem() to accept id as a separate parameter
  • Updated all test fixtures to remove the redundant id property

Reviewed changes

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

File Description
src/vs/workbench/contrib/chat/common/languageModels.ts Removed id from IModelControlEntry interface; updated _setModelsControlManifest() to not copy id into dictionary values
src/vs/workbench/contrib/chat/browser/widget/input/chatModelPicker.ts Changed featured models loop from Object.values() to Object.entries() to access keys; added id parameter to createUnavailableModelItem() and updated all call sites; updated PromotedItem type to include id for unavailable items
src/vs/workbench/contrib/chat/test/browser/widget/input/chatModelPicker.test.ts Removed redundant id property from all test fixture data (17 occurrences)

@sandy081 sandy081 merged commit d1f34d5 into main Feb 20, 2026
32 of 33 checks passed
@sandy081 sandy081 deleted the sandy081/wicked-emu branch February 20, 2026 11:04
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.

2 participants