Introduction¶
In DSH, a conversation’s log path, the cwd in the header, and its ownership in the workspace registry are tightly bound together. Switching to a different project directory to continue a chat isn’t just a matter of renaming a folder: path inconsistencies are treated as corrupted logs, and if the same ID appears in two places, it becomes impossible to open. The distribution also lacks built-in capabilities like moveSession.
dsh-session-relocate (maintained by DDMUC, GitHub repository DDDMUC/dsh-session-relocate) consolidates “changing cwd, moving the session directory, and changing ownership” into a single recoverable transaction, providing menus and drag-and-drop support in the Web sidebar. Below, we cover the problems it solves, how to install and use it, and the trade-offs involved when moving a session that is “currently responding.”
What is this?¶
In short: Relocate DSH sessions across workspaces—moving log files, sandbox roots, tool working directories, and registry ownership to a target workspace together, allowing you to continue chatting after the move.
- Category: Client-side (injects Web UI via
dsh-client-ui-slots) - Current Package Version:
0.2.3(see npm / repositorypackage.json) - License: MIT
- Engine Requirements: DSH
>=0.2.0-rc.2; Node>=22.15
Community Directory Page: skillhub.cn/plugins/DDDMUC/dsh-session-relocate. The directory site is community-maintained and has no official affiliation with DeepSeek or High-Flyer. The DSH ecosystem itself follows a “everything is a plugin” philosophy. Before installing a plugin, it is recommended to review the source code and license independently, as plugins run with the privileges of the current dsh process.
Core Features¶
Single Items & Session State¶
- Sidebar “…” Menu: Adds a Move to option, allowing selection of an existing workspace or inputting an absolute path via Other directory… (the directory will be created and registered as a new workspace).
- Drag-and-Drop: Supports dragging a conversation from the sidebar onto another workspace group and releasing to complete the move; dragging up or down within the same group retains official sorting, and the plugin only intervenes when the pointer enters a different group.
- Open but Idle Sessions: Before moving, the plugin flushes data, detaches from the live store, and waits for the write lease to be released before touching files.
- Responding / Sub-agent / Background Task Sessions: Supports “in-place takeover”—changing the header
cwdwithin the write handle serial chain and completing file transactions without interrupting the current response turn. IfmoveLive: falseis set, moving active sessions will be rejected. - Current Page Handling: If the conversation being moved is the one currently open on the page, a refresh or navigation is required before reopening it; moving other conversations does not affect the current page.
Batch Operations & Sub-conversations¶
- Multi-select: Click Multi-select in the menu, check items, and click Move in the bottom bar; this can share the same multi-select mode with
dsh-delete-session(if installed, its bottom bar will also show Move). - Batch Drag-and-Drop: After multi-selecting, you can also drag any selected row to a target workspace. A “Moving x/N…” indicator will appear; failed items remain in place for easy retry. Batch operations execute file transactions one by one, while workspace ownership is written once at the end.
- Sub-agent Sessions (
origin: subagent): Moved along with the parent conversation by default; this can be disabled in Plugins → dsh-session-relocate → Config (“Move along with sub-conversations” — browser local config, enabled by default).
Edge Cases¶
- Ungrouped but Correct Path: If the session
cwdis already in the target directory but the sidebar shows “Ungrouped,” moving it will supplement the ownership (applied: "attached") without moving any bytes. - Crash Recovery: Migration uses a staging area and logs under
~/.dsh/session-move/; operations can be rolled back on failure, and startup or bridge calls will idempotently complete the process after a crash.
Installation & Activation¶
This is a Node module on the host side. A restart of dsh web is required after installation to load it.
- Install from npm:
dsh plugin --profile web add dsh-session-relocate
Alternatively, install from a local checkout directory (replace the path with your local dsh-session-relocate directory):
dsh plugin --profile web add <your-cloned-dsh-session-relocate-directory>
-
Restart
dsh web. -
Verify the plugin is online: The sidebar conversation “…” menu should contain Move to; alternatively, check the status API:
curl http://127.0.0.1:3080/api/dsh-session-relocate/status
A return of {"ok":true, ...} indicates the bridge is functioning normally (default prefix /api/dsh-session-relocate, modifiable via bridgePrefix in cordis.patch.yml).
Typical Usage¶
Move via Menu¶
- Hover over a conversation in the sidebar and click … → Move to.
- Select the target workspace (the list excludes the current workspace).
- After the list refreshes, the conversation appears under the target workspace; open it to continue in the new directory.
Move via Drag-and-Drop¶
Drag a conversation to the target workspace’s folder row, any conversation row, gaps within the group, or the “Expand remaining N conversations” area. The target group will highlight with a blue border before release. In multi-select mode, dragging an unchecked row moves only that row, while dragging a checked row moves the entire batch.
Configuration (Excerpts)¶
Common keys in the config section of cordis.patch.yml (overridable at the profile level):
| Key | Default | Description |
|---|---|---|
moveLive |
true |
Whether to take over running sessions in-place; if false, they are rejected. |
releaseLive |
true |
Whether to release idle but open sessions first; if false, they are rejected. |
dragMove |
true |
Whether to enable sidebar drag-and-drop; can be disabled during DOM changes, menu remains available. |
For the full table, see the “Configuration” section in the repository README.
Use Cases & Notes¶
Who it’s for: Users who frequently switch between multiple repositories or workspaces and want to move a long conversation along with its context to a new cwd rather than copying/pasting or starting over. It is also for those who need to “attach” a session to a new project while the Agent is still outputting (accepting that “tools in the current turn still run in the old directory, and only the next open will use the new directory”).
Important Notes:
- For the currently running turn, the frozen header in memory does not immediately switch tools to the new directory; files and ownership are already migrated, but tools will only execute in the new path the next time the session is opened.
- If the menu lacks Move to or drag-and-drop doesn’t work: First restart
dsh weband check thestatusendpoint; for drag issues, checkdragMove. - Do not manually change only the session directory or only the registry—this conflicts with DSH storage conventions and may render the session permanently unopenable. Always use this plugin or an equivalent full-process transaction.
Conclusion¶
dsh-session-relocate turns cross-workspace session moving into a crash-recoverable file transaction, covering daily operations via menus, drag-and-drop, and multi-select batch processing on the Web side. Its distinction between “release first” and “in-place takeover” for live sessions serves as a valuable supplement to DSH’s default capabilities.
- Community Directory: https://www.skillhub.cn/plugins/DDDMUC/dsh-session-relocate
- Source Code & Detailed Mechanism: https://github.com/DDDMUC/dsh-session-relocate