-
Notifications
You must be signed in to change notification settings - Fork 37.6k
tool picker alternative position #289671
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
tool picker alternative position #289671
Conversation
There was a problem hiding this 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 introduces an experimental feature that allows the Configure Tools action to be displayed as a toolbar button within the mode picker dropdown (on hover/focus) as an alternative to showing it in the chat input toolbar. The feature is controlled by the chat.alternativeToolAction.enabled configuration setting.
Changes:
- Adds configuration flag
chat.alternativeToolAction.enabled(experimental, default: false) - Adds toolbar action support to the action widget dropdown UI component
- Updates Configure Tools action menu visibility based on the configuration flag
- Refactors argument extraction in ConfigureToolsAction for better code organization
Reviewed changes
Copilot reviewed 9 out of 9 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| src/vs/workbench/contrib/chat/common/constants.ts | Adds AlternativeToolAction configuration constant |
| src/vs/workbench/contrib/chat/browser/chat.contribution.ts | Registers the experimental configuration setting with description |
| src/vs/workbench/contrib/chat/browser/widget/input/modePickerActionItem.ts | Adds toolbar action to Agent mode items in dropdown when feature enabled |
| src/vs/workbench/contrib/chat/browser/widget/input/chatInputPickerActionItem.ts | Adds actionContext field to picker options interface |
| src/vs/workbench/contrib/chat/browser/widget/input/chatInputPart.ts | Passes widget context to picker options for command execution |
| src/vs/workbench/contrib/chat/browser/actions/chatToolActions.ts | Updates menu visibility condition and refactors argument extraction into helper methods |
| src/vs/platform/actionWidget/browser/actionWidgetDropdown.ts | Adds toolbarActions field to action interface and passes it through |
| src/vs/platform/actionWidget/browser/actionList.ts | Implements toolbar rendering with proper disposal and hover handling |
| src/vs/platform/actionWidget/browser/actionWidget.css | Adds CSS rules for showing/hiding toolbar on hover/focus |
| const toolbarActions: IAction[] = []; | ||
| if (alternativeToolActionEnabled && mode.kind === ChatModeKind.Agent && !isDisabledViaPolicy) { | ||
| // Add toolbar actions for Agent modes when alternative tool action is enabled | ||
| const label = localize('configureToolsFor', "Configure tools for {0} {1}", mode.label.get(), isModeConsideredBuiltIn(mode, this._productService) ? 'mode' : 'agent'); |
Copilot
AI
Jan 22, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The label construction may result in awkward phrasing like "Configure tools for Custom Agent agent" when the mode label already includes "Agent". Consider checking if the mode label already contains the word being appended, or rephrase to avoid redundancy.
| const label = localize('configureToolsFor', "Configure tools for {0} {1}", mode.label.get(), isModeConsideredBuiltIn(mode, this._productService) ? 'mode' : 'agent'); | |
| const isBuiltIn = isModeConsideredBuiltIn(mode, this._productService); | |
| const label = isBuiltIn | |
| ? localize('configureToolsForMode', "Configure tools for {0} mode", mode.label.get()) | |
| : localize('configureToolsForAgent', "Configure tools for {0}", mode.label.get()); |
Copilot Generated Description:Introduce an alternative tool action that displays the Configure Tools action in the mode picker dropdown on hover. This change includes updates to the configuration, UI elements, and action handling to support the new functionality.