Skip to content

Conversation

@benibenj
Copy link
Contributor

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.

Copilot AI review requested due to automatic review settings January 22, 2026 15:46
@benibenj benibenj enabled auto-merge January 22, 2026 15:46
@benibenj benibenj self-assigned this Jan 22, 2026
@vs-code-engineering vs-code-engineering bot added this to the January 2026 milestone Jan 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 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');
Copy link

Copilot AI Jan 22, 2026

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.

Suggested change
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 uses AI. Check for mistakes.
@benibenj benibenj merged commit e3d853b into main Jan 22, 2026
22 checks passed
@benibenj benibenj deleted the benibenj/fluttering-boar branch January 22, 2026 20:03
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.

3 participants