Fix events display issue and implement expando UI #15
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.
Problem
Events weren't displaying properly in the UI due to several issues:
event.typebut the API returnsevent.kindevent.messageandevent.contentproperties, but different event types have different structures:MessageEventhasllm_message.contentarrayActionEventhasactionobjectObservationEventhasobservationpropertyThis resulted in empty event boxes being displayed instead of actual event content.
Solution
🔧 Fixed Event Display Logic
event.typetoevent.kindto match API responsegetEventDisplayContent()utility function to properly extract displayable content from different event typesMessageEvent,ActionEvent,ObservationEvent,AgentErrorEvent,SystemPromptEvent, andPauseEvent🎨 Implemented Expando UI
🏗️ Enhanced Type Definitions
MessageEvent,ActionEvent,ObservationEvent, etc.)🎯 UI Improvements
Testing
Files Changed
src/types/base.ts- Enhanced event type definitionssrc/index.ts- Updated exports for new event typesexample/src/components/ConversationManager.tsx- Fixed event display logic and implemented expando UIScreenshots
The UI now properly displays events with their actual content instead of empty boxes, and provides a clean expando interface for viewing event history.
Note: This PR fixes a critical UI issue where events were not displaying properly, making the conversation interface much more usable for debugging and monitoring agent interactions.
@rbren can click here to continue refining the PR