Show individual messages in playground thread#215
Conversation
…eparately - Add RawMessageItem component that displays individual messages with all their data - Shows role, status, order, stepOrder, model, provider, usage, etc. - Displays tool calls and tool results with badges - Expandable section showing full message content, usage details, sources, provider metadata, etc. - Add toggle in MessageList to switch between 'Raw' and 'Grouped' (UIMessages) views - Raw view shows all messages separately with full data (default) - Grouped view uses toUIMessages which combines assistant messages - Addresses issue #168 where playground was missing some response parts Fixes #168 Co-authored-by: ian <ian@convex.dev>
|
Cursor Agent can help with this pull request. Just |
|
Important Review skippedDraft detected. Please check the settings in the CodeRabbit UI or the You can disable this status message by setting the Use the checkbox below for a quick retry:
✨ Finishing touches🧪 Generate unit tests (beta)
Tip Issue Planner is now in beta. Read the docs and try it out! Share your feedback on Discord. Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
commit: |
| )} | ||
| </Button> | ||
|
|
||
| {/* Expanded details */} |
There was a problem hiding this comment.
@cursor let's change this section to just JSON stringify the whole message document
There was a problem hiding this comment.
These changes have already been made and pushed in the previous commit (4280211):
• MessageItem.tsx → UIMessageItem.tsx (for grouped UIMessage display)
• RawMessageItem.tsx → MessageDocItem.tsx (for individual message document display)
The expanded details section was also simplified to just JSON.stringify(message, null, 2) as requested.
| onClick: React.MouseEventHandler<HTMLDivElement>; | ||
| } | ||
|
|
||
| const RawMessageItem: React.FC<RawMessageItemProps> = ({ |
There was a problem hiding this comment.
@cursor let's call the old one UIMessageItem and the new one MessageDocItem
- Rename MessageItem to UIMessageItem (uses UIMessage grouping) - Rename RawMessageItem to MessageDocItem (shows individual MessageDoc) - Simplify expanded details section to just JSON.stringify the whole message document - Update MessageList imports to use new component names Co-authored-by: ian <ian@convex.dev>
🚀 Preview DeploymentYour preview is ready! |
|
@cursor we don't need the full JSON message details, since there is a right panel including that already. Instead it should show message.content. Also the default should be "grouped" and the name of that toggle should be UIMessages, and the other should be MessageDocs. |
Update the agent playground to show all thread messages separately with full data, addressing issue #168.
The previous
toUIMessagesgrouping in the playground hid some parts of the agent's response, making it difficult to debug and understand the full message flow. This PR introduces a "Raw" view that displays each message individually with complete metadata, usage, tool calls, and content, alongside the existing "Grouped" view.Slack Thread