fix: hide empty messages#54
Open
maxy-shpfy wants to merge 1 commit into
Open
Conversation
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.

TL;DR
Empty agent messages are now filtered out of the chat transcript instead of being rendered as blank bubbles.
What changed?
A new
isEmptyMessageutility was added tomessageState.tsthat identifies agent messages with no content, thinking/reasoning, attachments, or memory. InChatMessageList, messages matching this condition are filtered out before being passed to the virtualizer and scroll hook — unless the message is still actively streaming, in which case it is kept visible since content may still arrive.How to test?
Trigger a workflow or bundle in Prime that yields no output from the agent. Confirm that no blank or empty message bubble appears in the chat transcript. Also verify that a message that begins empty but is still streaming remains visible and renders correctly once content arrives.
Why make this change?
Prime occasionally emits agent messages with no payload (e.g. when a workflow or bundle produces no output). Previously these would render as empty bubbles in the transcript, which is confusing to users. Dropping them entirely keeps the conversation view clean and meaningful.