Skip to content

lj970926/dsh-plugin-mermaid

30Last commit Aug 14, 2026

dsh-plugin-mermaid DSH plugin

A web client plugin for DeepSeek Harness that enhances ```mermaid code blocks with interactive rendering. It provides a toggle between Mermaid source code and rendered SVG, automatic dark/light theme following, and a debounced re-render mechanism for streaming tokens.

How to install the dsh-plugin-mermaid DSH plugin

dsh plugin --profile web add github:lj970926/dsh-plugin-mermaid

Copying does not run this command. Review the repository and version before installing the dsh-plugin-mermaid DSH plugin.

dsh-plugin-mermaid DSH plugin data source

dsh-plugin-mermaid DSH plugin snapshot date: Aug 16, 2026

discovered

What the dsh-plugin-mermaid DSH plugin can do

  • Renders ```mermaid code blocks as interactive SVG diagrams in chat messages.
  • Source/SVG toggle button to switch between Mermaid source and rendered chart.
  • Automatic theme switching: follows DSH's dark/light theme.
  • 500 ms debounce to avoid thrashing during streaming token updates.
  • Native integration with DSH code-block banner (buttons next to Copy).
  • On-demand Mermaid v11 loading from CDN (no bundle bloat).

Where the dsh-plugin-mermaid DSH plugin fits

  • Visualize flowcharts, sequence diagrams, class diagrams, and other Mermaid diagrams directly in DSH chat.
  • Quickly toggle between source code and rendered diagram for debugging or editing.
  • Use with streaming responses: the debounce ensures smooth rendering as tokens arrive.
  • Collaborate on documentation with embedded diagrams that render instantly.

Who the dsh-plugin-mermaid DSH plugin is for

  • DSH users who frequently work with Mermaid diagrams in chat.
  • Developers and technical writers who use DSH for code generation and documentation.

dsh-plugin-mermaid DSH plugin limitations

  • Requires DSH >= 0.1.0-rc.6.
  • Network access to cdn.jsdelivr.net on first render (Mermaid is cached afterwards).
  • Only works in the web client (not terminal or other profiles).
  • The plugin is still early (compatible with v0.1.0-rc.6).

dsh-plugin-mermaid DSH plugin: from the repository README

Quoted from the lj970926/dsh-plugin-mermaid README, the upstream source of the dsh-plugin-mermaid DSH plugin. Copyright remains with the original authors.

A [DeepSeek Harness](https://github.com/deepseek-ai/deepseek-harness) (DSH) web client plugin that renders ` ```mermaid ` code blocks in chat messages, with a **chart ↔ source** toggle and live theme switching. - Mermaid v11 loaded on demand from a CDN (no bundle bloat). - Follows DSH dark/light theme automatically. - 500 ms debounce so streaming tokens don't thrash the renderer. - Native DSH code-block banner integration: buttons sit right next to the built-in **Copy** button; source view keeps Shiki highlight and copy. - Zero build step — the browser entry is hand-written factory-form CJS exactly as DSH's `client-modules` service expects. ## Install ### From GitHub (recommended) This package ships prebuilt `lib/` files and declares `dsh.bundle`, so it can be installed directly into the DSH web profile: ```bash dsh plugin --profile web add github:lj970926/dsh-plugin-mermaid ``` Then restart `dsh web` and hard-refresh the browser (Cmd+Shift+R). To pin a revision for reproducibility, append a commit SHA or tag: ```bash dsh plugin --profile web add github:lj970926/dsh-plugin-mermaid#<commit-or-tag> ``` > Because the published files are already in `lib/`, this package has

Read the full READMERepository license: MIT

dsh-plugin-mermaid DSH plugin questions

How do I install dsh-plugin-mermaid?

Run `dsh plugin --profile web add github:lj970926/dsh-plugin-mermaid` in your terminal. Then restart `dsh web` and hard-refresh your browser (Cmd+Shift+R). If you need a specific version, append a commit SHA or tag, e.g., `#v1.0.0`.

Why is my Mermaid diagram not rendering?

First, ensure your DSH version is >= 0.1.0-rc.6. The plugin relies on network access to cdn.jsdelivr.net on first render; if you are offline, it won't load. Also check that the code block starts with exactly ` ```mermaid ` (no extra spaces). Try the re-render button if the diagram appears broken.

Can I use this plugin with the terminal DSH client?

No, this plugin is specifically for the web client. It uses browser APIs like MutationObserver and DOM manipulation. The terminal client does not support such plugins.

How do I change the Mermaid theme?

The plugin automatically follows DSH's dark/light theme from Settings → Appearance. When you change the theme, all Mermaid blocks are re-rendered with the matching theme. You can also force a re-render using the re-render button on each block.

Does the plugin work with streaming responses?

Yes, it supports streaming. The plugin uses a 500ms debounce to avoid re-rendering on every token. Once the stream stabilizes, the diagram is rendered. If you see an incomplete diagram, wait for the stream to finish or click the re-render button.