DSH Plugins Marketplace

DSH Plugins

Plugins

/

Sessions & Messages

/

dsh-slash-new

d

dsh-slash-new

Manifest valid

Adds a /new slash command that opens a blank session in the current workspace (reusing an existing blank one when there is one) and carries the old session's permission preset and agent preset into it

UI (client)hasBundlePatch

dsh-slash-new

CI license: MIT

A small DeepSeek Harness (DSH) plugin that adds a single slash command: /new.

The /new command in the DSH composer

It starts a blank session in the current workspace — the same action as the sidebar's 「新会话」 button and Cmd+N — and carries the old session's permission preset and agent preset over to the new one, so starting fresh never silently widens or narrows what the agent is allowed to do.

Why it exists

DSH sessions are append-only logs, so there is nothing to truncate in place. "Clearing" a conversation means starting a new one and leaving the old log in the sidebar. DSH ships /compact, but no /new in the desktop composer, and hand-creating a session resets its permission preset to the profile default.

What /new does

StepBehaviour
1Reads the current session's permissions projection (read-only / ask / never / danger-full-access / auto) and its agentPreset
2Creates or reuses a blank session in the same workspace, passing the agent preset to session creation
3Opens that session in the main panel
4Replays the permission preset by running the host's own /permission <preset> command in the new session — the same call the permission chip in the composer makes

The previous session keeps its log and stays in the sidebar. A custom (hand-tuned) permission mix cannot be expressed as a preset, so the new session falls back to the host default and a warning is logged to the client console.

Install

# 1. point the desktop profile at this package
dsh plugin --profile desktop add link:/absolute/path/to/dsh-slash-new

# 2. add "dsh-slash-new" to dsh.bundle.bundles in
#    ~/.dsh/profiles/desktop/package.json

# 3. restart the desktop app (Cmd+Q, then reopen)

Once published to npm, dsh plugin --profile desktop add dsh-slash-new is enough; the bundle entry is still required.

Client bundles are compiled at boot, so restart the app after installing or changing either half of the plugin.

Uninstall

dsh plugin --profile desktop remove dsh-slash-new

…then drop "dsh-slash-new" from dsh.bundle.bundles and restart.

Compatibility

  • Tested with DSH desktop 0.2.1-rc.3 (Web renderer). The client half needs sessions, workspaces and uiWorkspace (blank-session creation, session switching) and the host's /permission command.
  • Do not install it alongside another plugin that owns /new (for example deepseek-harness-ultra-slash): both register the same command name and both listen to command/executed, so a single /new would switch sessions twice.

Development

node --test test/*.test.mjs   # unit tests (no dependencies, Node >= 20)
node --check lib/index.js && node --check client/client.js
  • lib/index.js — host half: registers the command in ctx.commands and settles a short result.
  • client/client.js — browser half: listens to command/executed, opens the blank session and replays the preset.
  • test/ — fake-context tests for both halves, including the inherited-preset and custom-preset paths.

For an end-to-end check without touching your real profile, boot a disposable instance and run /new there:

DSH_HOME=/tmp/dshhome dsh --profile scratch --no-open --port 63002

中文速览

/new 在 DSH 桌面端开启一个空白会话(等同于侧边栏「新会话」/Cmd+N),并把当前会话的权限预设和代理预设带到新会话里,避免一开新会话权限就被重置成默认值。旧会话的日志仍留在左侧列表。自定义(custom)权限无法用预设表达,新会话会回落到默认并在控制台告警。

安装、卸载和兼容性说明见上方英文部分;装完记得重启 App(客户端 bundle 在启动时编译)。

License

MIT © 2026 deqingLv

Comments

Loading…

Similar plugins

dsh-new-session

by yoggu

Adds a /new command to start and open a new Session in the current Workspace.

Sessions & MessagesManifest valid

★ 0

MIT

JavaScript

Sep 28, 2026

dsh plugin --profile web add dsh-new-session

Adds a Session without workspace entry to the DSH Workspace picker, creates isolated date-organized directories, and keeps started sessions resumable under Ungrouped.

Sessions & MessagesManifest valid

★ 2

↓ 150/wk

MIT

TypeScript

dsh plugin --profile web add dsh-projectless-session

by aefuimn

Hot-switch agent presets (working modes) inside a running DSH session: mode changes are armed immediately and applied at the next step boundary through agentPresets.recompose, via the /mode slash command.

Tools & CapabilitiesManifest valid

★ 0

MIT

JavaScript

Aug 21, 2026

dsh plugin --profile web add dsh-agent-preset-switcher

by WeiYe6

Hand your long DSH session over to a clean one: /handoff summarizes the conversation with an LLM, creates a new session+agent in the same workspace, injects the handoff document, and auto-opens it.

UI & ExperienceManifest valid

★ 6

MIT

JavaScript

Aug 28, 2026

dsh plugin --profile web add dsh-session-handoff

by heyuanliu3-byte

DSH plugin: remembers your last manual permission-preset choice per session and restores it when the session is reopened.

Security & AuditDevelopment & InfrastructureManifest valid

★ 1

MIT

JavaScript

Oct 24, 2026

dsh plugin --profile web add dsh-auto-preset

by orangeofcarl0-sys

DSH /fresh command: summarize conversation, start new session, archive old one

Manifest valid

★ 2

↓ 309/wk

MIT

JavaScript

Sep 24, 2026

dsh plugin --profile web add dsh-fresh-start