dsh-preset-hotswap
Manifest validSwitch the agent preset (standard / PTC / cordis) of an already-started conversation from the session header. DSH host+client plugin.
dsh-preset-hotswap
拥有:
/dsh-preset-hotswap路由(GET 模式名单 / POST 切换)与会话头部的模式下拉。 冲突时:与官方模式徽标共用 slotconversation.session.header.actions,靠 order 排布;轮次进行中一律拒切。 回滚:删 profilecordis.patch.yml里 idpreset-hotswap的 insert + 从dependencies移除 + 完全重启应用。
会话头部「对话模式」热切换:已经开始的会话也能切 标准 / PTC / 创造。
它解决什么
官方只允许在会话开始前选模式。本插件在会话头部的官方模式徽标旁加一个下拉, 让进行中的会话也能换模式。切换后的三个可预期后果:
- 会话投影前移 → 官方模式徽标自动更新(不必刷新);
- 该会话的前缀 KV cache 失效一次 —— 工具目录变化带来的固有代价,不是 bug;
- 重启后按投影的终值恢复,不需要额外持久化。
实现
- host 半边:经
/dsh-preset-hotswap暴露名单(GET)与切换(POST)。 切换链路是ctx.agents.get(sessionId)拿活体 agent →ctx.agentPresets.resolve()/recompose(agent.ctx, id)→session.append("agent-preset/selected")推进投影;recompose自身带 retain + bind(rebind),旧 generation 按引用保留。 - 守卫:轮次进行中拒切(
sessionProjections.stateOf(agent.session, "turnBoundary").openTurnStartSeq !== null), 与官方select()的agent-preset/locked锁处在同一层语义上。 - client 半边:纯 DOM 客户端模块,下拉注册在 slot
conversation.session.header.actions(官方模式徽标也在那里,靠 order 排布)。
安装
desktop profile(Electron 独占 CLI,只能手改):
package.json的dependencies加"dsh-preset-hotswap": "link:../../local-plugins/dsh-preset-hotswap";cordis.patch.yml写insert: {id: preset-hotswap, name: dsh-preset-hotswap};pnpm install后完全重启应用(client bundle 在 host 启动时读入内存,刷新页面无效)。
回滚:删掉 insert 块与依赖行,重启。
Comments
Loading…
Similar plugins
by timsok-shit
Switch agent presets in any DSH conversation — even ones that already have messages.
★ 0
JavaScript
Aug 19, 2026
dsh plugin --profile web add dsh-preset-switchby my-dsh-plugin
Switch the current session's agent preset (mode) after the model answers and keep chatting. DeepSeek Harness 插件:模型回答后切换模式,继续当前对话。
★ 0
Apache-2.0
TypeScript
Sep 14, 2026
dsh plugin --profile web add dsh-agent-mode-switcherby 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.
★ 0
MIT
JavaScript
Aug 21, 2026
dsh plugin --profile web add dsh-agent-preset-switcherby mikulo
DeepSeek Harness (DSH) plugin: pick a local .md prompt template with / when starting a new conversation; it binds the whole conversation with AGENTS.md-level authority.
★ 0
MIT
JavaScript
Sep 24, 2026
dsh plugin --profile web add @mikulo/dsh-prompt-switcherby WASD258-jpg
Force-switch the agent preset (mode) of a DSH session after it has started, bypassing the blank-only lock. /preset command, set_agent_preset tool, composer dropdown.
★ 0
JavaScript
Aug 15, 2026
dsh plugin --profile web add @wasd258/dsh-preset-forceby watericetangcw
A Cordis plugin for DeepSeek Harness that suspends the entire conversation state and resumes it after restart.
★ 3
MIT
JavaScript
Aug 17, 2026
dsh plugin --profile web add dsh-session-pause