tree-chat: Managing Branch Context with Conversation Trees in DSH

Introduction

When engaging in long conversations within DeepSeek Harness (DSH), the common practice is to proceed linearly down a chat record. However, when you want to branch out from a historical question, compare multiple solutions, or delete intermediate turns while expecting subsequent replies to remain based on a “reconnected” context, you often have to switch back and forth in the native session list or manually start a new chat to copy key points. This can easily lead to a disconnection between the context path and the visible record.

tree-chat is a community-maintained standard plugin for DSH. It visualizes “where to continue” and “which path the current model is actually consuming” using a vertical conversation tree in the right sidebar. It supports branching, pruning, and optional project directory synchronization. The following section covers its positioning, capabilities, and installation usage. Please refer to the GitHub repository README for facts.

What is this

tree-chat (maintained by DevourerM) is a visual tree-based context management system built on DeepSeek Harness. It is categorized as a “Memory” plugin in community directories such as SkillHub. It adopts the standard dsh.bundle + dsh.client format, utilizes the host’s native right sidebar, fonts, and dark/light themes, and requires no modifications to host installation files.

The current version of the plugin is 1.2.1. The README states that it has been verified on DeepSeek Harness 0.2.0-rc.2 / 0.2.1-rc.2 and Windows. Compatibility with other systems and host versions has not yet been verified and is not guaranteed. Installing via the DSH interface does not require manual execution of Node, npm, or build commands; the release package includes runtime files.

Core Features

Conversation Tree and Context

  • Displays conversations as a vertical tree by default: user input is primary, while internal turns such as permission prompts and auto-continuations can be collapsed, yet the complete model context is preserved.
  • Create persistent branches from any historical node using the native DSH input box; content is filled back into the same node after the first turn completes, and subsequent growth occurs along that branch.
  • Single-click to select, double-click to locate the corresponding message in the native chat; supports node dragging, zooming/panning, searching, and “Tidy Nodes” to arrange the layout according to the current left-to-right order (with undo and redo support).
  • When deleting intermediate turns, you can choose “Keep Subsequent.” The plugin automatically reconnects the path and generates a suitable native context session without rewriting the original chat file. “Delete Branch” removes the position of the selected node and its descendants in the tree.

Named Collections

Connected nodes can be merged into named collections, collapsing them into cards with names and counts. Expanding, splitting, or re-merging does not compress content into summaries or alter the context path. Collection-related structural edits can be undone; deleting a collection only affects the tree and subsequent context, not the physical deletion of native chat files.

Branches and Permissions

When creating or switching back to a branch, the current DSH permission settings (including custom sandboxes and approval combinations) are inherited. Permissions are still written and executed by native DSH services; if the host requires review integration that cannot be enabled, the switch will fail with a prompt, rather than silently downgrading.

Project Sync

Optionally writes the tree, collections, full conversation, and attachments to a .tree-chat/ directory within the project (including tree.json, conversation.md, sessions/*.jsonl, attachments, etc.). This facilitates migration via Git and continuing by “Reading as new conversation” in DSH. The sync switch and directory are saved in local DSH settings; the plugin does not execute git commit / push for you. Directly manually editing plugin-managed files within the sync directory will trigger validation protection.

Data and Boundaries

Original DSH messages are not modified or physically deleted by the plugin; non-current sessions in the same tree are collected via native archiving (pinned sessions are excepted). Tree metadata defaults to $DSH_HOME/plugins/conversation-tree/graphs (on Windows: %USERPROFILE%\.dsh\plugins\conversation-tree\graphs). The plugin itself does not add external service requests; chat continues to use the models and tools configured in DSH.

Installation and Activation

Open Plugins → Add Plugin on the left side of DSH, and paste the release package address into Package name or address (recommend pinning a version .tgz, Git installation on the local machine is not required):

https://github.com/DevourerM/tree-chat/releases/download/v1.2.1/tree-chat-1.2.1.tgz

Confirm the plugin name is tree-chat and click Install. Once complete, click Enable Now; follow the prompts if the host requests a restart. Open a normal chat and click the tree-shaped tree-chat button in the page header to display the right-side conversation tree.

You can also use a Git address with a tag:

git+https://github.com/DevourerM/tree-chat.git#v1.2.1

The README warns: Since the plugin has not been published to npm, do not simply enter tree-chat, to avoid resolving to other packages with the same name.

If the network is restricted, download tree-chat-1.2.1.tgz from Releases, and enter the absolute local path on the host computer in the same input box (e.g., C:\Downloads\tree-chat-1.2.1.tgz). Do not select the GitHub auto-generated Source code ZIP.

Before updating, please check the host compatibility notes in the new Release. Use the DSH update or reinstall process to fill in the new version address to avoid enabling multiple copies simultaneously. Uninstallation does not delete native chats or tree data; automatically archived sessions can still be restored from the DSH archive list.

Typical Usage

Deep Dive from a Specific Turn

  1. Select the node to continue from in the right-side tree.
  2. Click the card +, the top New Branch, or the same-named action in the node menu.
  3. A New Branch node appears on the tree, and the native input box switches to that branch; after sending a message, that turn fills in the same node in place, and subsequent chat grows along this branch.

Unfilled empty branches will not disappear due to timeout and remain after refresh and restart; double-click an empty branch to continue filling it.

Pruning Intermediate Turns and Keeping Subsequent

When the original path is Start → 1 → 2 → 3 → 4, select node 2, open … → Delete Node… → Keep Subsequent, resulting in Start → 1 → 3 → 4, with subsequent chat based on the new path.

Merging and Tidying

Box-select connected nodes (or Shift-select a path), click top Merge to Collection and name it; use Split Collection, Ungroup Collection, or Delete Collection to adjust the structure as needed. The top Tidy Nodes unifies spacing and hierarchy while preserving relationships.

Shortcuts (when canvas is focused)

Shortcut Effect
Shift + Enter Create a branch from the selected node
Enter Locate the selected node
Ctrl / ⌘ + Z Undo tree editing
Ctrl / ⌘ + Shift + Z Redo tree editing

After completing a new round of chat, the old tree editing undo history is cleared to avoid overwriting nodes that grew later.

Restoring Conversation within a Project

  1. Open the normal conversation for the corresponding project in DSH, click Project Sync, select the directory, and click Read.
  2. Select a record in “Project Conversation Tree” and click Read as new conversation.
  3. After verification, continue in the new conversation; to continue writing to the same project record, click Enable Sync again.

Use Cases and Notes

Suitable for developers or agent users who need to conduct long-term deductions and multi-solution forks within DSH while wanting to visualize “which context path the current reply is using.” The same tree retains only the current session visibility on the left by default; other branches are collected via archiving, making it suitable for keeping exploratory branches in the tree without cluttering the session list.

Please note before installing and using:

  • The plugin runs under the current DSH process permissions. Before installation, you should review the source code and the MIT license yourself, and only install from the official Release or trusted paths mentioned above.
  • API or interface semantic changes after host upgrades may require plugin adaptation; refer to the compatibility records and Release notes in the README.
  • While tree generation is in progress, some context structure operations require waiting; Project Sync has limits on session count, single file size, and total volume (see the “Project Sync and Git Migration” section in the README).

Community plugin directories (such as the tree-chat page on SkillHub) are maintained by ecosystem sites and have no official affiliation with DeepSeek / High-Flyer; “Everything is a plugin” is DSH’s product philosophy, and this article does not describe it as an official app store entry.

Conclusion

tree-chat transforms DSH’s linear chat into a tree view that is branchable, prunable, and capable of collapsing collections. When needed, it drops full records into .tree-chat/ to migrate with the project. If you are already using DSH on Windows in a 0.2.0-rc.2 / 0.2.1-rc.2 environment, you can install version 1.2.1 using the address above to try it out.

羽毛球分组比赛记分
小程序二维码

欢迎使用《羽毛球分组比赛记分》微信小程序

Xiaoye