- Home
- Plugins
- Sessions & Messages
- dsh-fork-sessions
dsh-fork-sessions
2923fzyxfkj/dsh-fork-sessions
Forks the current conversation from a Branch action in the session header and opens the branch in the right sidebar instead of the main column; once a branch exists, a Branches tab in the same header lists every branch, with actions to reopen one in the sidebar, open it as the main conversation, or drop its record.
Install
dsh plugin --profile web add github:2923fzyxfkj/dsh-fork-sessionsREADME
dsh-fork-sessions
Branch a conversation into a session that opens beside it, and keep every branch in one place. A browser-UI bundle for DeepSeek Harness (dsh).
English | 中文
What it adds
| Where | What |
|---|---|
| Conversation header, actions band (top right) | Branch — forks this conversation and opens the branch in the right sidebar |
| Conversation header, View tab row (top) | Branches — appears once at least one branch exists; lists every branch |
Nothing else is added: no sidebar row, no floating panel, no toolbar.
Branch
Pressing Branch calls DSH's own Session Controller fork
(session.fork) for the current Session. The Host copies the exact event
prefix — the latest completed turn plus its standalone tail — into an
independent Session, so the branch starts with the parent's whole history and an
empty future of its own. The plugin then opens that child in the right sidebar
as a tab and leaves the main conversation untouched.
- The fork inherits the durable title with an incremented number, so the tab chip shows the child's live Session title.
- The tab renders the ordinary Conversation content in its
embeddedvariant: transcript and composer, without the main header or width controls. You can keep talking to the branch right there. - Closing the tab deletes nothing; the branch stays a normal Session.
- A blank conversation (no turn yet) hides the button, because there is no prefix to copy.
- A fork is a real Session, so it is also listed in the left session list — this plugin only changes where it is displayed.
Branches tab
The branch index is this plugin's own browser-local list (localStorage, key
dsh-fork-sessions.records.v1): the DSH session log records no "fork of" marker,
so the plugin remembers child id, source id, source title, and creation time
itself.
The tab is registered only while at least one record exists: create the first branch and it appears in the header's View tab row; drop the last record and it goes away. Each row shows the branch's live title, its source session, and when it was created, with three actions:
- Open in sidebar — reopen the branch conversation in the right sidebar.
- Open in main — show the branch as the main conversation.
- Drop record — forget the record. The Session itself is left alone.
A branch whose Session no longer exists stays visible, marked as missing, so a stale record can be removed. Records live per browser, not per Session: they survive reloads of this window and are not synchronized elsewhere.
Requirements
- dsh
0.2.2-rc.1or newer on the0.2.xline (engines.dshdeclares>=0.2.2-rc.1 <0.3.0-0). Verified on0.2.2-rc.5. - A host whose composition mounts the right sidebar and the Session Controller — the standard Web and Desktop profiles do.
Install
# CLI
dsh plugin --profile <profile> add github:2923fzyxfkj/dsh-fork-sessions
Or in the app: Plugins → Add plugin, and paste
github:2923fzyxfkj/dsh-fork-sessions. A prebuilt tarball is attached to every
release, so no build step runs:
dsh plugin --profile <profile> add https://github.com/2923fzyxfkj/dsh-fork-sessions/releases/latest/download/dsh-fork-sessions.tgz
Refresh the page (or restart the app) once, then open a conversation that has at least one turn.
Remove / turn off
Disable the row under Plugins, or delete dsh-fork-sessions from the
profile. Nothing is written to a Session log, so disabling the plugin leaves
every branch reachable through the ordinary session list.
How it is built
index.js— Host half. Registers nothing; it exists because a bundle row needs both halves.client.js— the whole UI: the header action, aforkchatresource protocol that retains the branch Session while its tab exists, the right-sidebar tab type and body, and the conditionalconversation.viewentry for the list.cordis.patch.yml— the one row the bundle inserts.locale/*.json— display title and description read by Plugin Manager.
No runtime dependencies, no build step, no network calls. The plugin reads only
what DSH's own Session list already publishes, and stores its index in
localStorage.
Test
npm test
test/smoke.test.mjs loads client.js with a fake module loader and a fake
Client context, then checks every registration the plugin makes, the fork call
chain, the resource provider's frames and abort behavior, and each component's
render branches (including the blank-session case and the degraded path when a
Conversation factory is unavailable).
License
MIT
Related plugins
billion-context
ranxianglei/billion-context
dsh-web-ui (dsh-chat-recovery)
zhu1090093659/dsh-web-ui
dsh-synapse
liangmianya/dsh-synapse
EduWork (dsh-side-chat)
ecnu/eduwork