chat: combine multiple pending steering messages into single request#299061
Merged
connor4312 merged 2 commits intomainfrom Mar 3, 2026
Merged
chat: combine multiple pending steering messages into single request#299061connor4312 merged 2 commits intomainfrom
connor4312 merged 2 commits intomainfrom
Conversation
When Copilot is running a tool, sending multiple steering messages only sends the first one. The chatbot waits indefinitely for the remaining messages. This fix combines all consecutive pending steering messages into a single request by: - Adding dequeueAllSteeringRequests() to ChatModel to dequeue all consecutive steering messages at the front of the queue - Refactoring processNextPendingRequest() to handle both steering and queued requests through a unified flow that: - Combines multiple steering message texts with \n\n separator - Merges attachments from all steering messages - Re-parses the combined text - Sends as a single request to the agent Fixes #298324 (Commit message generated by Copilot)
Contributor
There was a problem hiding this comment.
Pull request overview
Fixes an issue in the chat request queue where multiple pending steering messages (queued while a tool/run is in progress) would not all be sent, causing later steering messages to remain stuck indefinitely. The PR introduces logic to dequeue and coalesce consecutive steering messages into a single outgoing request.
Changes:
- Added
ChatModel.dequeueAllSteeringRequests()to dequeue consecutive steering requests at the front of the pending queue. - Refactored
ChatService.processNextPendingRequest()to combine multiple steering messages (text + attachments) and send them as one request. - Added a unit test covering the “multiple steering messages get combined” behavior.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 4 comments.
| File | Description |
|---|---|
| src/vs/workbench/contrib/chat/test/common/chatService/chatService.test.ts | Adds a test ensuring multiple queued steering messages result in a single follow-up agent invocation. |
| src/vs/workbench/contrib/chat/common/model/chatModel.ts | Adds a helper to dequeue all consecutive steering requests from the front of the queue. |
| src/vs/workbench/contrib/chat/common/chatService/chatServiceImpl.ts | Updates pending-request processing to coalesce consecutive steering requests and resolve all queued deferreds. |
You can also share your feedback on Copilot code review. Take the survey.
src/vs/workbench/contrib/chat/common/chatService/chatServiceImpl.ts
Outdated
Show resolved
Hide resolved
src/vs/workbench/contrib/chat/common/chatService/chatServiceImpl.ts
Outdated
Show resolved
Hide resolved
src/vs/workbench/contrib/chat/test/common/chatService/chatService.test.ts
Outdated
Show resolved
Hide resolved
8c6ec93 to
56a01ef
Compare
aeschli
approved these changes
Mar 3, 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.
When Copilot is running a tool, sending multiple steering messages only sends
the first one. The chatbot waits indefinitely for the remaining messages.
This fix combines all consecutive pending steering messages into a single
request by:
consecutive steering messages at the front of the queue
requests through a unified flow that:
Fixes #298324
(Commit message generated by Copilot)