🪲 BUG: Fix messages blending together across tool calls - #18
Merged
Conversation
… into one bubble
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.
pycodeloop's
serve.pyhas emitted achat/turnEndnotification after every provider turn since dotflow-io/pycodeloop@fa0689f — but this extension never listened for it.FORWARDED_NOTIFICATIONS(chat.types.ts) didn't include it, so the webview never got a signal to close the current assistant bubble at a tool-call boundary.Symptom: narration text before a tool call (e.g. "Sure, let me check that file:") and the model's final answer after the tool result get concatenated into the same bubble instead of appearing as separate turns — the tool-call card renders as a separate element sandwiched between them, but the text silently merges. Over a multi-tool-call run this reads as the assistant "losing track" of what it's saying.
Root cause:
appendAssistantDeltareuses the existingassistantTurnobject if one is still open. Nothing ever closed it between turns — onlycase "done"did, once, at the very end of the whole run.Fix: forward
chat/turnEnd, handle it by closing the current bubble (finishAssistantTurn()) so the nexttextDeltastarts a fresh one. Added aturnEndSeenflag socase "done"'s fallback-text render (needed for CLI versions older than turnEnd's introduction) doesn't duplicate the last bubble when turnEnd already closed it.Test plan
npm test(43 passed) /npx tsc --noEmit/npm run lintclean