Introduction

In DSH agent development, sessions typically serve as context boundaries. Continuing a conversation in a long session tends to pile up irrelevant content; switching to a new session, however, might discard already established context. dsh-session-fork transforms session forking into Git-like branch references: a forked session becomes a manageable branch, and new turns on a branch can be merged back to the main line.

What is it

dsh-session-fork is a DeepSeek Harness (dsh) plugin, described as:

dsh plugin: git-like conversation forking (branch refs on sessions)

It cannot run independently and must be installed within dsh to be used. The repository address verified by sources is:

https://github.com/Jason-skd/dsh-session-fork

The license is MIT. The author field is not provided in the current sources; the account in the repository address is Jason-skd.

Core Features

The following three types of verified capabilities are introduced:

  • Take over native forking: The official dsh fork action is intercepted, ensuring every fork becomes a managed branch.
  • Branch operations: You can squash turns and conclusions unique to a specific branch back into the main branch or other branches.
  • Branch visualization: Uses a vendored VS Code Source Control Graph, providing a branch viewing experience similar to VS Code.

Installation and Activation

Installation requires a dsh profile based on web-app. The command is as follows:

dsh plugin --profile web add dsh-session-fork

After installation, you can use branch commands in any session, or switch to the branch tab to execute the same operations via the graphical interface.

package.json lists several peerDependencies and marks them as optional. Before enabling, you can confirm with the dsh profile environment whether these optional dependencies already exist.

Typical Usage

The following examples are from the provided usage examples:

  1. First, name the current session as the main branch:
/branch adopt main          # name the current session as branch 'main'
  1. Fork a review branch at the last completed turn:
/branch review              # fork a 'review' branch at the last completed turn
  1. On the review branch, compress new turns back into main:
/squash into main           # (on 'review') compress the new turns back into main

After completing the above steps, you can also switch to the branch tab to view branches and perform similar operations via the graphical interface.

Applicable Scenarios and Notes

Suitable for users who wish to manage long sessions in DSH, split a conversation into multiple branches, and merge branch conclusions back to the main line while preserving the main line context.

Notes before use:

  • This is a DSH plugin and cannot run independently of dsh.
  • The installation command requires a web-app-based dsh profile.
  • The plugin runs with the current dsh process. Before installing, you should check the source code, license, and optional peerDependencies in package.json.
  • Current verified sources do not provide star count, category, or other fields; the directory page is a community plugin directory and is not an official app store.

Related Links

Directory page:

https://www.skillhub.cn/plugins/Jason-skd/dsh-session-fork

GitHub:

https://github.com/Jason-skd/dsh-session-fork