Bundle
dsh-steer
在大模型思考过程中,随时向当前会话注入纠偏/引导信息,或打断当前回合 — DSH bundle。
- Source
- CAI-MH
- License
- MIT
- Updated
- Updated yesterday
Readme
# 思考引导面板(dsh-steer)
在大模型**思考过程中**随时向当前会话注入纠偏/引导信息,或打断当前回合 —— 而不是等整个任务跑完才能再次输入对话。DSH bundle 插件。
## 能力
- **发送引导(steer)**:不打断当前回合,把纠偏信息注入正在运行的会话,模型在**下一步边界**读取(保留已完成的工作)。
- **打断(cancel)**:停止当前回合(保留排队中的消息)。
- 左下角悬浮球 🧭 带状态点:绿点 = 有会话正在思考,灰点 = 空闲。
- 自动列出并选中「正在思考」的会话;多个会话并行时可手动切换目标。
## 文件
- `index.js` — Host 半部分:`webServer` 路由 + `sessionController`(steer / cancel / list)
- `client.js` — 浏览器半部分:`shell.overlay` 悬浮面板
- `cordis.patch.yml` — host 组合插件行
- `package.json` — bundle 元数据
## 接口(同源 HTTP,仅本机回环 + 同源校验)
| 方法 | 路径 | 说明 |
|---|---|---|
| GET | `/api/steer/sessions` | 会话列表(含 `running` 标志) |
| POST | `/api/steer/message` | `{ sessionId, text, mode? }`,mode 默认 `steer`,失败退化为 `queue` |
| POST | `/api/steer/cancel` | `{ sessionId }` 打断当前回合 |
## 原理
依赖 DSH 宿主 `sessionController` 的**编排层 steer 通道**:
- `prompt({ requestId, sessionId, mode: 'steer', content })` 注入引导(消息以 `steering` 节点进入实时收件箱);
- `prompt(..., mode: 'queue')` 排队;
- `cancel({ sessionId })` 打断当前回合。
> 注:steer 的生效粒度是「下一步边界」,不是打断正在流式输出的 token。若模型卡在长时间工具调用里,引导需等该步自然结束才被读取;要立即全停请用「打断」。
## 安装
让 DSH 调用 `plugin_forge_install`(dir 指向本目录),或手动:
1. 拷贝本目录到 web profile 的 `node_modules/dsh-steer/`
2. profile `package.json` 注册 `dependencies` + `dsh.profile.bundles`
3. **重启 DSH Desktop 生效**(bundle 需重启才被加载器扫入)
## 维护
改代码 → 改本目录源文件 → 重新 `plugin_forge_install`(重新拷入 node_modules)→ 重启 DSH Desktop。
Install
dsh plugin --profile web add github:CAI-MH/dsh-steer#688cd5126ece1050627bae91aea7caa5eb6f03ce
Profile: web
With the hub plugin installed, ask your agent to install it by name — it resolves the same plan shown here.
dsh plugin --profile web add github:stvlynn/dsh.fish#path:packages/dsh-plugin-hub
install dsh-steer from the hub