Repository navigation
Conversation
jerryldh
force-pushed
the
fix/chat-answer-collapse-after-tool
branch
from
October 13, 2026 12:31
a392b0a to
2cdad49
Compare
…xt bubbles A settled 1:1 turn like "answer → edit_file → closing note" was collapsing to only the last text bubble, so the real answer vanished from the transcript as soon as streaming ended (it reappeared only after a history refresh pulled in a merged row). Root cause: `splitAssistantTurn` dropped every pre-tool text fragment whenever *any* completed tool sat between text bubbles. That heuristic is only correct for delegation hand-offs (`ask_agent`), where the pre-tool narration is genuinely superseded by the conclusion — which is exactly what the existing "keeps a 1:1 ReAct conclusion as the answer" test covers. Ordinary tools (read / edit / shell / …) continue the same answer, so their surrounding text must stay joined. - Narrow the collapse condition to `hasCompletedDelegationBetweenTexts` (completed `ask_agent` only), replacing the all-tools check. - Add regressions: an `edit_file` round and a multi-tool round must both keep the full answer, not just the closing sentence. Verified: `vitest run src/pages/Chat/utils/messageGrouping.test.ts` — 25 passed.
jerryldh
force-pushed
the
fix/chat-answer-collapse-after-tool
branch
from
October 13, 2026 12:32
2cdad49 to
e4ea32f
Compare
This branch has not been deployed
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.
Summary
Target branch
develop(feature / fix — default)main(release/*orhotfix/*only)Type of change
Test plan
make allpasses locallyChecklist
CHANGELOG.md(if user-facing)