Skip to content

Commit cc9c0a9

Browse files
authored
show "Select Tools" only for agent mode, swap position with "add context" (microsoft#243474)
1 parent 2c7fff3 commit cc9c0a9

File tree

2 files changed

+9
-8
lines changed

2 files changed

+9
-8
lines changed

src/vs/workbench/contrib/chat/browser/actions/chatContextActions.ts

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -515,7 +515,8 @@ export class AttachContextAction extends Action2 {
515515
{
516516
when: ChatContextKeyExprs.inNonUnifiedPanel,
517517
id: MenuId.ChatInputAttachmentToolbar,
518-
group: 'navigation'
518+
group: 'navigation',
519+
order: 2
519520
}
520521
]
521522
}) {
@@ -1027,7 +1028,8 @@ registerAction2(class AttachFilesAction extends AttachContextAction {
10271028
menu: {
10281029
when: ChatContextKeyExprs.inEditsOrUnified,
10291030
id: MenuId.ChatInputAttachmentToolbar,
1030-
group: 'navigation'
1031+
group: 'navigation',
1032+
order: 3
10311033
},
10321034
icon: Codicon.attach,
10331035
precondition: ChatContextKeyExprs.inEditsOrUnified,

src/vs/workbench/contrib/mcp/browser/mcpCommands.ts

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -184,20 +184,19 @@ export class AttachMCPToolsAction extends Action2 {
184184
category: CHAT_CATEGORY,
185185
precondition: ContextKeyExpr.and(
186186
McpContextKeys.toolsCount.greater(0),
187-
ChatContextKeys.chatMode.notEqualsTo(ChatMode.Chat),
188-
ChatContextKeys.Editing.hasToolsAgent
187+
ChatContextKeys.chatMode.isEqualTo(ChatMode.Agent)
189188
),
190189
menu: {
191190
when: ContextKeyExpr.and(
192191
McpContextKeys.toolsCount.greater(0),
193-
ChatContextKeys.chatMode.notEqualsTo(ChatMode.Chat),
194-
ChatContextKeys.Editing.hasToolsAgent
192+
ChatContextKeys.chatMode.isEqualTo(ChatMode.Agent)
195193
),
196194
id: MenuId.ChatInputAttachmentToolbar,
197-
group: 'navigation'
195+
group: 'navigation',
196+
order: 1
198197
},
199198
keybinding: {
200-
when: ContextKeyExpr.and(ChatContextKeys.inChatInput, ChatContextKeys.chatMode.notEqualsTo(ChatMode.Chat)),
199+
when: ContextKeyExpr.and(ChatContextKeys.inChatInput, ChatContextKeys.chatMode.isEqualTo(ChatMode.Agent)),
201200
primary: KeyMod.CtrlCmd | KeyMod.Shift | KeyCode.Slash,
202201
weight: KeybindingWeight.EditorContrib
203202
}

0 commit comments

Comments
 (0)