Skip to content

[FR] Render mermaid diagrams in chat answers (with explicit "Visualize" button) #1240

@wilson101xx

Description

@wilson101xx

The need
PMs and devs on our team frequently ask Sourcebot questions about how
specific services work end-to-end ("show me a visual of X service",
"what's the request flow through Y?"). The answer is always a long
markdown wall, which is great for devs but hard for PMs to skim.

Proposal
Two-path diagram rendering, in V1:

  1. Automatic — teach the agent to emit a ```mermaid fenced block in
    its markdown answer when the user asks for something visual
    (architecture, workflow, sequence). Render it inline in the answer
    card. No new tool, no new stream part type — just a renderer in the
    existing markdown pipeline.
  2. Explicit — add a "Visualize" button to the answer card that re-prompts
    the agent on the existing thread for a diagram view of the answer.

Diagrams render to a clickable inline SVG with a fullscreen pan/zoom
modal. Architecture is registry-based so a future react-flow engine
can be plugged in without changing the markdown wiring.

Version 2
After we have proof that people are using this feature i propose we can create a inline React Flow, where it can be built in, and interactive, drag and drop and clickable

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions