dsh-drawai: An Editable Canvas and Diagram Tools in the DeepSeek Harness Sidebar
fourzkw/dsh-drawai
An editable drawio canvas in the DSH right sidebar plus diagram_read / diagram_apply tools, letting you and the model edit the same .drawio file in place.
dsh-drawai places an editable canvas in the DeepSeek Harness right sidebar and hands the model two tools for editing diagrams directly. It removes the hassle of keeping hand-drawn, model-edited, and drawio-opened copies apart, since all three read and write one native .drawio file. The canvas covers manual drawing, layers, ordering, alignment, and export, while the model inspects structure and selection through diagram_read and submits structured ops via diagram_apply, which auto-layouts and writes back atomically. Maintained by fourzkw under the MIT license.
How to Install
dsh plugin --profile <your-profile> add dsh-drawaiReplace --profile with the profile name you actually run (see ls ~/.dsh/profiles/): usually web in the browser UI, desktop or desktop-NNN in the desktop app.
- Category
- Tools & Capabilities
- Platform
- DSH Plugin
- Author
- fourzkw
- Distribution
- Plugin
dsh-drawai Key Features
dsh-drawai Repo Summary
What Does It Do?
DrawAI is a DSH plugin for DeepSeek Harness that puts an editable diagram canvas in the right sidebar and adds two agent tools for editing diagrams directly. It removes the friction of keeping hand-drawn, model-edited, and drawio-opened copies in sync, because all three read and write the same native .drawio file. The canvas handles manual drawing and layout, while the model reads structure and applies structured edits through diagram_read and diagram_apply, with automatic layout and atomic write-back. It is maintained by fourzkw under the MIT license and was last updated in 2026-09.
Core Features
- Right-sidebar canvas: opens or creates
.drawiofiles in the workspace, with 9 shapes, an 8-color palette, orthogonal routing with obstacle avoidance, in-place label editing, layers and ordering, multi-select alignment, and SVG / PNG export. diagram_applytool: exposes 15 structured ops for adding, removing, modifying, reconnecting, duplicating, ordering, layering, and exporting, then auto-layouts and writes back atomically, withidsbatching andasaliases.diagram_readtool: returns nodes and edges, style keys, layers and parents, page size, edge label coordinates, the file fingerprintrevision, and your current selection, and can be scoped to one layer or a few ids to save context.- Selection and rollback: whatever you select on the canvas is visible to the model, and each round of model edits can be undone in the UI for up to 8 steps.
- Lossless native files: units the canvas cannot interpret are preserved byte for byte, so saved files open directly in drawio / diagrams.net for further editing.
How to Use This Plugin?
After enabling it in DSH, the DrawAI canvas panel appears in the right sidebar. It starts empty, so use File → New Canvas… or File → Open… to list every .drawio in the workspace and begin drawing. Manual work goes through the panel menus: double-click a node to rename it, right-click to edit data, use the layer and order panels to restructure, and export SVG or PNG. To let the model edit, just describe what you want; it first calls diagram_read to inspect structure and your current selection, then submits ops through diagram_apply. If you worry about conflicting with manual edits, have the model pass expectRevision — a mismatched fingerprint fails without writing a single byte. Use Edit → Undo AI Changes to roll back.
How to Troubleshoot This Plugin?
The most common failure when the model edits a diagram is an expectRevision mismatch, which means you changed the file in drawio at the same time; re-read the diagram and apply the edit again. If ops reference nodes that do not exist, the tool fails before writing anything and lists the known ids, so correct the references accordingly.
This page is an independent rewrite of the plugin's official README — for authoritative documentation and the latest changes, refer to the source: fourzkw/dsh-drawai. The plugin is third-party code that runs on your machine once installed; inclusion does not imply endorsement — please review the source before installing.
DSH Plugin FAQ
