dsh-in-convo-mode-change
by jiangr100
DeepSeek Harness插件:会话中直接从会话标题切换会话代理预设(标准/代码/最小/创作者)
DeepSeek Harness plugin: switch a session's agent preset (Standard / Code / Minimal / Creator) mid-conversation, straight from the session header.
安装
dsh plugin --profile web add github:jiangr100/dsh-in-convo-mode-changeGitHub 源码安装:首次需按提示配置 allowBuilds 构建授权后重试
安装与环境配置指引、插件开发教程见 DSH 中文社区文档 ↗
安装即在你的机器上以你的权限运行第三方代码——它可读写文件、使用凭据、访问网络,DSH 的工具审批不会为插件代码加沙箱。「检测到 manifest」仅代表发现 dsh.bundle / dsh.plugin 清单,不构成兼容性或安全审查;安装前请审阅源码,不熟悉的插件先在不含密钥的环境试用。
README
Switch the agent preset of a conversation mid-session in the DeepSeek Harness web UI. The presets are the "conversation modes" shipped with the harness — Standard mode, Code mode (PTC), Minimal mode, and Creator mode, plus any custom presets you have authored.
By default the session header's preset icon is a read-only label: a session's composition is fixed when it starts, and the built-in picker only exists on the new-session hero screen. This plugin turns the header icon into a real mode switcher that works on a conversation that has already started.
How it works
- Client half (
lib/client.js) replaces the built-inagent-presetcell inconversation.session.header.actionswith a menu button. Picking a mode asks for confirmation, then POSTs{ sessionId, agentPreset }to the host route. - Host half (
lib/index.js) registers thePOST /change-convo-mode/switchroute on the web server. It uses the host's ownagentPresets.recompose()— the same machinery the built-in blank-session picker uses — without the "no turn has ever run" restriction, and records the switch in the session log as anagent-preset/selectedevent so the transcript stays honest. - Picking is disabled while the session is running a turn; the host refuses anyway (defense in depth), because re-parenting the agent's scope chain mid-call could strand an in-flight tool invocation.
Caveats
Switching modes mid-conversation is deliberately not offered by the host, and this plugin bypasses that gate on purpose:
- The switch applies from the next turn. The current transcript is untouched, but tool calls made under the previous mode may render differently in the chat afterwards, because the UI resolves tool views through the session's current preset.
- Don't switch while a turn is running — the menu is disabled during a run.
Install
From a local checkout:
dsh plugin --profile web add /path/to/dsh-in-convo-mode-change
Or straight from GitHub (the dsh.bundle.patch manifest field makes the
dependency join the profile's plugin layers automatically):
dsh plugin --profile web add github:jiangr100/dsh-in-convo-mode-change
Then restart the web server (stop the dsh web process and run dsh web
again) so the loader picks up the new plugin row and the client bundle.
After restart, the header of any conversation shows the mode switcher where the read-only preset label used to be.
Uninstall
dsh plugin --profile web remove dsh-in-convo-mode-change
and restart dsh web. Sessions that already switched modes keep running on
the preset they switched to.
Development notes
- The client bundle is a hand-written module-loader bundle (no build step),
following the same pattern as
dsh-rewind. - The host row injects
webServer,agentPresets, andagents; it imports error classes from@deepseek-ai/dsh-agent-presets, resolved by the harness loader at mount time. - The client replaces the built-in label by registering the SAME id
(
agent-preset) inconversation.session.header.actionsat a lowerpriority(the built-in sits at the default 0). The slots registry keys list cells by(id, priority): a duplicate id at the same priority throws and fails the whole plugin entry at load; the lowest priority wins the cell.test/slots.test.mjsdrives the realSlotCoreto lock this in. Do not remove thepriority: -10option.
原始 README: https://github.com/jiangr100/dsh-in-convo-mode-change/blob/main/README.md ↗
同类插件
查看全部 →
archify
Agent 技能:生成美观、可校验的架构图、工作流图、时序图、数据流图与生命周期图——自包含 HTML、带动画与清晰导出

dsh-turn-rewind
对话回退:基于持久 Change Ledger 回滚会话与工作区状态。

dsh-plugin-cc
把 DeepSeek Harness 接入 Claude Code:评审、批评、委派与会话导入

dsh-interconnect
跨实例互联:经 interconnect 服务在多个 DSH 实例间转发消息与事件。

dsh-chat-import
把 13 家 coding agent(Claude Code、Codex、ChatGPT、Cursor、Gemini、opencode 等)的完整对话历史导入为可续聊的 DeepSeek Harness 会话,并支持反向导出回 Claude Code。

dsh-crew
DSH 插件:从 Claude Code / Codex 向 DSH agent 派活——原生 subagent 进度、宿主内 worker 会话(分级预设),以及为纯文本宿主补上视觉与图像生成的多模态桥