D
@moyiyaoyue/dsh-client-ui-mermaid
v0.1.0 · 3 天前发布
Client-only dsh plugin that renders Mermaid fenced code blocks as SVG diagrams in the web UI
README
@moyiyaoyue/dsh-client-ui-mermaid
Client-only dsh plugin that
renders Mermaid fenced code blocks (
mermaid ``) as inline SVG diagrams
in the web UI.
What it does
Watches the conversation DOM for md-code-block elements whose language is
mermaid.
Renders each one to SVG via the Mermaid engine, replacing the plain code body
while keeping the copy button and a 源码 / 收起 source toggle.
Re-renders diagrams when the DSH light/dark theme flips.
Falls back to an inline error message (and keeps the source visible) when the
diagram cannot be rendered.
How it works
The package declares dsh.client.platform = "web", so the client-modules
host scan serves lib/client.js as /plugins/@moyiyaoyue/dsh-clien版本兼容矩阵
| DSH 版本 | 状态 | 说明 |
|---|---|---|
dsh@0.1.0-rc.6 | ✅ 兼容 | cordis patch ✅ |
dsh@0.1.0 | ✅ 兼容 | 标准 patch ✅ |
dsh@0.2.0 | ⚠️ 待验证 | 待实测(API 可能在变) |
dsh@0.3.0+ | ❓ 未知 | 尚未发布 |
💡 兼容矩阵每周末自动跑实测,欢迎 PR 修正
元数据
- License
- MIT
- npm
- @moyiyaoyue/dsh-client-ui-mermaid
- Repo
- git+https://github.com/yichangyaoyue/dsh-client-ui-mermaid.git
- Engines
{}- Weekly DL
- 0
- Monthly DL
- 0
- dsh.bundle
{"client":{"platform":"web","inject":[],"immediately":true}}