Move Configure Tools action from chat input to config menu#298085
Move Configure Tools action from chat input to config menu#298085daviddossett wants to merge 1 commit intomainfrom
Conversation
There was a problem hiding this comment.
Pull request overview
Moves the “Configure Tools...” action contribution from the chat input toolbar menu to the chat view’s config (gear) menu, aligning it with other configuration entries (e.g., Tool Sets).
Changes:
- Re-targets
ConfigureToolsActionmenu contribution fromMenuId.ChatInputtoCHAT_CONFIG_MENU_ID. - Adds a view-scoped
whenclause (view === ChatViewId) and places the item into the2_levelgroup with a new order. - Updates imports accordingly (removes
MenuId, addsChatViewIdandCHAT_CONFIG_MENU_ID).
| when: ContextKeyExpr.and( | ||
| ContextKeyExpr.equals('view', ChatViewId), | ||
| ChatContextKeys.chatModeKind.isEqualTo(ChatModeKind.Agent), | ||
| ChatContextKeys.lockedToCodingAgent.negate(), | ||
| ), | ||
| id: MenuId.ChatInput, | ||
| group: 'navigation', | ||
| order: 100, | ||
| id: CHAT_CONFIG_MENU_ID, | ||
| group: '2_level', | ||
| order: 10, |
There was a problem hiding this comment.
Since this action is now invoked from the chat view title config menu, it will typically receive an IChatViewTitleActionContext (with sessionResource). run() currently relies on lastFocusedWidget and only extracts a widget from args when an explicit { widget } object is passed, so it can operate on the wrong session/widget. Consider resolving the widget via IChatWidgetService.getWidgetBySessionResource(context.sessionResource) when the first arg matches isChatViewTitleActionContext(...) (and fall back to lastFocusedWidget).
| id: CHAT_CONFIG_MENU_ID, | ||
| group: '2_level', | ||
| order: 10, |
There was a problem hiding this comment.
Now that the action is surfaced from the config gear menu (instead of the chat input toolbar), the source passed into showToolsPicker will still default to 'chatInput' when no args are provided. This will misattribute picker telemetry (chatToolPickerClosed) and makes it harder to distinguish menu entry points. Consider changing the default source to something reflecting the new location (or plumbing a { source } argument from the menu invocation).
Moves the "Configure Tools..." icon button from the chat input toolbar (
MenuId.ChatInput) to the chat config gear menu (CHAT_CONFIG_MENU_ID), placing it in the2_levelgroup alongside Tool Sets.