dsh-rerun-turn
Infix rerun for DeepSeek Harness: re-run any earlier turn in place - the reply is regenerated from the same prompt while every later turn survives, so subsequent model calls read A B C1 D E F G. Implemented with the official surface-replace contract plus a faithful replay of the tail; the append-only session log is never rewritten. 适合需要微调历史对话且不希望丢失后续上下文的调试任务。
Install
$
npx -p @deepseek-ai/dsh dsh plugin --profile web add github:DDDMUC/dsh-rerun-turnREADME
Read the full README ↗使用
- 把鼠标移到想重跑的那条模型回答上,点 ↻(官方动作条最左,编辑铅笔旁边)。
- 后台立刻开始:旧的一轮及其后内容先从模型上下文移除,提示词重新发给模型,新回答流式出现;结束后后续轮次自动重放回来。期间按钮隐藏(避免和正在生成的轮次打架)。
- 界面上:被退役的旧行隐藏,新生成的回答与重放的行正常出现——最终看到的顺序就是模型读到的顺序。
默认一次点击即执行(配置 confirm: true 恢复二次确认)。
配置
- id: dsh-rerun-turn
config:
confirm: false # 默认 false:一次点击即执行
autoResume: true # 默认 true:中断的重放在会话空闲时自动续传
idleTimeoutMs: 600000 # 等待新回答落地的最长时间
devTools: false # 默认 false:端到端验证用的 /dev/* 回环路由
| 字段 | 默认 | 含义 |
|---|---|---|
confirm | false | 客户端是否先弹一次确认(按钮下方内联确认条)。 |
autoResume | true | /state 是否在会话活着、空闲、收件箱为空时自动完成被中断的重放(不花模型调用)。 |
idleTimeoutMs | 600000 | 等待新回答闭合的最长时间;超时后重放留给续传。 |
devTools | false | 是否挂载验证用回环路由 /dev/scratch、/dev/derived(会发真实模型调用)。 |
Usage
Hover a model reply, press ↻. The old turn and everything after it leave the model context, the prompt is sent again, the fresh answer streams in, and the later turns are replayed back automatically. Retired rows are hidden; the new answer and the replayed rows appear in the order the model reads them.
Configuration
| Field | Default | Meaning |
|---|---|---|
confirm | false | Ask for one inline confirmation before rerunning. |
autoResume | true | Let /state finish an interrupted replay (no model call). |
idleTimeoutMs | 600000 | How long to wait for the fresh answer to settle. |
devTools | false | Mount the loopback dev routes used by end-to-end verification. |