Skip to content

Comments

fix(transport): filter whitespace-only AI text responses#759

Open
gspencergoog wants to merge 1 commit intoflutter:mainfrom
gspencergoog:filter_whitespace
Open

fix(transport): filter whitespace-only AI text responses#759
gspencergoog wants to merge 1 commit intoflutter:mainfrom
gspencergoog:filter_whitespace

Conversation

@gspencergoog
Copy link
Collaborator

@gspencergoog gspencergoog commented Feb 24, 2026

Description

Modify A2uiTransportAdapter and A2uiAgentConnector to trim incoming text parts from the AI model and discard any that are empty or consist only of whitespace. This prevents the UI from rendering empty messages or trailing newlines when the model responds with whitespace chunks.

Fixes #736

Modify `A2uiTransportAdapter` and `A2uiAgentConnector` to trim
incoming text parts from the AI model and discard any that
are empty or consist only of whitespace. This prevents the
UI from rendering empty messages or trailing newlines when the
model responds with whitespace chunks.
Copy link
Contributor

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

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

Code Review

The changes effectively address the issue of whitespace-only AI text responses by trimming and filtering them out in both A2uiTransportAdapter and A2uiAgentConnector. This prevents the UI from rendering undesirable empty messages or trailing newlines, improving the overall user experience and data cleanliness.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Extra newlines and blank text responses returned by Conversation

1 participant