Preview Mermaid diagrams as images via local rendering in DSH Web when the chat message contains a Mermaid fenced code block, and also allow integration with external rendering servers.
Install
# from GitHub (first run asks for allowBuilds approval — follow the hint, retry)
dsh plugin --profile web add github:baconbao/dsh-mermaid-image-preview
Any plugin you install runs third-party code with your own permissions — it can read your files, use your credentials, and reach the network, and tool approvals don’t sandbox it. GitHub-sourced plugins also run build scripts at install time — pnpm blocks those until you allow them, so an install can stop with ERR_PNPM_GIT_DEP_PREPARE_NOT_ALLOWED or ERR_PNPM_IGNORED_BUILDS; dsh prints the exact key to add under allowBuilds in your profile’s pnpm-workspace.yaml, and the install works on the next run. Allowing a build is a trust decision: only install sources you trust, and pin a commit (github:owner/repo#sha).
README
A DeepSeek Harness Plugin for Previewing Mermaid Diagram Images
Preview Mermaid syntax as images via local rendering in DSH when a chat message contains a Mermaid fenced code block (```mermaid or ```mmd).

Features and how it works
- Preview mermaid diagrams by rendering images directly!
- Local renderer first! If it fails, it can fall back to an external or self-hosted rendering engine by configuring a fallback server.
- Nothing gets replaced: the preview is added below the agent's reply, so the original messages are not covered up or changed.
- Settings in Plugin page: adjust the plugin's runtime settings in the Plugins panel - no restart needed.
- Light/dark themes follow the UI automatically.
Support diagram types
The plugin renders diagrams locally with a built-in renderer. It supports 13 diagram types out of the box.
Rendered locally: flowchart, sequenceDiagram, classDiagram, stateDiagram, erDiagram, pie, journey, gitGraph, requirementDiagram, timeline, quadrantChart, packet-beta, xychart-beta
Expand: gantt, mindmap, block-beta, sankey-beta, architecture-beta, zenuml, C4Context
[!NOTE] You can enable the fallback to render expanded types — see Configuration below.
Installation
Install from github
Install with DeepSeek Harness Desktop (the desktop profile)
In DeepSeek Harness (Desktop), go to the Plugins panel, click the + Add plugin button, paste one of the URLs below, then click the Install button.
### latest release version
https://github.com/baconbao/dsh-mermaid-image-preview
### specific version
https://github.com/baconbao/dsh-mermaid-image-preview#<VERSION_TAG|GIT_TAG>
### dev version
https://github.com/baconbao/dsh-mermaid-image-preview#dev
[!NOTE] Make sure Git is installed on your machine before installing.
Install with DeepSeek Harness WebUI (the web profile)
### latest release version
$ npx @deepseek-ai/dsh plugin --profile web add github:baconbao/dsh-mermaid-image-preview
### specific version
$ npx @deepseek-ai/dsh plugin --profile web add github:baconbao/dsh-mermaid-image-preview#<VERSION_TAG|GIT_TAG>
### dev version
$ npx @deepseek-ai/dsh plugin --profile web add github:baconbao/dsh-mermaid-image-preview#dev
Install from source code
$ git clone https://github.com/baconbao/dsh-mermaid-image-preview
$ cd dsh-mermaid-image-preview
$ pnpm install
$ dsh plugin --profile web add .
[!IMPORTANT] Restart DSH after installing.
Configuration
Change runtime settings on the plugin page

The Plugins panel lists this plugin under Installed; open its page and the configuration block carries the runtime settings - no restart needed. Values are stored in localStorage and applied immediately across all sessions.
Change render server via configuration file
Diagrams are rendered locally by default. To use your own render server or
enable the external fallback, edit the profile's cordis.patch.yml (e.g.
~/.dsh/profiles/web/cordis.patch.yml for WebUI, or ~/.dsh/profiles/desktop/cordis.patch.yml for Desktop):
- id: ui-dsh-mermaid-image-preview
config:
enableLocalRender: true
fallbackRenderUrl: https://mermaid.ink
enableFallback: false
enableLocalRender: render locally (defaulttrue). Set it tofalseto always use the fallback server (enableFallbackis ignored).fallbackRenderUrl: fallback render server (defaulthttps://mermaid.ink).enableFallback: use the fallback server when local rendering fails (defaultfalse).- Restart DSH after changing these settings.
- To host your own fallback render server, see https://github.com/jihchi/mermaid.ink for the details.
Uninstallation
Unstall with DeepSeek Harness Desktop (the desktop profile)
Open this plugin's page in the Plugins panel, then click Uninstall.
Unstall with DeepSeek Harness WebUI (the web profile)
$ dsh plugin --profile web remove @baconbao/dsh-mermaid-image-preview
[!NOTE] Since v0.2.0, the plugin/package ID has been
@baconbao/dsh-mermaid-image-preview(it wasdsh-mermaid-image-previewbefore).
Test
Ask the agent to produce:
```mermaid
graph TD
A[Start] --> B{Success?}
B -->|Yes| C[Done]
B -->|No| D[Retry]
```
Compatibility
| This plugin version | Supported DSH version |
|---|---|
| v0.4.0 and later | 0.1.6-alpha.2 and later |
| v0.3.2 and earlier | 0.1.0-rc.6 – 0.1.6-alpha.1 |
Author
baconbao, vibe coding with AI
License
Links
More in this category
tt-a1i/archify#integrations/deepseek-harness★ 96245
Generate validated, self-contained interactive architecture, workflow, sequence, data-flow, and lifecycle diagrams from repositories or system descriptions.
dream-num/dsh-univer-office★ 717
Give DeepSeek Harness a real office environment. Univer Office Plugin brings spreadsheets, docs, slides, canvases, relational tables, and more into one runtime — with connected data, validation, versioned changes, and isolated worktrees for multi-agent collaboration.
Roland0511/dsh-marktext★ 604
WYSIWYG Markdown editor in the DSH right sidebar, built on MarkText's muya engine: open a .md file, edit it as a rendered document, and save back through ctx.fs with a version guard.
ECNU/EduWork#dsh-knowledge-studio★ 354
A workspace-based Studio for source-grounded reports, slides, tables, mind maps, quizzes, flashcards, audio and video, using DSH models and shared artifact services. Office generation requires Python 3.12+ with its dependencies and DSH_OFFICE_PYTHON configured; media rendering requires Chromium, and local ASR additionally requires whisper.cpp and a model.
PerryLink/dsh-industry-research★ 219
Deterministic industry research reports for DeepSeek Harness — company and industry research flows produce structured, verifiable reports from staged evidence.
joeseesun/qiaomu-ui-learn-dsh★ 84
Browse UI design references and interaction examples, take design quizzes, and export learning notes as Markdown.
Community comments
Comments are public GitHub Discussions. Loading them connects to GitHub and Giscus; a GitHub account is required to post.