Skip to content

🪲 BUG-#28: Last assistant message missing after a tool call - #29

Merged
FernandoCelmer merged 5 commits into
masterfrom
feature/28
Aug 16, 2026
Merged

🪲 BUG-#28: Last assistant message missing after a tool call#29
FernandoCelmer merged 5 commits into
masterfrom
feature/28

Conversation

@FernandoCelmer

Copy link
Copy Markdown
Member

Description

  • media/dom.js — Adds renderedAssistantText, tracking cumulative text actually rendered in the panel across the turn (alongside the existing turnEndSeen).
  • media/chat-turns.jsfinishAssistantTurn() appends the closed bubble's rawText into renderedAssistantText.
  • media/app.js / media/composer.jsdone no longer discards its fallback outright when turnEndSeen is true. It diffs message.text (the full cumulative answer from the RPC response) against renderedAssistantText and flushes only the un-rendered remainder, resetting both trackers per turn.

Motivation and Context

turnEndSeen was a plain boolean, set once on the chat/turnEnd notification fired before a tool call and never reset until the turn's done event. When the trailing segment after a tool call never streamed via chat/textDelta — only arriving in the final RPC response textdone's fallback was forced to undefined, silently dropping the last assistant message with no bubble ever created for it.

Closes #28.

Types of changes

  • Bug fix (change that fixes an issue)
  • New feature
  • Documentation

Checklist

  • I have performed a self-review of my own code
  • I have added tests that prove my fix is effective
  • I have updated the CHANGELOG
  • I have updated the documentation accordingly

@FernandoCelmer FernandoCelmer left a comment

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

placeholder

Comment thread media/app.js Outdated
Comment thread media/app.js
@FernandoCelmer FernandoCelmer added the bug Something isn't working label Aug 16, 2026
Comment thread media/app.js Outdated
Comment thread media/app.js
@FernandoCelmer
FernandoCelmer merged commit 68ff7af into master Aug 16, 2026
2 checks passed
@FernandoCelmer
FernandoCelmer deleted the feature/28 branch August 16, 2026 03:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Last assistant message missing after a tool call

1 participant