[Widget] Render agent rich content - #935
Merged
Merged
Conversation
giannagerton
force-pushed
the
gianna/rich-content-buttons
branch
from
August 12, 2026 19:18
0ea58f4 to
694ee7f
Compare
kamilk-11
approved these changes
Aug 13, 2026
added 2 commits
August 13, 2026 12:58
giannagerton
force-pushed
the
gianna/rich-content-buttons
branch
from
August 13, 2026 17:28
694ee7f to
b6cbe7f
Compare
giannagerton
force-pushed
the
gianna/rich-content-buttons
branch
from
August 13, 2026 17:31
b6cbe7f to
73cdfb9
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Adds the widget-side consumer of the
onRichContentSDK callback (#912). Adds rich content rendering to the chat widget. The agent can display components inline in the transcript starting with quick reply buttons. It's inert on merge, since nothing on the server emits the event yet.Starting with buttons rather than cards, for two reasons:
Button types
messagelinkMax 3 buttons per row. Buttons that can run actions directly to follow.
Note
Medium Risk
New user-facing transcript paths and outbound links/message sends, mitigated by strict https-only link validation and safe fallbacks for bad payloads.
Overview
Adds inline rich content in the convai widget transcript, wired from the SDK
onRichContentcallback into newrich_contenttranscript entries and display rows.The first supported component is
buttons: message buttons callsendUserMessagewith the payload text; link buttons use an extendedButton(as="a",outline,target="_blank"). Props are validated withzod/mini(caps, trimming, https-only links); unknown or invalid payloads showrich_content_unavailableinstead of breaking the UI.Display transcript behavior is covered by new tests so rich content stays in arrival order relative to agent replies, tool-status placeholders, and the typing indicator.
Reviewed by Cursor Bugbot for commit 73cdfb9. Bugbot is set up for automated code reviews on this repo. Configure here.