Skip to content

Conversation

@xomanova
Copy link
Contributor

Fix and tests for #735 (comment)

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
@vercel
Copy link

vercel bot commented Nov 28, 2025

@xomanova is attempting to deploy a commit to the CopilotKit Team on Vercel.

A member of the Team first needs to authorize it.

@contextablemark
Copy link
Collaborator

contextablemark commented Nov 28, 2025

@maxkorp @tylerslaton It looks like there's still an issue with the Github secrets and running the e2e tests against a PR submitted from an outside fork; there's no other reason for all the tests to be failing.

Copy link
Collaborator

@contextablemark contextablemark left a comment

Choose a reason for hiding this comment

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

@xomanova I don't know whether you have the ability to merge PRs in this repo or not, so I went ahead and merged after running the tests in a separate PR.

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