Skip to content

[cherry-pick] [cherry-pick] chat: use trophy icon for model comparison toggle - #342738

Closed
vs-code-engineering[bot] wants to merge 1 commit into
mainfrom
cherry-pick/342710
Closed

vs-code-engineering[bot] wants to merge 1 commit into
mainfrom
cherry-pick/342710

Conversation

@vs-code-engineering

Copy link
Copy Markdown
Contributor

Cherry-pick of #342710 from release/1.143.

⚠️ This cherry-pick has merge conflicts that need manual resolution. Conflict markers (<<<<<<</=======/>>>>>>>) are committed to the branch — check it out locally, resolve, and force-push.

git fetch origin cherry-pick/342710 && git checkout cherry-pick/342710
# resolve conflicts, then:
git add -A && git commit --amend --no-edit && git push --force-with-lease

Conflicting files:

  • src/vs/workbench/contrib/chat/browser/widget/input/modelPicker/modelPickerTabbedWidget.ts
  • src/vs/workbench/contrib/chat/test/browser/widget/input/modelPicker/modelPickerTabbedWidget.test.ts

Ports #342688 to release/1.143.

Summary

  • Update @vscode/codicons from 0.0.46-44 to 0.0.46-46 in the root and web packages and lockfiles.
  • Register the trophy glyph added in Add trophy icon with metadata vscode-codicons#539.
  • Replace the model picker's Compare Models layers icon with the trophy while preserving its accessible label, tooltip, availability, and aria-pressed behavior.
  • Give the active comparison toggle a persistent theme-aware fill and border without changing its 28 x 28 dimensions.
  • Show one trophy in the composer for a configured comparison instead of one provider icon per attempt, while retaining model and variant names in hover and accessible text.
  • Remove the unused per-attempt comparison icon presentation contract and CSS.

Winner displays and metric badges are unchanged. The existing copy-codicons build task supplies the updated font.

Release branch adaptation

The production changes cherry-picked cleanly. release/1.143 does not contain newer main-only model picker tests that the first two source commits modified, so the equivalent trophy, accessible pressed-state, selected theme colors, and stable-dimension assertions were added to the release branch's existing comprehensive comparison picker test. The adapted assertion re-queries the live action after toggling because the release picker replaces that DOM node when entering comparison setup.

Validation

  • npm run install-fast - passed.
  • npm run build-fast -- --client-only - passed, including copy-codicons and a full client build.
  • Focused modelPickerActionItem, modelPickerTabbedWidget, and sessionComparisonModelSelection suites - passed, 164 tests.
  • npm run typecheck-client - passed.
  • Targeted ESLint for all seven changed TypeScript files - passed.
  • Targeted stylelint for modelPicker.css - passed with 12 existing design-token suggestions.
  • Targeted hygiene for the eight changed source, test, and CSS paths - passed.
  • git diff --check - passed.

Manual test

With model comparison enabled in the Agents window, open the new-session model picker. Confirm the trophy appears beside Search. Activate it and verify the selected fill and border remain visible after moving the pointer away, aria-pressed is true, and the control does not shift size. Configure multiple attempts and confirm the composer shows exactly one trophy while hover and accessible text still list the configured models and variants. Activate the trophy to edit the comparison, then reset the comparison and confirm the normal model label returns.

Copilot AI balanced review requested due to automatic review settings October 19, 2026 23:11
@vs-code-engineering vs-code-engineering Bot added the cherry-pick-artifact Auto-generated cherry-pick PR label Oct 19, 2026

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Changes recommended

Unresolved conflicts block compilation, and their resolution must preserve shortcut labels and correct the affected tests.

3 open issues
1 file not reviewed
  • remote/web/package-lock.json: Generated file
What changed in this PR

Cherry-picks the trophy-based model comparison UI into VS Code’s chat model picker.

Changes:

  • Updates codicons and registers the trophy glyph.
  • Uses one trophy for comparisons and adds theme-aware selected styling.
  • Removes per-attempt icon plumbing and updates regression tests.
File Description
src/​vs/​workbench/​contrib/​chat/​test/​browser/​widget/​input/​modelPicker/​modelPickerTabbedWidget.test.ts Adds toggle appearance and state assertions; contains conflicts.
src/​vs/​workbench/​contrib/​chat/​test/​browser/​widget/​input/​modelPicker/​modelPickerActionItem.test.ts Tests single-trophy rendering, accessible labels, and reset.
src/​vs/​workbench/​contrib/​chat/​browser/​widget/​input/​modelPicker/​modelPickerWidget.ts Simplifies comparison rendering to one trophy.
src/​vs/​workbench/​contrib/​chat/​browser/​widget/​input/​modelPicker/​modelPickerTabbedWidget.ts Changes the toggle icon; contains a conflict.
src/​vs/​workbench/​contrib/​chat/​browser/​widget/​input/​modelPicker/​modelPickerComparison.ts Removes the per-attempt icon contract.
src/​vs/​workbench/​contrib/​chat/​browser/​widget/​input/​modelPicker/​media/​modelPicker.css Adds selected styling and removes obsolete icon styling.
src/​vs/​sessions/​contrib/​chat/​browser/​sessionComparisonModelSelection.ts Removes unused icon-summary data.
src/​vs/​base/​common/​codiconsLibrary.ts Registers the trophy glyph.
remote/​web/​package.json Updates the web codicons dependency.
remote/​web/​package-lock.json Locks the updated web dependency.
package.json Updates the root codicons dependency.
package-lock.json Locks the updated root dependency.

Review effort: Balanced

icon: Codicon.layers,
tooltip: this._labelWithKeybinding(comparison.label, comparison.startCommandId),
=======
icon: Codicon.trophy,
Comment on lines +769 to +775
<<<<<<< HEAD
icon: Codicon.layers,
tooltip: this._labelWithKeybinding(comparison.label, comparison.startCommandId),
=======
icon: Codicon.trophy,
tooltip: comparison.label,
>>>>>>> bd48520ea99 ([cherry-pick] chat: use trophy icon for model comparison toggle (#342710))
};
assert.deepStrictEqual({
actions: [...popup.querySelectorAll<HTMLElement>('.tabbed-action-list-tabbar > .tabbed-action-list-tabbar-action')].map(action => action.dataset.id),
<<<<<<< HEAD

@alexdima Alexandru Dima (alexdima) left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

conflict markers!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cherry-pick-artifact Auto-generated cherry-pick PR

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants