Skip to content

Commit 9d9234f

Browse files
authored
Cloud button nits (microsoft#254015)
* acceptInput so that it goes to history * hide stop button when remotejobCreating
1 parent d9f1bf8 commit 9d9234f

File tree

1 file changed

+13
-3
lines changed

1 file changed

+13
-3
lines changed

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

Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -543,13 +543,19 @@ export class CreateRemoteAgentJobAction extends Action2 {
543543
return;
544544
}
545545

546-
const userPrompt = widget.getInput();
547-
widget.setInput();
548546

549547
const chatModel = widget.viewModel?.model;
550548
if (!chatModel) {
551549
return;
552550
}
551+
552+
const userPrompt = widget.getInput();
553+
if (!userPrompt) {
554+
return;
555+
}
556+
557+
widget.input.acceptInput(true);
558+
553559
const chatRequests = chatModel.getRequests();
554560
const defaultAgent = chatAgentService.getDefaultAgent(ChatAgentLocation.Panel);
555561

@@ -775,7 +781,11 @@ export class CancelAction extends Action2 {
775781
icon: Codicon.stopCircle,
776782
menu: [{
777783
id: MenuId.ChatExecute,
778-
when: ContextKeyExpr.and(ChatContextKeys.isRequestPaused.negate(), ChatContextKeys.requestInProgress),
784+
when: ContextKeyExpr.and(
785+
ChatContextKeys.isRequestPaused.negate(),
786+
ChatContextKeys.requestInProgress,
787+
ChatContextKeys.remoteJobCreating.negate()
788+
),
779789
order: 4,
780790
group: 'navigation',
781791
},

0 commit comments

Comments
 (0)