Yaya716
dsh-mode-switch
Persistent one-click plan/build mode toggle for DeepSeek Harness Web: switches the session plan state through the built-in /plan command.
- Stars
- 0
- Language
- JavaScript
- Created
- Aug 15, 2026
- Updated
- Aug 15, 2026
Introduction
@local/dsh-mode-switch — 持久化「计划/执行」模式切换按钮
在输入框工具行(conversation.input.left)提供一个常驻按钮,一键切换
plan / build 模式。与内置 /plan、/plan off、exit_plan_mode 共用同一
状态机(按钮切换走 remote.commands.execute 的 /plan 命令通道)。
组成
| 文件 | 作用 |
|---|---|
package.json | 声明 dsh.client(web 平台、inject slots/remote/remote.commands)与 exports["./client"] |
lib/index.js | Host 半(空 apply,仅为组合行可加载而存在) |
client.js | 浏览器半:注册按钮 UI,切换走内置 /plan 命令通道 |
安装位置
- 源码:
$DSH_HOME\extensions\mode-switch\ - 加载副本:
$DSH_HOME\profiles\web\node_modules\@local\dsh-mode-switch\ - 组合行:
$DSH_HOME\profiles\web\cordis.patch.yml中id: mode-switch
注:副本是物理拷贝(未走 pnpm install)。若日后对 profile 执行
pnpm install,该目录可能被清理;重新拷贝即可(或改用dependencies中的link:声明)。
卸载
- 从
$DSH_HOME\profiles\web\cordis.patch.yml删除mode-switch行 - 删除
$DSH_HOME\profiles\web\node_modules\@local\dsh-mode-switch\ - (可选)删除
$DSH_HOME\extensions\mode-switch\ - 重启 DSH
生效
组合行在进程启动时解析(Web 表面未启用 HMR),修改后需重启 DSH。