READMESource: main@f78c7fbc
dsh-mindmap
A DeepSeek Harness plugin that turns a plain Markdown file into a live mindmap. The working directory is the document: the chat is the editor, the AI edits the .md step by step, and the right-side floating panel re-renders the mindmap in real time.
Project status: pre-1.0. The 0.1.0 feature set (see CHANGELOG) is implemented and covered by unit tests, but cross-version compatibility beyond the development environment is not yet certified.
The core idea
- Open a Markdown file — it is a mindmap.
- The chat is not the main character; it is the assistant that edits the mindmap next to you.
- You say one sentence, the AI edits the
.mdone step, the panel follows instantly. - Mindmap = Markdown: diffable, shareable, and git-friendly by nature.
Features
- Four tools (
mindmap_create/mindmap_open/mindmap_get/mindmap_update) — plain Markdown files in the session working directory; the root node title is the filename and stays in sync both ways (renameRootrenames the file, collisions are rejected). - Live panel with zero extra channels — the panel consumes the session snapshot (
mindmap_*tool results), so every AI edit re-renders immediately. - Floating right panel — toggled by the 思维脑图 button in the session header; opens on AI
mindmap_open/createtoo. Opening the panel pushes the chat to the left (layout-push, the chat is never covered); width is drag-resizable (280px ~ 80% viewport) and persisted. - Directory tree tab — a persistent tree of the session working directory (served by a plugin-owned read-only route), lazy-loaded per directory; right-click to create a mindmap (at the root or inside a directory); left-click a
.mdto open it instantly and hand it to the AI for editing. - Single-mindmap mode — two tabs only: 目录 (tree) and 脑图 (the current mindmap); opening another
.mdreplaces the previous one. - "What you see is what the AI edits" — when the visible mindmap differs from the AI's working document, the panel automatically asks the AI to open it, keeping the chat focus in sync.
- MarkGrove-style mapping — heading hierarchy, nested lists (empty items become placeholder nodes), code blocks as leaf nodes, paragraphs as node notes, stable structural IDs, and orthogonal connector lines between nodes.
- PNG export — one click on 导出图片 exports the current mindmap.
- Safety —
mindmap_updateis approval-free by default (files are git-managed) with arequireApprovalswitch as an escape hatch; the client has no write path to the filesystem — every edit goes through the AI tools.
Requirements
| Component | Baseline |
|---|---|
| Node.js | 20.11 or newer |
| DeepSeek Harness | tested against 0.1.1-rc.2 |
Installation
Development (link install, live source):
dsh plugin --profile web add link:/path/to/dsh-mindmap
Released tag (once published):
dsh plugin --profile <profile> add <pkg>#v<version>
Tools
| Tool | Description |
|---|---|
mindmap_create(name) |
Create <name>.md in the session working directory and show it in the panel (fails if it exists). |
mindmap_open(path) |
Open an existing .md as a mindmap in the panel. |
mindmap_get(path) |
Read the current Markdown content of a mindmap document. |
mindmap_update(path, content, renameRoot?) |
Write the full updated Markdown; optionally rename the root node (renames the file, collisions rejected). |
Development
npm run verify # syntax check + node --test
License
Not yet chosen — contact the author before redistributing.
No comments yet. Be the first to write one.