Claude Code session
Dsh Rewind
DSH 插件:便捷无感的同窗口内对话回退,从不新建分支;自带轻量工作区备份,可一并还原文件(Claude Code /rewind 语义)。 · DSH plugin: effortless in-window conversation rewind — never forking a new session; ships a lightweight workspace backup that restores files together with the rewind (Claude Code /rewind semantics).
Install
git clone https://github.com/SiriLee/dsh-rewind.gitFrom the README
dsh-rewind
DeepSeek Harness 插件:一键就地回退对话到任意更早的用户消息。
同窗口内完成,不新建分支、不换窗口,可一并还原工作区文件——即完整的 Claude Code /rewind 语义。
English | 中文
刻意聚焦、保持极简,只做一件事:就地回退到任意远的用户消息,还能顺手还原改过的文件。
- 就地消息回退——目标消息及其之后的内容同时从模型上下文和渲染对话中撤回,目标消息文本自动回填输入框。始终在原会话内完成,不新建分支、不残留副本。
- 轻量备份还原——对齐 Claude Code:追踪写类工具编辑过的文件,回退时一并还原,已跟踪文件的外部变更也能还原。局部追踪、写前备份、不变不存,不依赖 git。
- 安全保障——会话日志仅追加回退标记,从不删改;文件备份与还原经安全加固;完备测试,随 DSH 升级长期维护。安全模型:SECURITY.md。
效果预览
每条用户消息的操作行都有一个 ↶ 回退 按钮。点击后弹出模式选择浮层——「仅回退对话」或「回退对话和文件」,后者会先展示文件变更清单再确认。还可以通过 /rewind 和 /undo 命令便捷地选择和回退。
用户消息旁的 ↶ 回退按钮
模式选择浮层
「回退对话和文件」影响清单
/rewind 候选面板
安装
确认本机 DSH 版本后,在 Release 找到适配的插件版本。
命令行:
图形界面:侧栏「插件」页 →「添加插件」→ 填 dsh-rewind-plugin@ → 安装 → 重启 DSH。
图片仅为示例,请以实际适配版本号为准。
npm 上的 dsh-rewind 属于其他作者,请用 dsh-rewind-plugin 安装。
使用
1. 在对话中找到要回退的那条用户消息,或输入 /rewind(或其别名 /undo)打开候选列表选择。
2. 选中它。 小浮层提供两种模式——「仅回退对话」或「回退对话和文件」。
3. 回退立即生效:对话回到目标消息当时的样子,目标消息的文本自动回填输入框——改完直接重发。
键盘操作:候选列表与模式浮层均支持 ↑↓ 移动、Enter 确认、Esc 取消/返回。
边界说明
- 回退内容完整保存——被撤回的内容仍在日志中,可在「轨迹」面板查看;也可禁用插件让它们重新显示(仅界面)。
- 回退无法原地撤销——但可以先禁用插件让被撤回的内容重新显示,再在回退前的位置上点「在新对话中分支」,新会话的上下文即可包含这些内容。
- 插话也能回退——模型尚未读取的 steering 插话消息,同样可作为回退目标,不会打断当前生成。
- 回退已读消息会打断当前正在运行的回合——确保回退的安全执行。
存储管理
快照备份(默认开启):用于文件还原;可在本插件的配置卡片中关闭。关闭后不再创建新的快照,关闭期间的文件改动无法还原。快照存储于 /rewind-snapshots/(默认 ~/.dsh/rewind-snapshots/)。手动删除该目录仅清除文件备份,对话回退不受影响,插件可自动重建。
快照自动清理(默认关闭):把长期不活跃的会话快照整目录移除,不影响活动会话与对话日志。可在配置卡片查看与配置(自动清理开关、失活天数),也可用 /snapshot-auto-cleanup 命令查看、设置和运行。详见:快照自动清理。
卸载
本插件的配置项保存在当前 Profile 的配置文件 cordis.patch.yml 中。如需彻底清理,可手动删除对应条目。
本插件的作用
相较于默认行为,本插件带来的变化:
原理
整套设计只有两条主线,核心哲学朴素却克制:对话部分「只遮蔽、不删除」,使用 DSH 原生的「隐藏 + 替换」机制;文件部分「局部追踪,写前轻量备份」,参考 Claude Code 的检查点语义。
1. 对话回退:一次「遮蔽」,而不是「删除」
append-only 是铁律:会话日志只追加、从不改写——这是可审计与信息安全的地基。回退从不动历史,它只做一步:往日志末尾追加一条 “空消息”标记,把目标消息及其之后的全部内容「遮蔽 + 替换」掉,让模型和界面都只看得到目标之前的部分。
-…Details
- Repository
- SiriLee/dsh-rewind
- Language
- TypeScript
- License
- MIT
- Last updated
- 3 November 2026
- Topics
- backupchatcheckpointconversationdeepseek-harnessdshdsh-pluginedithistorymessageregenerateresend
FAQ
What is Dsh Rewind?
DSH 插件:便捷无感的同窗口内对话回退,从不新建分支;自带轻量工作区备份,可一并还原文件(Claude Code /rewind 语义)。 · DSH plugin: effortless in-window conversation rewind — never forking a new session; ships a lightweight workspace backup that restores files together with the rewind (Claude Code /rewind semantics). It is a session for Claude Code, from SiriLee/dsh-rewind on GitHub.
How do I install Dsh Rewind?
Clone SiriLee/dsh-rewind from GitHub and follow the setup steps in its README.
Is Dsh Rewind popular?
SiriLee/dsh-rewind has 237 GitHub stars and 15 forks. It was last updated on 3 November 2026.
More sessions & history
Claude Remember
207Digital-Process-Tools/claude-remember
Persistent memory for Claude Code — identity, context, and continuity across sessions
MemoSync
206SLEEPYBQ/MemoSync
Co-manage memory with your coding agent across sessions. A local workbench for Claude Code, Codex and Pi.
Tailclaude
267rohitg00/tailclaude
Claude Code on your Tailscale tailnet, powered by the iii engine.
Cchistory
140eckardt/cchistory
Like the shell history command but for your Claude Code sessions.
Grov
192TonyStef/Grov
Grov automatically captures the context from your private AI sessions and syncs it to a shared team memory. It auto injects relevant memories across developers and future sessions to save tokens and time spent on tasks.
Session Migrate
169xhluca/session-migrate
Migrate coding agent sessions across 18 harnesses (Claude Code, Codex, Pi, OpenCode, Copilot, Antigravity, Vibe, Muse, Qwen, Kimi, Cursor, etc.)
Browse the most popular Claude Code mods, all sessions & history, or the skills and MCP server directories.