DSH Plugins Marketplace

DSH Plugins

Plugins

/

Terminal & Clients

/

dsh-mermaid

d

dsh-mermaid

Manifest valid

Mermaid flowchart rendering (ported from pi-mermaid)

UI (client)hasBundlePatch

🧜‍♀️ dsh-mermaid

在 DeepSeek Harness 的 web client 里,把对话中的 ```mermaid 围栏代码渲染成 SVG 流程图。

dsh-plugin license pi-mermaid upstream

English · 中文

中文

这是一个移植(port)自 pi-mermaid(MIT,Gurpartap Singh)的 DeepSeek Harness 插件。 上游在 Pi 的 TUI 里把 Mermaid 渲染成 ASCII 图;dsh 没有 TUI 渲染器,所以本移植把同一套解析与校验逻辑接到 dsh 的 web client,渲染成 SVG 图。上游文字是英文而受众是中文使用者——「100% 原样复制」规则禁止翻译,这里照实说明。

功能

  • 🖼️ 对话中出现 ```mermaid 围栏(无论用户还是助手发送)时,自动渲染成 SVG 流程图
  • ✅ 用 Mermaid 官方 parser 做语法校验,出错时在图下方显示 warning / error
  • 📐 支持 graph / flowchart、sequenceDiagram、classDiagram、erDiagram、stateDiagram(-v2)
  • 🗜️ 超大代码块(>400 行或 >20000 字符)自动跳过并提示
  • 📚 每张图附带可折叠的源码块;/mermaid 命令手动重渲染最后一条助手消息
  • 🧠 按 (session, turn) 缓存渲染结果,重复内容不重复计算

效果

对话里的

```mermaid
graph TD
  Start --> End
```

会变成一张真正的 SVG 流程图(而不是代码块)。sequenceDiagram、classDiagram 等类型同样支持。

安装

⚠️ 尚未发布到 npm。以下二选一:

  • 本地路径:先 npm install 再 dsh plugin add ../dsh-mermaid
  • GitHub 源码:dsh plugin add github:GongYuanCaiJi/dsh-mermaid(需要 allowBuilds 允许 prepare 构建)
# 本地路径安装(装进内置的 web profile,即 dsh 的网页客户端)
cd dsh-mermaid && npm install
dsh plugin --profile web add ../dsh-mermaid
dsh --profile web

# 或 GitHub 源码安装
dsh plugin --profile web add github:GongYuanCaiJi/dsh-mermaid
dsh --profile web

安装后在 web client 里发送一段包含 ```mermaid 围栏的消息,图就会出现在该轮对话的末尾。

使用

方式说明
自动渲染对话中出现 ```mermaid 围栏(用户或助手)即自动渲染
/mermaid 命令手动渲染最后一条助手消息里的 Mermaid 围栏

移植说明

  • 核心逻辑(围栏提取、类型白名单、哈希缓存、parser 校验、issue 报告)逐行移植自 pi-mermaid@0.3.0(MIT)
  • 适配点:dsh 入口形状({ name, apply });ctx.on('session/event') 取代 pi.on('input'/'agent_end');renderMermaidSVG 取代 renderMermaidAscii(同一个 beautiful-mermaid 包);TUI 渲染器改为 web client 槽(turnTail slot)
  • 上游依赖 beautiful-mermaid 与 Mermaid,本移植保留
  • 逐字保留与差异的完整清单见 THIRD_PARTY_NOTICES.md

喜欢这个插件的话,也请给上游 pi-mermaid 一个 star ⭐

许可证

MIT © 2026 Gurpartap Singh (pi-mermaid) · © 2026 GongYuanCaiJi (dsh port)


English

A DeepSeek Harness plugin that renders ```mermaid fenced blocks in chat as SVG diagrams in the web client.

This is a port of pi-mermaid (MIT, by Gurpartap Singh). Upstream renders Mermaid as ASCII art inside Pi's TUI; dsh has no TUI renderer, so this port keeps the same parsing/validation logic and renders SVG diagrams in the dsh web client instead. The README is bilingual because the upstream text is English while the audience is Chinese — the "copy 100% verbatim" rule forbids translation, so this note states it plainly.

Features

  • 🖼️ Auto-renders ```mermaid fences (from user or assistant messages) as SVG diagrams
  • ✅ Syntax-validated by Mermaid's official parser; warnings/errors shown under the diagram
  • 📐 Supports graph / flowchart, sequenceDiagram, classDiagram, erDiagram, stateDiagram(-v2)
  • 🗜️ Oversized blocks (>400 lines or >20000 chars) are skipped with a notice
  • 📚 Each diagram ships a collapsible source block; /mermaid command re-renders the last assistant message
  • 🧠 Results are cached per (session, turn); repeats are not re-rendered

Demo

A chat message containing

```mermaid
graph TD
  Start --> End
```

becomes a real SVG flowchart instead of a code block. sequenceDiagram, classDiagram and friends work the same way.

Install

⚠️ Not published to npm yet. Pick one:

  • Local path: npm install first, then dsh plugin add ../dsh-mermaid
  • GitHub source: dsh plugin add github:GongYuanCaiJi/dsh-mermaid (needs allowBuilds so prepare can build)
# local path (installs into the built-in `web` profile, the dsh web client)
cd dsh-mermaid && npm install
dsh plugin --profile web add ../dsh-mermaid
dsh --profile web

# or GitHub source
dsh plugin --profile web add github:GongYuanCaiJi/dsh-mermaid
dsh --profile web

After installing, send a message containing a ```mermaid fence in the web client — the diagram appears at the end of that turn.

Usage

WayDescription
AutoAny ```mermaid fence in chat (user or assistant) renders automatically
/mermaidManually render Mermaid fences in the last assistant message

Port notes

  • Core logic (fence extraction, type allowlist, hash cache, parser validation, issue reporting) is ported line-for-line from pi-mermaid@0.3.0 (MIT)
  • Adaptations: dsh entry shape ({ name, apply }); ctx.on('session/event') instead of pi.on('input'/'agent_end'); renderMermaidSVG instead of renderMermaidAscii (same beautiful-mermaid package); the TUI renderer became a web client slot (turnTail)
  • Upstream dependencies beautiful-mermaid and Mermaid are kept
  • The full verbatim/diff inventory lives in THIRD_PARTY_NOTICES.md

If you like this plugin, please also star the upstream pi-mermaid ⭐

License

MIT © 2026 Gurpartap Singh (pi-mermaid) · © 2026 GongYuanCaiJi (dsh port)

Comments

Loading…

From the same category

dsh-TUI

by ccch1mneyyy

DSH 官方公众号收录的 TUI 补位插件:Claude Code 风,鲸鱼顶栏/实时状态/流式思考/双击 Esc 回滚/上下文进度+TPS。npm 一键装。 DSH official WeChat featured TUI plugin — Claude Code style: whale bar, live status, streaming thoughts, double-Esc rol

Terminal & ClientsManifest valid

★ 4.3k

↓ 10.9k/wk

MIT

TypeScript

Oct 11, 2026

dsh plugin --profile terminal add @deepseek-harness-tui/dsh-tui

by strukto-ai

The World's First Virtual Terminal for AI Agents

Terminal & ClientsManifest valid

★ 3.7k

↓ 355/wk

Apache-2.0

TypeScript

Oct 11, 2026

dsh plugin --profile agent add @struktoai/mirage-dsh

by bowenliang123

The best DeepSeek Harness plugin for context insight and management, with context dashboard / browser / sidebar and context command, for context statistics, composition, breakdown, evolution details,

Tools & CapabilitiesTerminal & ClientsUI & ExperienceManifest valid

★ 2k

↓ 34.4k/wk

Apache-2.0

TypeScript

Oct 11, 2026

dsh plugin --profile web add dsh-context

by huiliyi37

官方 DeepSeek Harness 的交互式终端 UI 插件:自研 ANSI 极简交互渲染、流式 Markdown/工具卡、16+ 主题、slash 命令与选择器、输入历史与本地偏好持久化、LSP 诊断、memory记忆,很丝滑的开发体验。

Terminal & ClientsManifest valid

★ 287

↓ 462/wk

Apache-2.0

TypeScript

Sep 30, 2026

dsh plugin --profile terminal add @huiliyi37/dsh-tianshu-tui

by Hilbert-beinghappy

面向 DeepSeek Harness 的 Claude Code 风格终端界面,支持 Windows、macOS 与 Linux,兼容透明终端、VS Code 主题和自定义配色。

Terminal & ClientsManifest valid

★ 197

↓ 108/wk

MIT

TypeScript

Oct 1, 2026

dsh plugin --profile web add seektty

by T-Auto

deepseek-harness Plugin Access and Implementation Standards / deepseek-harness交互生态插件规范与实施标准

Terminal & Clients

★ 83

MIT

JavaScript

Oct 10, 2026

Index only — not installable