Preface¶
When running long tasks in DSH, an awkward situation often arises: the context is already stuffed full, the code is finished, but the model says, “The next thing isn’t suitable for this conversation, let’s start a new one” — but it actually can’t. In DSH 0.2.1, the model’s typical response is “I can’t start a new conversation, that’s an interface operation.” The “New Conversation” button in the left sidebar indeed exists, but that pathway (sessionController.commands.create + commands.prompt) isn’t exposed as a tool, so the model has to stop and wait for you to click manually.
dsh-new-session is the plugin that fills this gap: it takes the entire set of actions—creating a session, posting a handover message, attaching a read-only reference to the previous conversation, and automatically switching to the new session—and turns it into a new_conversation tool that the model can call directly. Maintainer: CassiaTw1g, Category: Workflow.
Below is structured as “What is it -> What to install -> How to use -> What to watch out for”.
What is it¶
One-line positioning: A DSH plugin that enables the model to truly create a new session in the current workspace and start working immediately, while switching the interface over.
It breaks down into four steps, corresponding to the four capabilities in the tool:
| Capability | Description |
|---|---|
| Create Session | Creates the session within the caller’s current workspace (workspaceRegistry); appears directly in the sidebar, not as an orphan session |
| Transfer Handover | Posts the handover content as the first user message in the new session; the new session immediately runs its own first round, the caller does not wait for it to finish |
| Reference | reference_current: true (default) attaches a read-only snapshot reference of the current conversation in the first message; when no reference is given, the prompt must be self-contained |
| Switch View | After the result lands, calls uiWorkspace.openSession(sessionId), jumping the main view to the new conversation |
Additionally, it pins the title via the user source in session/title, so automatic titles (fallback / LLM) won’t overwrite the title you specified. The tool card renders as a “New Conversation” card, showing the title, workspace, session ID, and an open button; on failure, it writes the reason directly on the card.
Repository: https://github.com/CassiaTw1g/dsh-new-session, Directory: https://www.skillhub.cn/plugins/CassiaTw1g/dsh-new-session. License: MIT, engines.node >= 22.
Tool Parameters¶
new_conversation has five parameters, all from the README:
prompt: Required, the handover contenttitle: The new session titleworkspace: The workspace; entering an incorrect one will result in an error listing available workspacesreference_current: Whether to attach a read-only reference to the previous conversation, defaulttrueswitch: Whether to automatically switch the view, defaulton
Among them, switch / reference_current can override the same default values in the global configuration.
Differences from existing plugins¶
The README lists two community plugins with similar functions, both checked by the author via npm / GitHub:
@ryuu-64/dsh-session-tools: Providessession_create/session_send/list_sessions/session_wait, very comprehensive functionality, but peer dependency is pinned to0.2.0-rc.2, and session creation is “show a card, click manually”.dsh-session-messaging: Messaging between sessions, no session creation.
The differences of dsh-new-session are three points: auto-switch (the author calls this “Codex’s feel”), built-in cross-conversation reference, and the host side has zero @deepseek-ai/* imports, so it doesn’t care about host minor versions, installing in any 0.2.x profile won’t fail due to peer resolution.
Installation¶
The README gives three methods, ordered by convenience.
Method 0, npm / Plugin Market:
dsh plugin --profile desktop add dsh-new-session
Or search for new session in DSH’s “Plugins -> Discover”. The README notes here that it is visible after indexing; at the same time, it mentions the situation where “npm isn’t released yet, or you want to stick to trunk,” in which case you use the methods below. The desktop app must be fully exited first for dsh plugin to acquire the profile lock.
Method A, the installation script in the repository, marked as recommended in the README; works even while the desktop app is running:
node tools/install-profile.mjs # default desktop profile
node tools/install-profile.mjs --profile headless # other profiles
node tools/install-profile.mjs --dry-run # only show what will be done
node tools/install-profile.mjs --profile desktop --rollback # rollback
The script performs file-level installation: copying the package, modifying package.json’s dependencies and dsh.profile.bundles, and backing up a copy of package.json.bak-newsession-<timestamp> every time.
Method B, pointing dsh plugin to a local path:
dsh plugin --profile desktop add file:D:/DSH/插件/dsh-new-session
The post-install actions are described specifically in the README; both steps do the same thing: reloading both sides.
- Host side: The desktop app adds the new tool via profile hot reload; the README’s test record shows it takes effect in seconds. If it doesn’t take effect, completely exit DSH and reopen it.
- Browser side: Refresh the page once, because the
dsh.clientmodule graph is assembled on page load.
Configuration¶
All configuration is in cordis.patch.yml, only a few lines:
- insert:
- id: new-session
name: dsh-new-session
config:
autoSwitch: true # automatically switch to the new conversation after the result lands
referenceCurrent: true # automatically attach a read-only reference to the previous conversation
switchDelayMs: 900 # pause before switching (milliseconds)
# toolName: new_conversation
That is to say, installing without any configuration defaults to “auto-switch + attach a read-only reference + pause 900 milliseconds before switching”.
Usage¶
After installation, you don’t need to remember parameters, just talk to the model naturally. The example given in the README:
Start a new conversation and finish the rest of X.
The model will call new_conversation, then write a self-contained handover, the content containing at least the target, completed, next steps, constraints, and path. The new session is created and starts working immediately, the interface switches over; the old session remains unchanged, ready to switch back at any time.
If you want to make the handover more stable, you can explicitly request a self-contained handover paragraph, or explicitly say not to bring a reference. Neither the caller nor the receiver relies on remembering what was said last, which is the core of this design.
Applicable Scenarios and Notes¶
Suitable for: People running multi-step tasks in DSH, whose context is easily blown out, and who prefer segmented conversations instead of infinitely appending to the same session; as well as people writing their own plugins who need a “session lifecycle” tool for parameter reference. The plugin’s directory structure itself (lib/index.js host side, lib/client.js browser side, cordis.patch.yml, install script, unit tests for both sides) can serve as a template for dual-side plugins.
There are a few boundaries to know before installing, all from the “Known Boundaries” section in the README:
- Only creates a session, not a workspace. Entering an incorrect
workspacewill result in an error listing available workspaces. - The browser side is only meaningful for Web/Desktop versions. The headless profile has no
sessionController; in this case the tool will provide a readable error instead of silently failing. - Cross-conversation reference depends on the host having
@deepseek-ai/dsh-session-referenceinstalled (included by default indsh-web-app); without this service, it automatically degrades to a plain text handover. - Auto-switch does not hijack the view: the card only appears in the conversation that initiated the call, and it only jumps once; history cards older than 3 minutes do not trigger a jump.
Additionally, a reminder before installation: the plugin runs with the permissions of the current DSH process; it can read files the process can read and execute commands the process can execute. Review the source code and license before installing; this is a prerequisite applicable to any third-party plugin, and this plugin is no exception. The repository license is MIT, and the author has not yet published a formal npm package, so you can confirm if it has been indexed before going the npm route.
Summary¶
dsh-new-session solves a very narrow problem: the model needs the ability to truly create a session and automatically switch to it, rather than a “suggestion to start a new conversation”. It does not attempt to replace existing session management plugins, but simply fills in the “create session + auto-switch” action alongside them. If you are stuck at the step where “the context should switch but can’t,” you can give it a try.