@dsh-external/dsh-mermaid
在 DSH Web 会话消息中将 ```mermaid 代码块渲染为交互式 SVG 图表(懒加载、严格安全)
AI 分析
核心用途是让 DSH 能够直接在聊天界面中渲染流程图、时序图等 Mermaid 图表。适合需要直观查看结构化设计、架构图的用户,具备防拖垮的性能守卫和严格的安全机制。
安装
$
npx -p @deepseek-ai/dsh dsh plugin --profile web add github:AKS1st/dsh-mermaid说明文档
阅读完整 README ↗配置
组合包默认生效以下配置:
- insert:
- id: mermaid
name: '@dsh-external/dsh-mermaid'
config:
theme: auto
maxTextSize: 50000
maxEdges: 2000
securityLevel: strict
| 配置项 | 默认值 | 说明 |
|---|---|---|
theme | auto | 图表主题:auto(跟随亮/暗)、default、dark、neutral、forest、base |
maxTextSize | 50000 | 单图文本上限(防超大图拖垮渲染) |
maxEdges | 2000 | 边数守卫 |
securityLevel | strict | 固定为 strict,不接受 loose |
在 profile 的 cordis.patch.yml 里以 - set: 或 - update: 覆盖即可。