Introduction¶
DeepSeek Harness (DSH) adopts a plugin-based architecture. When developing or debugging agent conversations, developers often need to reuse historical conversation fragments, compare context across different branches, or continue asking questions from any historical node. The dsh-git plugin introduces core Git concepts, transforming the conversation process into a DAG (Directed Acyclic Graph), and provides capabilities such as conversation branch management, node selection, and context reassembly.
What is dsh-git¶
dsh-git is a client-side plugin for DeepSeek Harness Web, maintained by ZicanC. It does not include the dsh executable; it only provides the plugin module. Its core value lies in treating each Prompt + Answer turn in the conversation as an immutable PA node, supporting cross-branch selection, an ordered context tray, and the generation of multi-parent DAG nodes.
Core Features¶
- Git-style conversation management: Each completed Prompt + Answer turn is a
PAnode. These nodes are atomic, addressable, and cannot be rewritten in place. - Conversation graph per session: Each Session has a conversation graph, showing branches, merge edges, and the current
HEAD. - Workspace project graph: Shows all completed PA nodes in the workspace, with support for collapsing duplicate history.
- Ordered context tray: Allows selecting PA nodes from any branch and reordering them by dragging. The sorted order determines the continuous history sent to the host.
- Cross-branch selection: Supports freely selecting nodes across branches.
- Host-side persistence: Graph data is stored on the host side, follows the DSH configuration, and does not depend on the current browser.
Installation¶
This plugin only provides plugin code and does not include the dsh executable. If you are using a source checkout of DeepSeek Harness, please invoke the CLI from the checkout directory. The following commands assume the plugin directory is a sibling of the deepseek-harness directory:
pnpm --dir ../deepseek-harness dsh plugin --profile web add "$PWD"
pnpm --dir ../deepseek-harness dsh --profile web
If dsh is installed globally, you can use the shortcut command. Note that you should not run pnpm dsh inside the plugin repository directory.
Typical Workflow¶
- Complete one or more regular turns in DSH.
- Open the Branches tab. The current mainline is shown as a solid line, and the active node is marked as
HEAD. - Select any PA nodes; they are added to the Context Tray in creation order.
- Drag the cards in the Context Tray to set the exact order to be sent to the model.
- Enter your next question and select Create merge branch and ask.
- The plugin creates a new Session, uses the selected turns as its ordered history, and opens that session to send the question. When the answer completes,
HEADmoves to the new node.
Git Concept Mapping¶
| Git Operation | dsh-git Operation |
|---|---|
commit |
Each Prompt + Answer turn is a PA node. |
log --graph |
The session conversation graph and the workspace project graph. |
HEAD |
The active node. |
checkout |
Open a DSH Session using Switch to this branch. |
cherry-pick |
Select PA nodes from any branch and add them to the ordered Context Tray. |
rebase |
The host renumbers the selected turns into a continuous history according to the order in the tray. |
branch |
Asking from the tray creates a new host-side Session. |
merge |
The next Prompt and Answer become a multi-parent DAG node that records all sources. |
Notes¶
- Preview behavior: Clicking a node only previews its content and does not change the context or current Session.
- Read-only view: The workspace project graph is read-only. Clicking a PA opens a details inspector, and clicking “Open source Session” returns to the original session.
- Self-contained: The built plugin is a self-contained browser package except for React.
- Data model: The data model is based on the
TurnNodeinterface and includes id, sessionId, turn, parentIds, and more.
Summary¶
dsh-git provides DeepSeek Harness with conversation branch management, allowing developers to manage conversation history as if managing code. Through the ordered Context Tray and multi-parent DAG nodes, it supports continuing conversations from any historical fragment, and is suitable for agent development scenarios that require fine-grained control over context and branches.