@@ -85,7 +85,10 @@ class SubmitWithoutDispatchingAction extends Action2 {
85
85
precondition : ContextKeyExpr . and (
86
86
ChatContextKeys . inputHasText ,
87
87
ChatContextKeys . requestInProgress . negate ( ) ,
88
- ContextKeyExpr . and ( ChatContextKeys . ___location . isEqualTo ( ChatAgentLocation . Panel ) ) ) ,
88
+ ContextKeyExpr . and ( ContextKeyExpr . or (
89
+ ChatContextKeys . ___location . isEqualTo ( ChatAgentLocation . Panel ) ,
90
+ ChatContextKeys . ___location . isEqualTo ( ChatAgentLocation . Editor ) ,
91
+ ) ) ) ,
89
92
keybinding : {
90
93
when : ChatContextKeys . inChatInput ,
91
94
primary : KeyMod . Alt | KeyMod . Shift | KeyCode . Enter ,
@@ -140,7 +143,8 @@ export class ChatSubmitSecondaryAgentAction extends Action2 {
140
143
menu : {
141
144
id : MenuId . ChatExecuteSecondary ,
142
145
group : 'group_1' ,
143
- order : 3
146
+ order : 3 ,
147
+ when : ContextKeyExpr . equals ( ChatContextKeys . ___location . key , ChatAgentLocation . Panel )
144
148
} ,
145
149
keybinding : {
146
150
when : ChatContextKeys . inChatInput ,
@@ -185,12 +189,22 @@ class SendToChatEditingAction extends Action2 {
185
189
id : MenuId . ChatExecuteSecondary ,
186
190
group : 'group_1' ,
187
191
order : 4 ,
188
- when : ContextKeyExpr . and ( ChatContextKeys . enabled , ChatContextKeys . editingParticipantRegistered , ChatContextKeys . ___location . notEqualsTo ( ChatAgentLocation . EditingSession ) )
192
+ when : ContextKeyExpr . and (
193
+ ChatContextKeys . enabled ,
194
+ ChatContextKeys . editingParticipantRegistered ,
195
+ ChatContextKeys . ___location . notEqualsTo ( ChatAgentLocation . EditingSession ) ,
196
+ ChatContextKeys . ___location . notEqualsTo ( ChatAgentLocation . Editor )
197
+ )
189
198
} ,
190
199
keybinding : {
191
200
weight : KeybindingWeight . WorkbenchContrib ,
192
201
primary : KeyMod . CtrlCmd | KeyMod . Alt | KeyCode . Enter ,
193
- when : ContextKeyExpr . and ( ChatContextKeys . enabled , ChatContextKeys . editingParticipantRegistered , ChatContextKeys . ___location . notEqualsTo ( ChatAgentLocation . EditingSession ) )
202
+ when : ContextKeyExpr . and (
203
+ ChatContextKeys . enabled ,
204
+ ChatContextKeys . editingParticipantRegistered ,
205
+ ChatContextKeys . ___location . notEqualsTo ( ChatAgentLocation . EditingSession ) ,
206
+ ChatContextKeys . ___location . notEqualsTo ( ChatAgentLocation . Editor ) ,
207
+ )
194
208
}
195
209
} ) ;
196
210
}
@@ -258,7 +272,9 @@ class SendToNewChatAction extends Action2 {
258
272
f1 : false ,
259
273
menu : {
260
274
id : MenuId . ChatExecuteSecondary ,
261
- group : 'group_2'
275
+ group : 'group_2' ,
276
+ when : ContextKeyExpr . equals ( ChatContextKeys . ___location . key , ChatAgentLocation . Panel )
277
+
262
278
} ,
263
279
keybinding : {
264
280
weight : KeybindingWeight . WorkbenchContrib ,
0 commit comments