File tree Expand file tree Collapse file tree 1 file changed +9
-6
lines changed
src/vs/workbench/contrib/chat/browser/actions Expand file tree Collapse file tree 1 file changed +9
-6
lines changed Original file line number Diff line number Diff line change @@ -479,7 +479,6 @@ export class CreateRemoteAgentJobAction extends Action2 {
479479
480480 constructor ( ) {
481481 const precondition = ContextKeyExpr . and (
482- ContextKeyExpr . or ( ChatContextKeys . inputHasText , ChatContextKeys . hasPromptFile ) ,
483482 whenNotInProgress ,
484483 ChatContextKeys . remoteJobCreating . negate ( ) ,
485484 ) ;
@@ -524,21 +523,25 @@ export class CreateRemoteAgentJobAction extends Action2 {
524523 if ( ! session ) {
525524 return ;
526525 }
527-
528-
529526 const chatModel = widget . viewModel ?. model ;
530527 if ( ! chatModel ) {
531528 return ;
532529 }
533530
534- const userPrompt = widget . getInput ( ) ;
531+ const chatRequests = chatModel . getRequests ( ) ;
532+ let userPrompt = widget . getInput ( ) ;
535533 if ( ! userPrompt ) {
536- return ;
534+
535+ if ( ! chatRequests . length ) {
536+ // Nothing to do
537+ return ;
538+ }
539+
540+ userPrompt = 'implement this.' ;
537541 }
538542
539543 widget . input . acceptInput ( true ) ;
540544
541- const chatRequests = chatModel . getRequests ( ) ;
542545 const defaultAgent = chatAgentService . getDefaultAgent ( ChatAgentLocation . Panel ) ;
543546
544547 // Complete implementation of adding request back into chat stream
You can’t perform that action at this time.
0 commit comments