Add components for AI Customization shortcuts widget#299206
Merged
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
This PR introduces a dedicated AI Customization shortcuts widget for the Agent Sessions window, refactoring the Sessions view to use the new widget and adding a component fixture for screenshot coverage.
Changes:
- Extracts the AI Customization toolbar UI/behavior into a new
AICustomizationShortcutsWidget. - Updates
sessionsViewPaneto instantiate the new widget and removes the inline toolbar implementation. - Adds a new themed component fixture to render the widget in multiple states (expanded/collapsed, with MCP servers, with counts).
Reviewed changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated 7 comments.
Show a summary per file
| File | Description |
|---|---|
src/vs/sessions/contrib/sessions/test/browser/aiCustomizationShortcutsWidget.fixture.ts |
Adds screenshot component fixtures for the new widget with mocked services and menu/view-item plumbing. |
src/vs/sessions/contrib/sessions/browser/sessionsViewPane.ts |
Replaces inline customization toolbar code with AICustomizationShortcutsWidget. |
src/vs/sessions/contrib/sessions/browser/media/customizationsToolbar.css |
Adjusts customization toolbar CSS selectors (no longer nested under .agent-sessions-viewpane). |
src/vs/sessions/contrib/sessions/browser/customizationsToolbar.contribution.ts |
Exports customization item config/list and view item class for reuse (fixture); also exports the contribution class. |
src/vs/sessions/contrib/sessions/browser/aiCustomizationShortcutsWidget.ts |
New widget encapsulating the customization shortcuts header + toolbar + collapse/count logic. |
Comments suppressed due to low confidence (1)
src/vs/sessions/contrib/sessions/browser/customizationsToolbar.contribution.ts:206
CustomizationsToolbarContributionis now exported, but it doesn’t appear to be imported/used outside this module. Exporting it increases the module’s public surface area without a clear need.
Consider keeping this class non-exported unless there’s a concrete external consumer (the fixture only needs CUSTOMIZATION_ITEMS and CustomizationLinkViewItem).
export class CustomizationsToolbarContribution extends Disposable implements IWorkbenchContribution {
static readonly ID = 'workbench.contrib.sessionsCustomizationsToolbar';
constructor(
You can also share your feedback on Copilot code review. Take the survey.
src/vs/sessions/contrib/sessions/test/browser/aiCustomizationShortcutsWidget.fixture.ts
Show resolved
Hide resolved
src/vs/sessions/contrib/sessions/test/browser/aiCustomizationShortcutsWidget.fixture.ts
Show resolved
Hide resolved
src/vs/sessions/contrib/sessions/test/browser/aiCustomizationShortcutsWidget.fixture.ts
Show resolved
Hide resolved
src/vs/sessions/contrib/sessions/test/browser/aiCustomizationShortcutsWidget.fixture.ts
Show resolved
Hide resolved
src/vs/sessions/contrib/sessions/test/browser/aiCustomizationShortcutsWidget.fixture.ts
Show resolved
Hide resolved
src/vs/sessions/contrib/sessions/test/browser/aiCustomizationShortcutsWidget.fixture.ts
Show resolved
Hide resolved
src/vs/sessions/contrib/sessions/test/browser/aiCustomizationShortcutsWidget.fixture.ts
Show resolved
Hide resolved
alexr00
approved these changes
Mar 4, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Copilot Generated Description:Introduce components for the AI Customization shortcuts widget, including a new toolbar and related functionality for managing customization items. The changes include the creation of a new widget class and updates to existing interfaces to support the new features.