插件目录 / Developer / dsh-mermaid-image-preview
dsh-mermaid-image-preview
未验证 baconbao
功能简介
A DeepSeek Harness Plugin for Previewing Mermaid Diagram by Images in Chat Sessions
未验证 — 尚未实测
A DeepSeek Harness Plugin for Previewing Mermaid Diagram by Images in Chat Sessions 尚未验证——请自行安装测试。
「未验证」表示我们的自动化 CI 尚未安装过该插件。功能描述与版本兼容性均为作者声明。这不是安全审计,也不代表对第三方代码的背书。
README
dsh-mermaid-image-preview
A DeepSeek Harness Plugin for Previewing Mermaid Diagram Images
Preview mermaid syntax as images via local rendering in DSH Web when the 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.
- Setting card: you can adjust runtime settings in the UI - no restart needed.
- Mount point:
conversation.chat.turnTail(chain slot, additive - never
shadows shipped UI). - Thumbnail display: the diagram renders as a thumbnail; click to enlarge in place, click again to shrink back (same element toggles, no popup).
- Light/dark themes follow the UI automatically.
Support diagram types
The plugin renders diagrams locally with a built-in renderer. It supports
14 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
Installation from github
### latest release version
$ npx @deepseek-ai/dsh plugin --profile web add github:baconbao/dsh-mermaid-image-preview#latest
### 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
Installation 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 web after installing.
Configuration
Change runtime settings on setting card

The Plugins settings page (Settings > Plugins) shows a Mermaid image preview card where
you can adjust plugin's runtime settings directly - no restart needed.
Values are stored in localStorage and applied immediately across all sessions.
Change render server by profile patch
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):
- id: ui-dsh-mermaid-image-preview
config:
enableLocalRender: true
fallbackRenderUrl: https://mermaid.ink
enableFallback: false
enableLocalRender: render locally (defaulttrue). Setfalseto 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 web after changing these settings.
- To host your own fallback render server, see https://github.com/jihchi/mermaid.ink for the details.
Uninstallation
$ dsh plugin --profile web remove @baconbao/dsh-mermaid-image-preview
[!NOTE]
Since v0.2.0 the plugin/package id is changed fromdsh-mermaid-image-previewto@baconbao/dsh-mermaid-image-preview.
Test
Ask the agent to produce:
```mermaid
graph TD
A[Start] --> B{Success?}
B -->|Yes| C[Done]
B -->|No| D[Retry]
```
Author
baconbao, vibe coding with deepseek ai
License
安装
装一次目录插件,之后本站所有插件都能让 DeepSeek Harness 自动找、自动装:
dsh plugin add dshbase-catalog 然后对 agent 说「帮我装 dsh-mermaid-image-preview」,它会在目录里找到并自动安装。文档:dshbase-catalog · 已验证场景包。
该插件是 GitHub 源码(未发 npm)——直接从仓库装:
Web profile:
dsh plugin --profile web add github:baconbao/dsh-mermaid-image-preview Headless(CLI)profile:
dsh plugin --profile headless add github:baconbao/dsh-mermaid-image-preview 实测报告
尚未 L3 验证——若已跑过,见下方失败备注。