dsh-tree-view: Session Branch Tree View

In DSH usage scenarios, editing a sent message or using the built-in “Branch in New Conversation” button generates a new conversation version. If these versions are allowed to clutter the sidebar, the conversation list will quickly become bloated. The dsh-tree-view plugin organizes conversation versions of the same family through a tree view, keeping the sidebar tidy.

The plugin is positioned as a tree-based conversation branch view. It is maintained by Rice00 and licensed under MIT. It allows users to switch between different conversation versions, rename branches, and promote branches to formal conversations within a single entry in the sidebar.

Installation and Activation

Execute the following command in the terminal to install:

dsh plugin --profile web add dsh-tree-view

After installation, you must restart the profile or refresh the browser for the plugin to take effect.

Core Features

  1. Tree Branch Display
    The plugin automatically captures conversations resulting from message editing or the use of the branch button. Switch to the Tree tab in the conversation panel to view a branch graph starting from the “Trunk.” Each node represents a conversation version.

  2. View Navigation and Orientation

    • Click to Jump: Clicking a node in the tree switches the conversation to that version and navigates to the corresponding message turn.
    • “You are here” Marker: A small triangle next to the node you are currently reading indicates your current location. This position memory is retained even after refreshing the page or re-entering the Tree view.
    • Path Highlighting: The entire path currently being read (including the shared prefix) is highlighted on the tree.
    • Multi-thread Parallelism: Right-clicking a node and selecting “Open in Main” allows multiple versions to be opened simultaneously in the sidebar without interfering with each other.
  3. View Management

    • Collapse Others: The “Collapse Other Branches” button in the toolbar collapses all other versions of that family in the sidebar into the tree.
    • Long Segment Folding: Consecutive turns without forks automatically fold when they reach a set length (default 8 turns), maintaining a clean view.
    • Remember Position: When leaving and returning to the Tree view, the previous pan and zoom state is preserved.
    • Hide Empty Copies: Forks that only copied the conversation but did not generate new replies are not displayed in the tree.
  4. Branch Management

    • Rename: Right-click a node to rename the branch.
    • Version Ring Switching: Switch versions using the ‹ n/m › controls below the message bubble.
    • Archive Handling: Archived branches do not disappear from the tree; they simply dim and are marked as “Archived.” The archive operation only changes the sidebar display and does not delete data.

Usage Examples

  • Edit Branch: Editing a message that has already been sent will automatically appear as a new version in the tree.
  • Switch Versions: In the Tree tab, click different nodes to switch to that version and continue the conversation.
  • Rename and Promote: Right-click a node to rename the branch or “Open in Main” to make it an independent sidebar conversation.

Data Safety and Principles

  • Data Safety: The plugin is a fork of dsh-plugin-message-edit. The only place the plugin touches data is the “Archive” toggle. It does not delete, copy, or rewrite conversation content.
  • Uninstallation Impact: After uninstalling the plugin, all conversation data remains in DSH, and sidebar conversation entries will not be lost.
  • Dependencies: The plugin relies on DSH’s conversation log structure. It can coexist with the upstream plugin but does not depend on it to run.

Settings

In DSH settings, TreeView provides the following configuration options:

  • Message Action Style: Choose between DeepSeek, ChatGPT, and Claude button layouts.
  • Resume Last Read: Default is off. When enabled, returning to this family from another conversation automatically jumps to the version you were last reading.
  • Fold Threshold: Set the maximum number of turns for long segment folding (e.g., 5, 8, 12, 20 turns).
  • Hide Empty Copies: Control whether to display branch copies that contain no new content.

This plugin is suitable for users who frequently edit conversations, compare versions, or develop along multiple parallel lines.

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

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

Xiaoye