Skip to content

Commit 60f3e83

Browse files
roblourensCopilot
andauthored
chat: queue/steer falls back to normal send when idle (#309324)
Chat queue/steer: fall back to normal send when no request is active When the queue or steer action is invoked but no request is in progress, send the message as a normal chat message instead of silently doing nothing. Relaxes the precondition and Alt+Enter keybinding so the actions remain reachable even after the session finishes, while keeping the Enter keybinding gated behind queuingActionsPresent so it doesn't conflict with the regular submit action. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
1 parent 78e3397 commit 60f3e83

1 file changed

Lines changed: 14 additions & 10 deletions

File tree

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

Lines changed: 14 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -67,14 +67,10 @@ export class ChatQueueMessageAction extends Action2 {
6767
f1: false,
6868
category: CHAT_CATEGORY,
6969

70-
precondition: ContextKeyExpr.and(
71-
queuingActionsPresent,
72-
ChatContextKeys.inputHasText,
73-
),
70+
precondition: ChatContextKeys.inputHasText,
7471
keybinding: [{
7572
when: ContextKeyExpr.and(
7673
ChatContextKeys.inChatInput,
77-
queuingActionsPresent,
7874
effectiveDefaultIsSteer,
7975
),
8076
primary: KeyMod.Alt | KeyCode.Enter,
@@ -103,6 +99,12 @@ export class ChatQueueMessageAction extends Action2 {
10399
return;
104100
}
105101

102+
// If no request is in progress, send as a normal message instead of queuing
103+
if (!widget.viewModel.model.requestInProgress.get()) {
104+
widget.acceptInput();
105+
return;
106+
}
107+
106108
widget.acceptInput(undefined, { queue: ChatRequestQueueKind.Queued });
107109
}
108110
}
@@ -118,10 +120,7 @@ export class ChatSteerWithMessageAction extends Action2 {
118120
icon: Codicon.arrowUp,
119121
f1: false,
120122
category: CHAT_CATEGORY,
121-
precondition: ContextKeyExpr.and(
122-
queuingActionsPresent,
123-
ChatContextKeys.inputHasText,
124-
),
123+
precondition: ChatContextKeys.inputHasText,
125124
keybinding: [{
126125
when: ContextKeyExpr.and(
127126
ChatContextKeys.inChatInput,
@@ -133,7 +132,6 @@ export class ChatSteerWithMessageAction extends Action2 {
133132
}, {
134133
when: ContextKeyExpr.and(
135134
ChatContextKeys.inChatInput,
136-
queuingActionsPresent,
137135
effectiveDefaultIsQueue,
138136
),
139137
primary: KeyMod.Alt | KeyCode.Enter,
@@ -154,6 +152,12 @@ export class ChatSteerWithMessageAction extends Action2 {
154152
return;
155153
}
156154

155+
// If no request is in progress, send as a normal message instead of steering
156+
if (!widget.viewModel.model.requestInProgress.get()) {
157+
widget.acceptInput();
158+
return;
159+
}
160+
157161
widget.acceptInput(undefined, { queue: ChatRequestQueueKind.Steering });
158162
}
159163
}

0 commit comments

Comments
 (0)