You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[FEATURE]: Interactive /visualize command with multi-target diagramming #48585
I have verified this feature I'm about to request hasn't been suggested before.
Describe the enhancement you want to request
Feature hasn't been suggested before.
I have verified this feature I'm about to request hasn't been suggested before.
Describe the enhancement you want to request
Problem
When discussing complex distributed systems, execution lifecycles, or relational schemas, agents either dump 150+ lines of raw Mermaid/ASCII into the terminal or produce dense walls of text that are hard to visualize.
Proposal
Add an intent-aware /visualize command (opencode visualize) with an interactive confirmation step before rendering:
Confirmation Loop: Prompts the user with @clack/prompts to pick the target output (browser, terminal, ascii, file, or skip).
CLI HTML Artifact: Whenever run in CLI, generates an interactive dark-mode HTML canvas (.opencode/artifacts/visualize-*.html) with Mermaid.js, pan/zoom controls, and SVG download, presenting the clickable link to the user.
Related, but a different piece of the problem — filing for the plugin/chat-timeline case so it does not get lost here.
This issue is about a CLI /visualize command that writes an HTML file and gives a clickable link. My gap is narrower and lower-level: when a plugin tool returns an HTML artifact, the Desktop chat has no way to render it inline.
For reference, in 2.1.2 the chat renders assistant markdown through DOMPurify whose html profile includes neither iframe nor script, and tool-result file parts are not rendered in the message at all — the bubble renders only text, reasoning and tool parts. The only live HTML rendering is the Files-panel artifact viewer (blob-URL iframe, sandbox="allow-scripts ...").
Activity
github-actions commentedon Sep 12, 2026
This issue might be a duplicate of existing issues. Please check:
If your request overlaps with any of these, please consider commenting there instead of opening a new issue.
teodor-georgiev commentedon Oct 21, 2026
Related, but a different piece of the problem — filing for the plugin/chat-timeline case so it does not get lost here.
This issue is about a CLI
/visualizecommand that writes an HTML file and gives a clickable link. My gap is narrower and lower-level: when a plugin tool returns an HTML artifact, the Desktop chat has no way to render it inline.For reference, in 2.1.2 the chat renders assistant markdown through DOMPurify whose
htmlprofile includes neitheriframenorscript, and tool-result file parts are not rendered in the message at all — the bubble renders onlytext,reasoningandtoolparts. The only live HTML rendering is the Files-panel artifact viewer (blob-URL iframe,sandbox="allow-scripts ...").Filed as #57818.
neriousy commentedon Oct 21, 2026
Thanks for the suggestion. You can set this up yourself as a custom command (https://opencode.ai/v2/docs/commands), a custom agent (https://opencode.ai/v2/docs/agents) or a skill (https://opencode.ai/v2/docs/skills), and share it with others that way. We're not planning to build this specific workflow into opencode. Native Mermaid rendering in the TUI is tracked separately in #40508. Closing as not planned.