Renders a mermaid code block (```mermaid) as a diagram instead of plain code.
The default CodePartRenderer already turns the fenced block into a CodeChatResponseContent
with language === 'mermaid'. This renderer simply claims those parts with a higher priority and renders
the diagram via MermaidViewer. Anything that cannot be rendered (incomplete stream, invalid
definition) transparently falls back to the regular code view.
Renders a
mermaidcode block (```mermaid) as a diagram instead of plain code.The default CodePartRenderer already turns the fenced block into a CodeChatResponseContent with
language === 'mermaid'. This renderer simply claims those parts with a higher priority and renders the diagram via MermaidViewer. Anything that cannot be rendered (incomplete stream, invalid definition) transparently falls back to the regular code view.