@@ -150,7 +150,7 @@ abstract class SubmitAction extends Action2 {
150150 }
151151}
152152
153- const whenNotInProgressOrPaused = ContextKeyExpr . or ( ChatContextKeys . isRequestPaused , ChatContextKeys . requestInProgress . negate ( ) ) ;
153+ const whenNotInProgress = ChatContextKeys . requestInProgress . negate ( ) ;
154154
155155export class ChatSubmitAction extends SubmitAction {
156156 static readonly ID = 'workbench.action.chat.submit' ;
@@ -185,7 +185,7 @@ export class ChatSubmitAction extends SubmitAction {
185185 id : MenuId . ChatExecute ,
186186 order : 4 ,
187187 when : ContextKeyExpr . and (
188- whenNotInProgressOrPaused ,
188+ whenNotInProgress ,
189189 menuCondition ,
190190 ) ,
191191 group : 'navigation' ,
@@ -277,45 +277,6 @@ class ToggleChatModeAction extends Action2 {
277277 }
278278}
279279
280- export const ToggleRequestPausedActionId = 'workbench.action.chat.toggleRequestPaused' ;
281- export class ToggleRequestPausedAction extends Action2 {
282- static readonly ID = ToggleRequestPausedActionId ;
283-
284- constructor ( ) {
285- super ( {
286- id : ToggleRequestPausedAction . ID ,
287- title : localize2 ( 'interactive.toggleRequestPausd.label' , "Toggle Request Paused" ) ,
288- category : CHAT_CATEGORY ,
289- icon : Codicon . debugPause ,
290- toggled : {
291- condition : ChatContextKeys . isRequestPaused ,
292- icon : Codicon . play ,
293- tooltip : localize ( 'requestIsPaused' , "Resume Request" ) ,
294- } ,
295- tooltip : localize ( 'requestNotPaused' , "Pause Request" ) ,
296- menu : [
297- {
298- id : MenuId . ChatExecute ,
299- order : 3.5 ,
300- when : ContextKeyExpr . and (
301- ChatContextKeys . canRequestBePaused ,
302- ChatContextKeys . chatModeKind . isEqualTo ( ChatModeKind . Agent ) ,
303- ChatContextKeys . location . isEqualTo ( ChatAgentLocation . Panel ) ,
304- ContextKeyExpr . or ( ChatContextKeys . isRequestPaused . negate ( ) , ChatContextKeys . inputHasText . negate ( ) ) ,
305- ) ,
306- group : 'navigation' ,
307- } ]
308- } ) ;
309- }
310-
311- override run ( accessor : ServicesAccessor , ...args : any [ ] ) : void {
312- const context : IChatExecuteActionContext | undefined = args [ 0 ] ;
313- const widgetService = accessor . get ( IChatWidgetService ) ;
314- const widget = context ?. widget ?? widgetService . lastFocusedWidget ;
315- widget ?. togglePaused ( ) ;
316- }
317- }
318-
319280class SwitchToNextModelAction extends Action2 {
320281 static readonly ID = 'workbench.action.chat.switchToNextModel' ;
321282
@@ -450,17 +411,14 @@ export class ChatEditingSessionSubmitAction extends SubmitAction {
450411 {
451412 id : MenuId . ChatExecuteSecondary ,
452413 group : 'group_1' ,
453- when : ContextKeyExpr . and ( whenNotInProgressOrPaused , menuCondition ) ,
414+ when : ContextKeyExpr . and ( whenNotInProgress , menuCondition ) ,
454415 order : 1
455416 } ,
456417 {
457418 id : MenuId . ChatExecute ,
458419 order : 4 ,
459420 when : ContextKeyExpr . and (
460- ContextKeyExpr . or (
461- ContextKeyExpr . and ( ChatContextKeys . isRequestPaused , ChatContextKeys . inputHasText ) ,
462- ChatContextKeys . requestInProgress . negate ( ) ,
463- ) ,
421+ ChatContextKeys . requestInProgress . negate ( ) ,
464422 menuCondition ) ,
465423 group : 'navigation' ,
466424 } ]
@@ -476,7 +434,7 @@ class SubmitWithoutDispatchingAction extends Action2 {
476434 // if the input has prompt instructions attached, allow submitting requests even
477435 // without text present - having instructions is enough context for a request
478436 ContextKeyExpr . or ( ChatContextKeys . inputHasText , ChatContextKeys . hasPromptFile ) ,
479- whenNotInProgressOrPaused ,
437+ whenNotInProgress ,
480438 ChatContextKeys . chatModeKind . isEqualTo ( ChatModeKind . Ask ) ,
481439 ) ;
482440
@@ -522,7 +480,7 @@ export class CreateRemoteAgentJobAction extends Action2 {
522480 constructor ( ) {
523481 const precondition = ContextKeyExpr . and (
524482 ContextKeyExpr . or ( ChatContextKeys . inputHasText , ChatContextKeys . hasPromptFile ) ,
525- whenNotInProgressOrPaused ,
483+ whenNotInProgress ,
526484 ChatContextKeys . remoteJobCreating . negate ( ) ,
527485 ) ;
528486
@@ -725,7 +683,7 @@ export class ChatSubmitWithCodebaseAction extends Action2 {
725683 // if the input has prompt instructions attached, allow submitting requests even
726684 // without text present - having instructions is enough context for a request
727685 ContextKeyExpr . or ( ChatContextKeys . inputHasText , ChatContextKeys . hasPromptFile ) ,
728- whenNotInProgressOrPaused ,
686+ whenNotInProgress ,
729687 ) ;
730688
731689 super ( {
@@ -782,7 +740,7 @@ class SendToNewChatAction extends Action2 {
782740 // if the input has prompt instructions attached, allow submitting requests even
783741 // without text present - having instructions is enough context for a request
784742 ContextKeyExpr . or ( ChatContextKeys . inputHasText , ChatContextKeys . hasPromptFile ) ,
785- whenNotInProgressOrPaused ,
743+ whenNotInProgress ,
786744 ) ;
787745
788746 super ( {
@@ -843,7 +801,6 @@ export class CancelAction extends Action2 {
843801 menu : [ {
844802 id : MenuId . ChatExecute ,
845803 when : ContextKeyExpr . and (
846- ChatContextKeys . isRequestPaused . negate ( ) ,
847804 ChatContextKeys . requestInProgress ,
848805 ChatContextKeys . remoteJobCreating . negate ( )
849806 ) ,
@@ -926,7 +883,6 @@ export function registerChatExecuteActions() {
926883 registerAction2 ( ChatSubmitWithCodebaseAction ) ;
927884 registerAction2 ( CreateRemoteAgentJobAction ) ;
928885 registerAction2 ( ToggleChatModeAction ) ;
929- registerAction2 ( ToggleRequestPausedAction ) ;
930886 registerAction2 ( SwitchToNextModelAction ) ;
931887 registerAction2 ( OpenModelPickerAction ) ;
932888 registerAction2 ( OpenModePickerAction ) ;
0 commit comments