Skip to content

Commit f9cd6f4

Browse files
authored
Do not disable delegate button (microsoft#262758)
do not show the cloud button as disabled. Allow submission of a plan without final prompt
1 parent ccd46cd commit f9cd6f4

File tree

1 file changed

+9
-6
lines changed

1 file changed

+9
-6
lines changed

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

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff 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

0 commit comments

Comments
 (0)