证据快照复核于 2026-09-16GitHub 数据核对日期: 2026-08-21
证据已验证Plugin Bundle文件与文档Web Profile

dsh-drawio

在 DeepSeek Harness Web 侧边栏中预览 .drawio 图表。

快速了解

它能做什么

在 DeepSeek Harness Web 侧边栏中预览 .drawio 图表。

本站提供的是中文说明,不代表该项目或 Plugin 自身提供中文界面;语言支持请以上游文档为准。

使用场景
文件与文档可视化UI文档
适配技术
https
兼容性

Web Profile
Not declared in supplied evidence

可信度与状态

证据已验证
核对日期 2026/9/14 UTC 14:30

有代码证据的贡献

它为 DSH 增加什么

Draw.io 侧边栏预览

在 Web 侧边栏中渲染 .drawio 图,而非显示 mxGraph XML 源码。

机制证据

选择前先看

此 Web 插件会将文件树中的 .drawio 文件渲染为图表,而不是显示原始 mxGraph XML。它支持普通 XML 和压缩的 draw.io 文件;多页面文件仅渲染第一页。

适合谁

需要在不打开外部查看器的情况下检查 draw.io 流程图和图表的 DeepSeek Harness Web 用户。

常见任务

  • 直接在 Web 侧边栏预览 .drawio 文件。
  • 查看压缩或普通的基于 mxGraph 的 draw.io 图表。
  • 在处理项目文件时以可视化方式审阅图表。

权限与数据

提供的 README 将其描述为本地、只读渲染。

权限
  • 添加一个客户端 Web 侧边栏文档预览贡献。
数据处理
  • README 声明文件会在本地解码和渲染。
  • README 声明预览窗接收 SVG data URL,而非活动图表 DOM。

局限

  • 仅支持预览;编辑需要另行安装 dsh-drawioedit。
  • 多页面 <mxfile> 仅渲染第一页。
  • 边线路由和边标签位置可能与 draw.io 不同。
  • 引擎不支持的模板形状会显示为普通矩形。

DSHub 已核对

  • 固定 Git 源及其 DSH bundle patch 已通过结构验证。
  • manifest 声明了 Web 客户端贡献和侧边栏文档预览 peer dependency。
  • 仓库声明 Apache-2.0 许可证。

DSHub 未核对

  • 提供的证据未实际执行安装或运行时行为验证。
  • 未声明 Harness 版本范围。
  • 未找到 npm registry 中对应的包版本。

固定版本安装

安装 dsh-drawio

这个Plugin Bundle没有 DSH Plugin 安装操作,请根据源码文档使用真实交付方式。

访问源码项目

维护者原文

项目 README

查看 commit df09f13 对应的 README
维护者编写的上游内容原文于 2026/9/14README.md 获取,正文和仓库相对媒体固定到 commit df09f13f6f73,内容哈希为 4cd98520ceb4。以下是未经 DSHub 翻译的上游原文,语言可能与当前页面不同;第三方托管的 badge 可能独立更新。

dsh-drawio

English | 中文

A plugin for DeepSeek Harness (DSH) that previews .drawio files as diagrams in the Web Sidebar: open one from the file tree and it renders as the diagram you drew, instead of opening as mxGraph XML source.

A .drawio file rendered as a diagram

Editing needs dsh-drawioedit. The two are independent packages; the limitations below say when this preview is enough.

What it does

  • Read-only and inert. The file is decoded and laid out offscreen; the pane receives an SVG data: URL, never an engine instance or a live DOM, so a diagram's content cannot script the page.
  • Both draw.io save formats. Plain mxGraph XML, and draw.io's compressed body (base64 + raw DEFLATE + percent escape). A multi-page <mxfile> renders its first page.
  • Nothing leaves the machine, and the styling is draw.io's. Rendering is fully local, unlike a hosted viewer. The renderer applies a stylesheet matching draw.io's defaults, so a cell whose style string omits a color does not inherit the storage engine's own palette; a cell's own style still wins.

Install

The built lib/ is committed, so the repository installs and runs with no build step on your machine. dsh plugin adds the dependency and the profile's bundle entry together — do not edit the profile manifest by hand.

# a checkout over HTTPS or SSH, or a local one — pnpm links a local checkout, so a rebuilt
# lib/ reaches the host on the next start
npx @deepseek-ai/dsh plugin --profile web add git+https://github.com/zhang-guo-wen/dsh-drawio.git
npx @deepseek-ai/dsh plugin --profile web add git+ssh://git@github.com/zhang-guo-wen/dsh-drawio.git
npx @deepseek-ai/dsh plugin --profile web add /absolute/path/to/dsh-drawio

# then restart the host
npx @deepseek-ai/dsh web

Remove it, dependency and layer together, with dsh plugin --profile web remove @zhang-guo-wen/dsh-drawio.

The profile must already compose @deepseek-ai/dsh-client-ui-sidebar-documentpreview, which owns the registry this plugin contributes to. Every shipped web profile does.

Known limitations

Edge routing and edge-label placement do not match draw.io. A .drawio file stores an edge's endpoints and its edgeStyle name, but not the path between them:

<mxCell id="e4" style="edgeStyle=orthogonalEdgeStyle;…" edge="1" source="n4" target="n5">
  <mxGeometry relative="1" as="geometry" />   <!-- no points, no label offset -->
</mxCell>

Both viewers therefore compute the bend points and the label position at render time from the same inputs, with different code: draw.io's editor adds its own routing and label-avoidance behaviour on top of the shared engine, and this plugin's engine does not carry it. Where the gap between two nodes is narrower than the label — 50px apart, 66px label — the label cannot clear both boxes without moving a node, and an opaque background would only paint over the text it covers.

Workaround. Drag the label where you want it in draw.io: the editor writes an explicit <mxPoint as="offset"> into the file, which every viewer honours. Widening the gap between the two nodes works equally well. Both fix the diagram at its source rather than in one viewer.

Shapes outside the engine's set are drawn as plain rectangles, never omitted: draw.io ships several hundred stencil shapes and the bundled engine carries a smaller set of its own.

Development

The repository root is the plugin package: its root package.json is @zhang-guo-wen/dsh-drawio. npm install <git-url> and dsh plugin add both package the repository root, so a plugin under packages/* would install as the wrong thing.

npm install
npm run build      # host half via tsdown; browser half via build-client.mjs
npm run typecheck  # tsc against the PUBLISHED @deepseek-ai/* packages
npm test           # loads the built bundle the way the browser does

Re-run npm run build and commit lib/ whenever you change src/.

The harness monorepo builds its client bundles with a script it does not publish, so this repository bundles the browser half itself. platform: 'browser' is set explicitly: under the bundler's node platform, a library whose exports lists a platform condition before import gets its server entry inlined, and that entry can call createRequire('module') at module scope — a require("module") the browser module table cannot answer. Only react and the DSH client packages stay external, so the deployed bundle carries no install-time dependency; npm test loads it with a module table holding nothing else and fails if it asks for more.

License

Apache License 2.0 — see LICENSE. Bundled third-party code is attributed in NOTICE. "draw.io" is a trademark of its owner; this package is not affiliated with or endorsed by draw.io.

有意识地管理

安装与管理

前置条件与目标 Profile

目标 Web Profile

交付方式 Git Bundle — zhang-guo-wen/dsh-drawio#df09f13f6f73cfd0269ee764f986fef3650042bc

验证、更新与移除

显示生命周期命令
验证
dsh plugin --profile web list

兼容性与访问范围

Web profile with the sidebar document-preview dependency Not declared in supplied evidence

检查兼容性证据

风险事实

data-handling

The README states that diagram rendering is fully local and that nothing leaves the machine.

证据
license

Apache-2.0 license declared.

证据
证据与编辑审查Manifest、Bundle patch、分发与新鲜度

不可变证据

审查状态与源码活动

AI 已审查

请使用不可变 Git 源路径;提供的记录不能证明 npm 发布安装可用。

AI 审查于 2026/9/14 UTC 14:30GitHub 事实核对日期: 2026/9/14 UTC 14:30

自当前证据基线以来,没有记录到重要源码变化。

下一步

按 Plugin 安装流程操作

订阅重要变化: dsh-drawio