新增 /btw 与 /side 斜杠命令,在隔离的分叉子会话中回答临时旁问,不污染主会话上下文。
安装
# GitHub 源码(首次需按提示配置 allowBuilds 构建授权后重试)
dsh plugin --profile web add github:JessenReinhart/dsh-plugin-btw
装任何插件都等于在你的机器上跑第三方代码,权限和你本人一样大——能读你的文件、用你的凭据、访问网络,工具审批管不到它。GitHub 来源的插件还会在安装时执行构建脚本——pnpm 默认拦截,所以安装可能停在 ERR_PNPM_GIT_DEP_PREPARE_NOT_ALLOWED 或 ERR_PNPM_IGNORED_BUILDS;dsh 会打印出需要添加的确切键名,把它加进该 profile 的 pnpm-workspace.yaml 的 allowBuilds 下,重跑一次即可装上。放行构建本身就是一次信任判断:请只安装可信来源,并尽量锁定 commit(github:owner/repo#sha)。
README
该插件的 README 只有英文版本。
A DeepSeek Harness (DSH) plugin that adds a /btw slash command — a quick side-question channel you can use mid-session, modelled after the /btw feature in Claude Code, OMP (oh-my-pi / pi-coding-agent), and JCode.
What it does
/btw <question> runs an isolated side-agent to answer your question, then surfaces the answer as a compact command-result card. It never derails the active task and never writes the exchange into the main conversation's model context.
/btw what does the useDebounce hook in src/hooks do?
/btw where is the JWT secret configured?
/side is this failing test related to my last change?
How it stays out of the main thread
- The side question is executed by a subagent (
ctx.subagents.start(...)), not by the main agent's turn loop. - DSH's command registry logs the invocation as direct surface events (
command/run,command/done). These are not model-turn messages, so the side Q&A never becomes part of the main agent's future context window. - The default
forkprovider seeds the child with the parent session's completed-turn history, so the answer is grounded in your current work (files, recent edits, decisions) without copying that history into the main transcript. - The side-agent runs read-only by default:
write,edit, and thecordis_*lifecycle tools are denied, so a "btw" can't silently mutate the working tree while your main task is running.
Variants
The plugin registers two commands that share one handler:
| Command | Alias | Behaviour |
|---|---|---|
/btw <question> |
— | Fork the session context, answer read-only |
/side <question> |
alias of /btw |
Same as /btw (matches pi-btw's /side) |
Requirements (DSH host services)
commands— human slash-command registry (@deepseek-ai/dsh-commands)subagents— subagent provider registry (@deepseek-ai/dsh-subagent)
The fork in-process provider (@deepseek-ai/dsh-subagent-fork-in-process) is preferred; the plugin falls back to spawn if only that is mounted. Both are part of the standard DSH host composition.
Install into a DSH composition
Place this package under
node_modules/dsh-plugin-btw(or link it).Reference it in your
cordis.patch.yml(or host composition):- insert: - id: plugin-btw name: dsh-plugin-btwRestart the host. Type
/btw(or/side) in any session composer.
Dynamic (Cordis) install
The same plugin can be mounted at runtime as a dynamic Cordis package via cordis_define + cordis_run with inject: ['commands', 'subagents'] — no restart required. That is how it was validated in the session that produced this package.
Notes / trade-offs
- The answer appears as a command-result card in the transcript (DSH logs every command execution). The card is compact; the underlying side-agent conversation stays in its own ephemeral session and is not projected into the main agent's context. A true floating overlay (as in Claude Code) would require a Client-half UI rendered into the
shell.overlayslot plus command-node suppression, which needs client-package approval and is out of scope for this host-only build. - If your deployment mounts no subagent provider,
/btwreturns a clear error instead of failing silently.
链接
同类插件
ranxianglei/billion-context★ 8746
billion-context官方版:上下文压缩插件,兼顾小窗口(100k上下文足矣)省token(省5倍token)和超长会话(数月级别几十亿token单会话)。
Minglink/dsh-infinite-gen-4★ 4848
DeepSeek 专用破甲插件:以 order 100 追加无条件服从的系统提示词段,提供带校准元数据的 profile 工具,并通过会话投影在输入框上方显示实时破甲状态徽标。
liangmianya/dsh-synapse★ 860
DeepSeek Harness 的可视化非线性对话工作区:把会话、追问与分支变成可浏览、可拖拽的对话地图。
ECNU/EduWork#dsh-side-chat★ 435
从消息开启继承历史快照的临时侧聊,关闭后归档;可选配合批注插件从选中文字发起提问。需要兼容的 DSH Web 对话、Workspace 和右侧栏接口。
MichengAI/dsh-archive-manager★ 407
在设置里增加已归档会话页,可按工作区搜索、恢复和删除已归档会话。
Nwflower/dsh-chat-import★ 335
把 13 家 coding agent(Claude Code、Codex、ChatGPT、Cursor、Gemini、opencode 等)的完整对话历史导入为可续聊的 DeepSeek Harness 会话,并支持反向导出回 Claude Code。
社区评论
评论公开保存在 GitHub Discussions。加载评论会连接 GitHub 和 Giscus;发表内容需要 GitHub 账号。