iyllyt/dsh-btw 预览 preview

iyllyt/dsh-btw

个人很喜欢 Claude Code 的 /btw,于是为 DSH 做了复刻:共享当前上下文快速旁路提问,不中断主任务,也不写入主会话历史。

Project Overview项目介绍

dsh-btw is a native plugin built exclusively for DeepSeek Harness (DSH), that ports the popular /btw side question feature from Claude Code to the DSH ecosystem. It enables users to ask quick, context-aware questions without interrupting the ongoing main task or adding extra content to the main conversation history. The question gets a one-off independent model response, which is displayed in a dismissible temporary panel above the input box, and never saved to DSH’s main session store. To install the plugin, you can run the official DSH plugin add command directly from this GitHub repository, after confirming you have a compatible DSH version and Node.js environment set up.

This plugin is designed for developers and users working on long-running DSH tasks who need to quickly confirm minor details without derailing their current main progress. For example, you may want to check what a specific configuration file is named, why a piece of existing code is written a certain way, or what final decision you made earlier on a specific design topic. Sending a regular message would alter the main session flow, and opening a completely new session would lose all accumulated context, so /btw fills this common gap perfectly.

This plugin is released under the open source MIT license, and has specific compatibility requirements: it only supports DSH versions 0.1.5-rc.1 and 0.1.5-rc.2, and requires Node.js version ^22.19.0 or >=24.0.0 to work correctly. It does not support tool calls or multiple follow-up rounds, only generates a single one-off response to your question. It offers three configurable sidechain storage modes for temporary question data, and by default automatically cleans up records older than 7 days. Uninstalling the plugin does not automatically delete existing stored sidechain records, so you need to remove them manually if you want to clear all data.

这是一个专为 DeepSeek Harness (DSH) 开发的原生社区插件,复刻了 Claude Code 中广受欢迎的 /btw 旁路提问功能。它允许用户在不打断当前主会话任务、不污染主上下文历史的情况下,快速提问一个与当前上下文相关的细节问题。提问会触发独立的一次性模型请求,回答结果显示在输入框上方的可关闭临时面板中,不会写入 DSH 的主会话历史记录。

适合开发过程中需要临时确认细节的用户,比如主任务进行到一半时,想确认某个配置文件名、某段代码的设计原因或者之前定下的方案。直接发普通消息会改变主会话走向,另开新会话又会丢失当前上下文,/btw 正好填补了这个需求空白。用户只需要输入 /btw 加问题,就能快速得到不干扰主任务的回答。

该插件使用 MIT 许可证开源,要求 DSH 版本为 0.1.5-rc.1 或 0.1.5-rc.2,Node.js 版本需要 ^22.19.0 或 >=24.0.0,可通过 DSH 内置的插件命令直接从 GitHub 安装。插件不支持工具调用,仅进行一轮模型生成,可配置三种不同的 sidechain 存储模式,默认会自动清理7天前的记录。

Pre-install check安装前体检Compatibility · Security兼容性 · 安全性 1 note1 项提示
  • 10 stars - an early-stage project星标 10,属于早期项目
DSH walks through these 9 checksDSH 会逐条核对这 9 项

Compatibility兼容性

  • DSH, Node, OS and profile requirementsDSH 版本 / Node 版本 / 操作系统 / profile 是否满足要求
  • External dependencies and runtimes (Electron / Python / Docker, ...)外部依赖与运行时(Electron / Python / Docker 等)是否齐备
  • Conflicts with installed plugins: command names, skill / tool names, ports, duplicate MCP registration与已装插件是否冲突:命令名、skill / tool 重名、端口占用、重复 MCP 注册

Security安全性

  • Repo matches the facts registered here; archived or abandoned?仓库是否与页面登记一致,是否归档或长期停更
  • Safety of preinstall / install / postinstall and install.sh / setup.ps1preinstall / install / postinstall 与 install.sh、setup.ps1 是否安全
  • curl|bash, download-then-execute, obfuscation, unrelated domains → stop immediatelycurl|bash、下载即执行、混淆代码、无关域名 → 立刻停止
  • Typosquatting or unmaintained packages among the new dependencies新增依赖里有没有 typosquatting 或无人维护的包
  • Requested permissions vs. what the feature actually needs申请了哪些权限、是否超出功能所需(filesystem / network / shell / clipboard)
  • Any sudo / admin requirement, plus uninstall and rollback是否要求 sudo / 管理员权限,以及卸载与回滚方式

Anything uncertain must be marked unknown with a note on how to confirm it. This site's signal screen is a static snapshot, not a security audit.拿不准的必须标「未知」并说明要我怎么确认。本站的信号筛查是静态快照,不能替代安全审计。

Or use CLI install (for developers)或使用命令行安装(适合开发者)

CLI Install命令行安装

dsh plugin --profile web add github:iyllyt/dsh-btw --ignore-scripts

把 iyllyt/dsh-btw 加入你的 DSH 配置(web profile)即可启用。

READMEREADME

dsh-btw

为 DeepSeek Harness 复刻的 /btw 旁路提问插件。

个人很喜欢 Claude Code 里的 /btw 指令,于是为 DeepSeek Harness(DSH)做了一个复刻插件。

/btw 用来在不打断主 Agent 的情况下快速问一个与当前上下文有关的问题。问题由独立的一次性模型请求回答,结果显示在输入框上方的临时面板中;它不会成为主对话消息,也不会写入 DSH 的普通会话目录。

本项目是非官方社区插件,与 Anthropic、Claude Code 或 DeepSeek AI 没有关联。

/btw 是做什么的?

/btw 可以理解成在主会话旁边“顺手问一句”。当 Agent 正在执行一个较长任务时,你经常会临时想确认一个细节:刚才提到的配置文件叫什么、某段已经读过的代码为什么这样写、之前决定采用哪个方案。直接发送普通消息会改变主会话的走向并增加后续上下文,而另开会话又会失去当前任务已经积累的信息。

BTW 解决的正是这个夹缝问题:它读取截至提交时父会话可安全复用的上下文,独立生成一次回答,然后把结果放进可关闭的临时面板。主 Agent 继续原来的任务,问题和回答也不会进入普通会话历史。

它的核心价值是:

  • 不打断主任务:主 Agent 正在思考或调用工具时仍可提问,BTW 在旁路独立运行。
  • 不污染主上下文:临时问题不会改变主任务方向,也不会占用后续对话历史。
  • 不用重新交代背景:它知道父会话已经讨论过的代码、结论和决策。
  • 快速确认细节:适合答案已经存在于当前上下文中的短问题。

典型用法:

/btw 刚才说的配置文件叫什么?
/btw 为什么这里选择队列而不是直接执行?
/btw 我们最终决定使用哪种缓存策略?
/btw 这个报错和刚才修改的代码有关吗?

什么时候不该用 /btw?

需求 应该选择
询问当前会话已经知道的内容,只需要一次快速回答 /btw
需要读取尚未看过的文件、执行命令或联网搜索 普通消息或 subagent
需要连续追问、共同讨论或改变实现方案 普通消息
需要真正修改文件或执行操作 普通消息或带工具的 subagent

BTW 没有工具权限,也没有后续轮次。它不是免费的本地查询,而是额外的一次模型请求;插件会尽可能复用父请求的共享 prompt/cache 前缀,以降低重复上下文的成本。

这一交互定位参考了 Claude Code 官方 /btw 文档,DSH 版本的底层实现、私有 sidechain 和缓存兼容层均为本项目独立实现。

功能

能力 行为
主任务并行 主 Agent 忙碌时也可以提交 /btw,主任务不会被暂停
共享上下文 复用父会话当前的模型配置、系统提示词、工具 schema 和安全消息前缀
一次性回答 只进行一轮模型生成,不执行工具,也不会继续追问
会话隔离 不向主 SessionStore 写入用户消息、回答或隐藏 Session
临时界面 Markdown 回答显示在 composer 上方,不遮挡输入框
隐私存档 可选择私有 JSONL、仅内存或完全不保存三种 sidechain 模式
缓存保护 Anthropic/pi-ai 路由把缓存边界移回共享前缀;其他路由交给 provider 管理
可取消 关闭面板会中止请求,并支持独立超时控制

使用效果

先在主会话发送至少一条消息,然后在输入框中输入:

/btw 这个错误最可能是什么原因?

DSH 会立即释放输入框,主 Agent 可以继续工作。BTW 回答完成后会显示在输入框正上方。

  • ↑ / ↓:滚动长回答
  • Enter / Space / Esc:关闭回答
  • 请求尚未完成时点击 Cancel:中止本次 BTW

面板关闭后,BTW 不会出现在主对话历史、会话侧栏或普通 Session log 中。

实现架构

flowchart LR
    A["Composer: /btw question"] --> B["Client InputTrigger"]
    B --> C["Session-scoped BtwController"]
    C -->|"authenticated /api/dsh-btw/ask"| D["Host BTW Service"]
    D --> E["Context Snapshot"]
    E --> F["Tool-free One-shot LLM"]
    D --> G["Private Sidechain Kernel"]
    F --> H["Composer Dock Panel"]

Showing the opening section of the README — the full document lives in the repository以上为 README 开头摘要,完整文档在仓库内 · View the full README on GitHub →在 GitHub 查看完整 README →

← 上一个 Prev dsh-novel-solo 下一个 Next dsh-ssh →