Renders markdown that may contain ```mermaid fenced blocks, drawing those blocks as diagrams.
The main chat response splits mermaid blocks into their own content parts (via parseContents) which the
MermaidPartRenderer then handles. Other surfaces - such as the user interaction tool - instead render a raw
markdown string directly (via useMarkdownRendering) and never pass through that pipeline, so a mermaid block
would show as plain code. This component bridges the gap by rendering mermaid blocks with the exact same
MermaidViewer component used in the chat (so the diagram looks and behaves identically everywhere), while
leaving all other content to normal markdown rendering.
Renders markdown that may contain ```mermaid fenced blocks, drawing those blocks as diagrams.
The main chat response splits mermaid blocks into their own content parts (via
parseContents) which theMermaidPartRendererthen handles. Other surfaces - such as the user interaction tool - instead render a raw markdown string directly (viauseMarkdownRendering) and never pass through that pipeline, so a mermaid block would show as plain code. This component bridges the gap by rendering mermaid blocks with the exact same MermaidViewer component used in the chat (so the diagram looks and behaves identically everywhere), while leaving all other content to normal markdown rendering.