feat(chat): render charts and HTML reports in an artifact panel#9
Merged
Conversation
Assistant replies can now produce visual output instead of raw markup. HTML in a fenced ```html block (or an untagged fence whose content is HTML) renders as a CSS/SVG chart or report inside a sandboxed iframe (sandbox="allow-same-origin", no scripts: styles are isolated and the markup's own JS never runs). Rendered output opens in a dedicated artifact panel on the right: the latest chart auto-opens, and inline "Chart" cards reopen any previous one. A new `report` message role plus a session._post_report(html) helper let server-side code push a full report into the conversation. Tool-call chips are now collapsed by default behind a per-message toggle (with a running spinner), reducing noise in long replies. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> Signed-off-by: Ahmed <ahmed@electroon.com>
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.
Assistant replies can now produce visual output instead of raw markup. HTML in a fenced ```html block (or an untagged fence whose content is HTML) renders as a CSS/SVG chart or report inside a sandboxed iframe (sandbox="allow-same-origin", no scripts: styles are isolated and the markup's own JS never runs).
Rendered output opens in a dedicated artifact panel on the right: the latest chart auto-opens, and inline "Chart" cards reopen any previous one. A new
reportmessage role plus a session._post_report(html) helper let server-side code push a full report into the conversation.Tool-call chips are now collapsed by default behind a per-message toggle (with a running spinner), reducing noise in long replies.
What does this PR do?
Type of change
Checklist
tests/(taggedcodexoo) and they pass locallyCHANGELOG.md(bullet under## [Unreleased])SECURITY.mdif this touches a safety-critical path (else N/A)git commit -s→ DCO)CODEX_HOME,CLI glob,
codex_thread_id/codex_item_id)SECURITY.mdare preserved