@@ -155,7 +155,7 @@ export class ChatSubmitAction extends SubmitAction {
155
155
static readonly ID = 'workbench.action.chat.submit' ;
156
156
157
157
constructor ( ) {
158
- const precondition = ChatContextKeys . chatModeKind . isEqualTo ( ChatModeKind . Ask ) ;
158
+ const menuCondition = ChatContextKeys . chatModeKind . isEqualTo ( ChatModeKind . Ask ) ;
159
159
160
160
super ( {
161
161
id : ChatSubmitAction . ID ,
@@ -168,7 +168,6 @@ export class ChatSubmitAction extends SubmitAction {
168
168
icon : Codicon . sendToRemoteAgent ,
169
169
tooltip : localize ( 'sendToRemoteAgent' , "Send to coding agent" ) ,
170
170
} ,
171
- precondition,
172
171
keybinding : {
173
172
when : ChatContextKeys . inChatInput ,
174
173
primary : KeyCode . Enter ,
@@ -179,14 +178,14 @@ export class ChatSubmitAction extends SubmitAction {
179
178
id : MenuId . ChatExecuteSecondary ,
180
179
group : 'group_1' ,
181
180
order : 1 ,
182
- when : ContextKeyExpr . and ( precondition , ChatContextKeys . lockedToCodingAgent . negate ( ) ) ,
181
+ when : ContextKeyExpr . and ( menuCondition , ChatContextKeys . lockedToCodingAgent . negate ( ) ) ,
183
182
} ,
184
183
{
185
184
id : MenuId . ChatExecute ,
186
185
order : 4 ,
187
186
when : ContextKeyExpr . and (
188
187
whenNotInProgressOrPaused ,
189
- precondition ,
188
+ menuCondition ,
190
189
) ,
191
190
group : 'navigation' ,
192
191
} ]
@@ -438,25 +437,19 @@ export class ChatEditingSessionSubmitAction extends SubmitAction {
438
437
static readonly ID = 'workbench.action.edits.submit' ;
439
438
440
439
constructor ( ) {
441
- const precondition = ChatContextKeys . chatModeKind . notEqualsTo ( ChatModeKind . Ask ) ;
440
+ const menuCondition = ChatContextKeys . chatModeKind . notEqualsTo ( ChatModeKind . Ask ) ;
442
441
443
442
super ( {
444
443
id : ChatEditingSessionSubmitAction . ID ,
445
444
title : localize2 ( 'edits.submit.label' , "Send" ) ,
446
445
f1 : false ,
447
446
category : CHAT_CATEGORY ,
448
447
icon : Codicon . send ,
449
- precondition,
450
- keybinding : {
451
- when : ChatContextKeys . inChatInput ,
452
- primary : KeyCode . Enter ,
453
- weight : KeybindingWeight . EditorContrib
454
- } ,
455
448
menu : [
456
449
{
457
450
id : MenuId . ChatExecuteSecondary ,
458
451
group : 'group_1' ,
459
- when : ContextKeyExpr . and ( whenNotInProgressOrPaused , precondition ) ,
452
+ when : ContextKeyExpr . and ( whenNotInProgressOrPaused , menuCondition ) ,
460
453
order : 1
461
454
} ,
462
455
{
@@ -467,7 +460,7 @@ export class ChatEditingSessionSubmitAction extends SubmitAction {
467
460
ContextKeyExpr . and ( ChatContextKeys . isRequestPaused , ChatContextKeys . inputHasText ) ,
468
461
ChatContextKeys . requestInProgress . negate ( ) ,
469
462
) ,
470
- precondition ) ,
463
+ menuCondition ) ,
471
464
group : 'navigation' ,
472
465
} ]
473
466
} ) ;
0 commit comments