baconbao/dsh-mermaid-image-preview
A DeepSeek Harness Plugin for Previewing Mermaid Diagram by Images in Chat Sessions
Renders Mermaid diagrams as images in the DSH Web chat when a message contains a mermaid or mmd fenced code block. It renders locally with a built-in renderer first and can fall back to an external or self-hosted rendering engine through configuration; the rendered diagram appears as a thumbnail that enlarges in place on click (the same element toggles) rather than in a popup, and light/dark themes follow the UI automatically. Fourteen diagram types render locally out of the box (flowchart, sequenceDiagram, classDiagram, stateDiagram, erDiagram, pie, journey, gitGraph, requirementDiagram, timeline, quadrantChart, packet-beta, xychart-beta), with expanded types (gantt, mindmap, block-beta, sankey-beta, architecture-beta, zenuml, C4Context) available when the fallback is enabled. Fallback options are enableLocalRender, fallbackRenderUrl (default https://mermaid.ink) and enableFallback.
Install
npx @deepseek-ai/dsh plugin --profile web add github:baconbao/dsh-mermaid-image-preview#latestREADME install block quoted verbatim (#latest, with #<VERSION_TAG|GIT_TAG> and #dev variants documented too). Verified live 2026-09-13: the latest GitHub release is v0.3.2. A registry check returns 404 for both @baconbao/dsh-mermaid-image-preview and dsh-mermaid-image-preview, so no npm claim is made. The README also documents a source install (clone, pnpm install, dsh plugin --profile web add .) and notes that you must restart dsh web after installing. From v0.2.0 the plugin/package id changed from dsh-mermaid-image-preview to @baconbao/dsh-mermaid-image-preview, and uninstall is dsh plugin --profile web remove @baconbao/dsh-mermaid-image-preview.
Compatibility
A DSH Web plugin that mounts at the conversation.chat.turnTail chain slot, described in the README as additive — it never shadows shipped UI. Runtime settings are adjustable from the Plugins settings page and stored in localStorage, applied immediately across all sessions without a restart; profile-level rendering options are edited in cordis.patch.yml (e.g. ~/.dsh/profiles/web/cordis.patch.yml) and do require a restart.
Details
- Repo: baconbao/dsh-mermaid-image-preview
- Category: UI Enhancements
- Stars: 2
- Version: GitHub release v0.3.2 (verified 2026-09-13); package id changed to @baconbao/dsh-mermaid-image-preview in v0.2.0
- Last push: 2026-08-16
- First seen: 2026-08-15
Recent updates
The README documents the v0.2.0 package-id change and points at the repository's release badge; the latest release verified on 2026-09-13 is v0.3.2. Check the release page for notes.
FAQ
- How do I install it?
- The README's install block is npx @deepseek-ai/dsh plugin --profile web add github:baconbao/dsh-mermaid-image-preview#latest, then restart dsh web — pinned and #dev variants are documented too.
- Does it need an external rendering service?
- No — diagrams render locally by default; the fallback server (default https://mermaid.ink) is only used when enableFallback is turned on, which is also how the expanded diagram types become available.
- Why did the package name change?
- The README notes that since v0.2.0 the plugin/package id changed from dsh-mermaid-image-preview to @baconbao/dsh-mermaid-image-preview, which is also the name to use when removing it.
Alternatives
AKS1st/dsh-mermaid · lj970926/dsh-plugin-mermaid · GitHubJiKe/dsh-markdown-preview