sijidoubi/dsh-plugin-mermaid

Plugin ⭐ 1 MIT browsertools

DeepSeek Harness (dsh) plugin: mermaid_render tool renders Mermaid source to SVG in-process (mermaid 11 + jsdom, no browser needed)

Install

`width`/`height` 来自最终 viewBox(像素)。`url` 是 dsh Web 服务器托管的
绝对 http 地址(Web 聊天的 markdown 渲染器只显示 http(s) 图片,模型把这张
图嵌进回答后用户就能直接看到);无 Web 服务器时(headless 运行)`url` 缺失,
用 `dataUri` 作为兜底。渲染失败时工具以 `isError` 返回,错误消息包含 Mermaid
解析器给出的行号和期望 token,方便模型自己修图重试。

**模型看到的内容**(render):一行摘要 + 可嵌入回答的图片
(优先 `![title](<url>)`,无 url 时退回 data URI)+ 原始 SVG(便于保存到文件)。

## 安装

插件是标准 dsh bundle(npm 包 + `dsh.bundle` 声明 + `cordis.patch.yml` 配置层)。
构建产物在 `lib/`(TypeScript 源码在 `src/`),`prepare` 脚本会从源码构建。

### 从 GitHub 安装(推荐)

Add sijidoubi/dsh-plugin-mermaid to your DSH config (web profile) to enable.

README

Expand full README Collapse

README is empty.