chat: various fixes around queued/steering states#293552
Merged
connor4312 merged 3 commits intomainfrom Feb 7, 2026
Merged
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
This PR refines chat request queueing/steering behavior, especially around editing flows, by preserving attached context for queued requests and tightening UI/action enablement based on whether the user is editing a sent vs queued/steering request.
Changes:
- Preserve
attachedContextwhen queueing requests and when processing queued requests after (de)serialization. - Introduce a new context key (
chatEditingSentRequest/editingRequestType) to distinguish editing a sent request vs a queued/steer request and use it to gate queue/steer/submit actions. - Update the queue/steer picker UI to disable the primary action when input is empty and adjust related labels/styles.
Reviewed changes
Copilot reviewed 8 out of 8 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| src/vs/workbench/contrib/chat/common/chatService/chatServiceImpl.ts | Propagates attached context into queued request models and reconstructs send options when dequeuing. Updates queue branching in sendRequest. |
| src/vs/workbench/contrib/chat/common/actions/chatContextKeys.ts | Adds an editing request type enum + context key used to distinguish editing states for command gating. |
| src/vs/workbench/contrib/chat/browser/widget/input/chatQueuePickerActionItem.ts | Disables/enables the primary split-button action based on whether the input has text; tweaks labels and registration callback usage. |
| src/vs/workbench/contrib/chat/browser/widget/input/chatInputPart.ts | Tracks editing state + editing request type via context keys to support updated menu/keybinding conditions. |
| src/vs/workbench/contrib/chat/browser/widget/chatWidget.ts | Ensures editing flows set the new context key correctly and adjusts send behavior while editing (pending vs in-flight). |
| src/vs/workbench/contrib/chat/browser/actions/chatQueueActions.ts | Updates queue/steer action preconditions and keybindings based on the new editing request type context. |
| src/vs/workbench/contrib/chat/browser/actions/chatExecuteActions.ts | Allows submit while editing a sent request (even if a request is in progress), using the new context key. |
| src/vs/platform/actions/browser/menuEntryActionViewItem.css | Adds disabled styling behavior for the split-button’s primary action container. |
Comments suppressed due to low confidence (2)
src/vs/workbench/contrib/chat/common/chatService/chatServiceImpl.ts:790
- The early return when
options?.queueis set makes the laterif (options?.queue && hasPendingQueue)block effectively unreachable, soprocessNextPendingRequest()will never be called in that path. This can leave newly-queued requests stuck when there is no in-flight request but there is an existing pending queue (e.g. editing/re-submitting a queued item). Consider restoring the old branching: only queue-and-return when a request is in progress, otherwise enqueue and kickprocessNextPendingRequest()(or just send immediately) when nothing is currently pending.
This issue also appears on line 779 of the same file.
if (options?.queue) {
return this.queuePendingRequest(model, sessionResource, request, options);
} else if (hasPendingRequest) {
this.trace('sendRequest', `Session ${sessionResource} already has a pending request`);
return { kind: 'rejected', reason: 'Request already in progress' };
}
if (options?.queue && hasPendingQueue) {
const queued = this.queuePendingRequest(model, sessionResource, request, options);
this.processNextPendingRequest(model);
return queued;
}
src/vs/workbench/contrib/chat/common/chatService/chatServiceImpl.ts:790
- There are ChatService tests covering queueing while a request is in progress, but this change also affects the case where
options.queueis used while no request is in progress but the model already has pending requests (e.g. editing/resubmitting a queued item). Adding a regression test for that scenario (asserting the queued request is processed viaprocessNextPendingRequest) would help prevent reintroducing stuck-queue behavior.
if (options?.queue) {
return this.queuePendingRequest(model, sessionResource, request, options);
} else if (hasPendingRequest) {
this.trace('sendRequest', `Session ${sessionResource} already has a pending request`);
return { kind: 'rejected', reason: 'Request already in progress' };
}
if (options?.queue && hasPendingQueue) {
const queued = this.queuePendingRequest(model, sessionResource, request, options);
this.processNextPendingRequest(model);
return queued;
}
src/vs/workbench/contrib/chat/browser/widget/input/chatQueuePickerActionItem.ts
Show resolved
Hide resolved
TylerLeonhardt
approved these changes
Feb 7, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
See individual commits