Introduction¶
When running long conversations, multi-turn tool calls, subagents, or session forks in DeepSeek Harness (DSH), the context is often scattered across the event stream: which turn was edited and retried, which entry is an approval branch, where the tokens were spent — it’s difficult to see all of this clearly at a glance from the chat window alone. The common approach is to dig through logs or take notes manually, which is slow and easily misses branch relationships.
Below we introduce the community plugin dsh-plugin-mind-tree (UI name “Mind Tree”): it traverses the complete event log of the current session, identifies various branch nodes, renders a compact vertical outline tree in the right sidebar, and supports token statistics, three levels of process information reduction, and Mermaid / outline / Obsidian canvas export. In GUI-less terminal sessions, the same formatted output can be generated via the host-registered mind_tree tool.
What Is This¶
dsh-plugin-mind-tree is maintained by ShOpenMind, repository github.com/ShOpenMind/dsh-plugin-mind-tree, MIT license. It is categorized as “Model Reasoning” in the SkillHub directory.
One-line positioning: traverse the DSH conversation context, list branch nodes, and render them into a mind tree (including session lineage / session forest), while also providing export and the terminal-side mind_tree tool.
Core Features¶
Mind Tree and Navigation¶
The plugin traverses the complete event log of the current session, organizing “turns → messages → tool calls → results” into a compact vertical outline tree (adapted for narrow sidebars and vertical scrolling). By default, only the latest turn is expanded; the toolbar provides “Expand All / Collapse All”, and clicking the triangle at the three-level indent expands level by level. When clicking the triangle before a turn to expand, it automatically locates the corresponding position in the conversation; lines with a conversation position provide a ↗ jump link on the right side.
Turn Statistics and Search¶
Each turn displays message count and token consumption; input/output/cache read/cache write/thinking/total/elapsed time etc. are subdivided in the detail panel. The toolbar search box filters nodes by text (preserving ancestor structure and highlighting matching lines); clearing it restores everything.
Three Levels of Process Information Reduction¶
Display and export share the same levels; the host always returns complete data, and you can switch back to “Full” at any time:
| Level | Retained Content | README Test (2491 nodes / 15 turns) |
|---|---|---|
| Compact (default) | Turns + user’s actual speech + all branch points + “tool activity ×N” aggregation per turn + replies per turn | 119 nodes, outline about 8 KB |
| Standard | Compact + substantive process text (≥60 chars) and each tool call (excluding tool output) | 1259 nodes, about 136 KB |
| Full | All nodes, corresponding one-to-one with the event log | 2491 nodes, about 286 KB |
Branch Node Identification¶
The plugin marks examples such as: replacement branches (old content detached from context after message edit/retry), llm/retry, user choices (ask_user_question), approval decisions (approval/asked / approval/decided), spawned subagents/workflows/teams (subagent, subagent_fork, workflow, spawn_teammate), goal changes (goal/change), task decomposition (todo_write), plan mode (plan/mode), context compaction (compaction/*), session forks (forked in turn/end), etc.
Session Lineage and Session Forest¶
Displays derivation (subagents) and fork relationships across sessions; clicking a child session opens or views its mind tree directly.
Export¶
All three formats support “Save As” and can be saved directly into an Obsidian vault:
- Mind map Markdown (default): embeds Mermaid
mindmap, displays directly in Obsidian (zero plugins); after denoising, retains turns, branch points, user’s actual speech, and child sessions. - Outline Markdown: full nodes (YAML + nested lists), suitable for Markmap / Markmind etc.
- Obsidian Canvas
.canvas: native canvas format, draggable and editable after import.
The GUI can also export Markdown / Canvas with branch markers and token statistics; colors can be customized in the toolbar “Color ▾” (saved in local localStorage).
Other GUI Behaviors¶
- Auto-refreshes when the session produces new events.
- The “…” menu on session list rows in the left sidebar provides “View Mind Tree”.
- On first load, automatically expands the right sidebar and switches to the mind tree tab.
Installation and Activation¶
Do not use GitHub repository URLs ending in .git or archive packages like …/main.tar.gz (the README notes this causes git dependencies or “cannot determine which package was installed from dependency changes”). This plugin is not yet published to npm; the bare package name dsh-plugin-mind-tree cannot be found.
Method One (Recommended): Paste the Release .tgz on the Plugin Page¶
On the DSH Plugin Page → Add Plugin, paste the fixed link (always pointing to the latest release):
https://github.com/ShOpenMind/dsh-plugin-mind-tree/releases/latest/download/dsh-plugin-mind-tree.tgz
- Click “Add Plugin” → paste the address → “Install” (about half a minute).
- In the plugin list, enable “Mind Tree / dsh-plugin-mind-tree”.
- Completely restart DSH (refreshing the webpage alone is not enough): desktop
Command + Q/Ctrl + Qthen reopen; fornpx @deepseek-ai/dsh web, pressControl + Cthen re-run.
If the network is unavailable, download the .tgz from Releases and install using a local file path. If upgrading encounters “downloaded package verification failed”, the README suggests using an address with a version number, for example:
https://github.com/ShOpenMind/dsh-plugin-mind-tree/releases/download/vX.Y.Z/dsh-plugin-mind-tree-X.Y.Z.tgz
Method Two: Command Line¶
dsh plugin forwards through pnpm under the profile directory, using add:
dsh plugin --profile <profile_name> add https://github.com/ShOpenMind/dsh-plugin-mind-tree/releases/latest/download/dsh-plugin-mind-tree.tgz
# or local directory
dsh plugin --profile <profile_name> add /absolute/path/to/dsh-plugin-mind-tree
After installation, still need to enable it on the plugin page (plugin add only installs the package).
Prerequisites¶
- GUI mind tree tab: the profile needs to include
@deepseek-ai/dsh-web-app(included by default in desktop /dsh web). - Pure terminal profile: only the
mind_treetool is available. - Node:
enginesrequires>=22. - DSH version:
peerDependenciesis@deepseek-ai/dsh: ">=0.2.0-rc.2 <0.3.0"(optional peer); if not matched, installation/activation may be blocked by DSH.
Host-side code changes require a complete application restart to take effect; before cross-version upgrades, the README recommends running the repository’s tools/integration-test.mjs and tools/host-test.mjs.
Typical Usage¶
Web Side¶
After installation, enabling, and restart, the “Mind Tree” tab appears in the right sidebar. In the tree, expand turns, use search filters, switch process information levels, and then use the export menu to generate Mermaid mind maps, outlines, or .canvas.
Terminal / Agent: mind_tree tool¶
The plugin does not provide an independent CLI subcommand; the terminal entry is the host-registered mind_tree tool (shares lib/format.js with GUI export):
| Parameter | Description |
|---|---|
sessionId |
Target session; if omitted, uses the current session |
format |
mindmap (default) / outline / canvas / json |
view |
tree (default) / lineage / forest; the latter two only for outline, json |
level |
compact (default) / standard / full; applies to outline and json |
writeTo |
Absolute path; writes to file and only returns a summary (recommended, to avoid large content entering context) |
When not writing to a file, returned content is truncated if it exceeds 40,000 characters with a prompt to use writeTo. For example, let the agent execute:
dsh -p "export the mind map of the current session to D:/vault/x.md"
(The agent calls mind_tree with an appropriate writeTo.)
Use Cases and Notes¶
Who it’s for: DSH users who need to audit long session structures, clarify branches and token consumption, and archive sessions into Obsidian or Markmap workflows.
Permissions and security: the plugin runs under the current DSH process permissions, can read session events and write files via writeTo. Before installation, review the source code and LICENSE; when dependencies are missing or tool registration fails, the README explains this will be written to the host log and shown as a compatibility banner in the GUI (the client probe’s hostWarnings).
Ecosystem note: DSH adopts an “everything is a plugin” philosophy; the SkillHub directory page is a community site, with no official affiliation with DeepSeek / High-Flyer.
Conclusion¶
Through the steps above, you can navigate the branches and tokens of the entire conversation in the GUI, or export Mermaid / outline / canvas consistent with the interface in the terminal using mind_tree. For more information, see the directory page skillhub.cn/plugins/ShOpenMind/dsh-plugin-mind-tree and GitHub ShOpenMind/dsh-plugin-mind-tree.