Asuta / dsh-asuta-mermaid-renderer
DSH CDX Plus · npm: dsh-asuta-cdx-plus · Codex-inspired DSH 增强合集:选中引用、侧边对话、Git 工作树、代码审查,18 项功能独立启停。
About this plugin
Written by the registry from verified metadata, not from the README.
dsh-asuta-mermaid-renderer is a DSH plugin published from the packages/dsh-mermaid-renderer package in the Asuta/dsh-cdx-plus repository.
Capabilities and topics
Mermaid 图表渲染
在 DSH 助手回复中,把带有 Mermaid 语言标记的代码块或以 Mermaid 图表声明开头的代码块渲染成图表。点击「查看源码」可切回原代码,渲染失败时原代码会保留。
Mermaid 渲染引擎随插件一起打包,不使用 CDN 或在线服务,因此断网时也能渲染。只处理助手回复中的代码块,不处理用户消息。支持 Mermaid 12 提供的图表语法。
安装
在本机开发仓库中安装:
dsh plugin --profile web add <插件目录>
启用后刷新 DSH 网页。示例:
flowchart TD
A[开始] --> B{完成了吗?}
B -- 是 --> C[结束]
B -- 否 --> A
开发
pnpm install
pnpm build
pnpm test
lib/client.js 是内嵌 Mermaid 运行时的浏览器产物。更新依赖或 src/ 后运行 pnpm build。运行时使用 Mermaid strict 安全模式,不加载远程脚本。
Badge
Listed here? Link back with this badge — paste the snippet into your repository README.
[](https://dsh-plugin.com/plugins/Asuta/dsh-cdx-plus/packages/dsh-mermaid-renderer)