dsh-mermaid
Render Mermaid code fences in DSH Web chat messages as lazy-loaded SVG diagrams with strict sanitization and light/dark theme follow.
把 DSH Web 会话消息中的 Mermaid 代码围栏渲染为惰性加载的 SVG 图表,严格消毒并跟随明暗主题。
How to install
dsh plugin add dsh-mermaid About
dsh-mermaid English 在 DSH Web 会话消息中把 mermaid 代码围栏渲染为 SVG 图表的独立插件,通过 dsh plugin 安装进 web profile。 效果预览 | 亮色主题 · 会话内(未放大) | 暗色主题 · 会话内(未放大) | | --- | --- | | | | | 亮色主题 · 放大浮层 | 暗色主题 · 放大浮层 | | --- | --- | | | | 放大浮层自动适配屏幕(接近全屏、四周留白),滚轮缩放,按住左键/中键可拖动平移;theme: auto 时图表颜色跟随 GUI 亮/暗主题。 工作方式 **Host 半部**(src/index.ts):注册 webServer 前缀路由 /mermaid-dist,从插件自己的 node_modules/mermaid 惰性提供 UMD 构建,并提供固定的 config.json 端点。 **Client 半部**(src/client/):监听会话 DOM,把 infostring 为 mermaid 的围栏渲染为 SVG: 1. 只处理**已定格**的围栏(流式输出期间不渲染); 2. 首次遇到围栏才惰性加载 mermaid(浏览器缓存一次); 3. **视口驱动渲染**:围栏进入视口(带 300px 预加载余量)才开始渲染,滚到哪渲染到哪;还在排队/加载中离开视口…
Recommendation signals
Meta
- License
- MIT
- Language
- TypeScript
- GitHub stars
- 9
- mo. downloads
- 3.3K
- Last push
- 2026-08-18
- Created
- 2026-08-14
Basic safety check
- Findings
- None
- Sources
- curated:awesome-dsh-plugin.com, curated:awesome-dsh-plugin/awesome-dsh-plugin
- Topics
- cordis, deepseek-harness, diagram, dsh, dsh-plugin, markdown, mermaid, plugin
Related plugins
dsh-univer-office
dream-num/dsh-univer-office
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.
archify
tt-a1i/archify/tree/main/integrations/deepseek-harness
Generate validated, self-contained interactive architecture, workflow, sequence, data-flow, and lifecycle diagrams from repositories or system descriptions.
dsh-plugin-mineru
HuanLinOTO/dsh-plugin-mineru
Expose MineRU document parsing tools to the model.
dsh-mermaid
MrmoLabs/dsh-mermaid
Render Mermaid code fences as SVG diagrams with streaming support, diagram/code switching, fullscreen zoom and pan, SVG export, and a bundled same-origin runtime.