Skip to content

Conversation

@contextablemark
Copy link
Collaborator

AG-UI's TextMessageContentEvent validates that delta is non-empty. When ADK yielded events with empty string content, the validation would fail and crash the frontend.

Added early return in _translate_text_content when combined_text is empty, preventing the creation of TextMessageContentEvent with empty delta.

Added comprehensive tests for empty text event handling:

  • test_empty_text_event_does_not_crash
  • test_whitespace_only_text_event_does_not_crash
  • test_multiple_empty_parts_filtered
  • test_mixed_empty_and_valid_parts_filtering
  • test_empty_combined_text_early_return

AG-UI's TextMessageContentEvent validates that delta is non-empty.
When ADK yielded events with empty string content, the validation
would fail and crash the frontend.

Added early return in _translate_text_content when combined_text
is empty, preventing the creation of TextMessageContentEvent with
empty delta.

Added comprehensive tests for empty text event handling:
- test_empty_text_event_does_not_crash
- test_whitespace_only_text_event_does_not_crash
- test_multiple_empty_parts_filtered
- test_mixed_empty_and_valid_parts_filtering
- test_empty_combined_text_early_return
@contextablemark contextablemark merged commit 6cb52c3 into ag-ui-protocol:contextablemark/test745 Nov 28, 2025
11 of 32 checks passed
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.

2 participants