mirror of
https://github.com/RooVetGit/Roo-Code.git
synced 2026-08-28 05:27:24 +00:00
fix: add missing didCompleteReadingStream check and test assertion
This commit is contained in:
parent
cfb544c0e9
commit
ace2500418
2 changed files with 3 additions and 1 deletions
|
|
@ -237,6 +237,7 @@ describe("presentAssistantMessage - Parallel Tool Execution Timing", () => {
|
|||
// Even if the tool executed, userMessageContentReady should NOT be true
|
||||
// because the stream hasn't completed yet (more content may arrive)
|
||||
// Note: The fix specifically checks both conditions
|
||||
expect(mockTask.userMessageContentReady).toBe(false)
|
||||
})
|
||||
|
||||
it("should handle mcp_tool_use blocks the same as tool_use blocks", async () => {
|
||||
|
|
|
|||
|
|
@ -1029,7 +1029,8 @@ export async function presentAssistantMessage(cline: Task) {
|
|||
// CRITICAL: For parallel tool execution, we must verify all tool results
|
||||
// are collected before signaling ready. Without this check, the message
|
||||
// queue could proceed before all tool_result blocks are in userMessageContent.
|
||||
if (areAllToolResultsCollected(cline)) {
|
||||
// Also verify the stream is complete - more content may still arrive.
|
||||
if (cline.didCompleteReadingStream && areAllToolResultsCollected(cline)) {
|
||||
cline.userMessageContentReady = true // Will allow `pWaitFor` to continue.
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue