XiaoWind/dsh-btw

dsh-btw

DeepSeek Harness plugin: a /btw slash command to add notes without interrupting the agent

待分类

dsh-btw

English | 中文

一个 DeepSeek Harness(DSH) 插件,新增人机交互用的 /btw("by the way" / 顺便说一句)斜杠命令,用于 在不打断 agent 思考的情况下补充信息。

当 agent 正在运行时,你突然想起还有信息要补充。直接输入 /btw <内容>,不用 打断自己的思路——这条补充会在当前回合结束后才交给 agent。正在进行的回合 绝不会被中断、取消或重启。

提示 —— 官方 Web 应用已内置此功能。

较新版本的官方 DeepSeek Harness Web 应用已原生支持:当 agent 正在运行时, 在输入框里输入的内容会先进入排队队列(按 Enter 排队,不会打断当前回合); 也可以按 Ctrl/Cmd+Enter 或点击排队行上的 Steer 按钮,把内容在下一步 边界「转向(steer)」进当前回合;排队中的消息还可以编辑或删除。

这个内置的 Queue/Steer 输入框已经覆盖(并超越了)/btw 的功能,所以一般 情况下你不再需要本插件。只有在你想显式使用 /btw 斜杠命令、或使用没有该 输入框功能的非 Web profile 时,本插件才仍有价值。

安装

# 从 GitHub 安装(立即可用,无需发布到 npm)
dsh plugin --profile web add git+https://github.com/XiaoWind/dsh-btw.git

# 或发布到 npm 后
dsh plugin --profile web add dsh-btw

dsh plugin 会把参数转发给 web profile 目录内的 pnpm,随后自动把该包加入 dsh.profile.bundles 层级列表(因为本包声明了 dsh.bundle.patch)。安装后请 重启 Web 应用。

本插件注入 commands 服务,因此只在包含命令适配器的 profile 中生效——官方 自带的 web profile 就包含它。

更新

把已安装的插件更新到 GitHub 最新版:

dsh plugin --profile web update dsh-btw

dsh plugin 会把参数转发给 profile 目录里的 pnpm update dsh-btw,把 github:XiaoWind/dsh-btw 重新解析到默认分支的最新 commit。锁文件按 commit 钉住 git 依赖,因此不必升级 version 也能更新。若 pnpm 因缓存没有拉到新 commit,可显式重新钉一次:

dsh plugin --profile web add github:XiaoWind/dsh-btw

更新后请重启 Web 应用——bundle 层在启动时组合,运行中的 Web 进程不会热更已安装的插件。

用法

命令作用
/btw <内容>为 agent 排队一条补充说明(任意语言)。
/btw help查看帮助。

补充内容会以普通用户消息的形式加入,模型会把它当作你本人的话,并融合进它 当前正在进行的任务中。

语义

  • 绝不打断。 /btw 把内容追加到 agent 的 next-turn 队列。若 agent 正 在回合中,当前回合会原样跑完,随后把补充作为下一条消息处理;若 agent 处于 空闲,则立即处理。
  • 不取消、不重启。 补充是延续,不是新指令;当前目标保持不变。
  • 顺序保持。 多条 /btw 按提交顺序(FIFO)依次送达。
  • 无状态。 没有持久化:一旦送达即不再留痕,重启也不会重放旧补充。

配置

本插件没有配置项。它打印的确认信息只是反映「排队那一刻 agent 是否正在运行」。

开发

# 语法检查
node --check lib/index.js

插件是单文件 ESM Cordis 函数插件(lib/index.js),无需构建步骤。它导出 apply、inject、name,并由 bundle 层 cordis.patch.yml 插入到 profile 组合中。

License

MIT