Back to home

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 offexit_plan_mode 共用同一 状态机(按钮切换走 remote.commands.execute/plan 命令通道)。

组成

文件作用
package.json声明 dsh.client(web 平台、inject slots/remote/remote.commands)与 exports["./client"]
lib/index.jsHost 半(空 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.ymlid: mode-switch

注:副本是物理拷贝(未走 pnpm install)。若日后对 profile 执行 pnpm install,该目录可能被清理;重新拷贝即可(或改用 dependencies 中的 link: 声明)。

卸载

  1. $DSH_HOME\profiles\web\cordis.patch.yml 删除 mode-switch
  2. 删除 $DSH_HOME\profiles\web\node_modules\@local\dsh-mode-switch\
  3. (可选)删除 $DSH_HOME\extensions\mode-switch\
  4. 重启 DSH

生效

组合行在进程启动时解析(Web 表面未启用 HMR),修改后需重启 DSH。