SiriLee/dsh-rewind 预览 preview

SiriLee/dsh-rewind

Plugin插件 Native原生 ⭐ 107 MIT Sessions & Context会话与上下文

DeepSeek Harness插件:在同一会话窗口内进行就地对话回退(Claude Code /rewind语义) + 可选的文件恢复

Project Overview项目介绍

This is a native plugin built exclusively for DeepSeek Harness (DSH) that adds conversation rewind functionality to DSH. To install the plugin, you first confirm that your DSH version matches the required peer dependency, then run the DSH CLI command dsh plugin --profile web add dsh-rewind-plugin@<version> to add it to your DSH instance. Note that the correct npm package name is dsh-rewind-plugin, not the conflicting dsh-rewind published by another author on npm. It lets you rewind conversation to any earlier user message without creating a new branch or switching windows, and it can also restore modified workspace files.

This plugin is designed for DSH users who need to correct mistakes in earlier conversation or adjust their development direction after multiple turns. To use the rewind feature, you can either click the rewind button next to any user message, or run the /rewind slash command to pull up a list of candidate messages to select from. After selecting your target message, you can choose to either only rewind the conversation, or rewind both the conversation and modified code files. The rewind takes effect immediately, and the target message’s text is automatically loaded into the input box for editing before resending.

This plugin is released under the permissive MIT open source license, and it has no external dependencies, so it does not require a Git repository to work. By default, file snapshots are stored in the ~/.dsh/rewind-snapshots/ directory, and the plugin automatically deduplicates snapshots for the same conversation to save storage space. It also supports an optional, disabled-by-default automatic cleanup feature that removes snapshots for inactive sessions after a configurable number of days. One important caveat is that rewinds themselves cannot be undone, but all withdrawn content is retained in the conversation log so it is never permanently lost.

这是一款专为 DeepSeek Harness(DSH)开发的原生插件,核心功能是支持一键将对话就地回退到任意更早的用户消息,无需新建分支或切换窗口,同时还能还原编辑过的工作区文件,完全对齐 Claude Code 的 /rewind 语义。用户可以通过 DSH 命令行工具 dsh plugin --profile web add dsh-rewind-plugin@<版本> 完成安装,适配要求的 DSH 版本在包的 peerDependencies 中声明。

面向需要修正早期对话错误或调整开发方向的 DSH 用户,本插件的日常使用流程非常简单清晰。你既可以直接点击任意用户消息操作栏的回退按钮,也可以输入 /rewind 命令唤起候选消息列表选择目标,之后选择仅回退对话或者同时回退对话和代码。回退会立即生效,目标消息文本自动回填输入框,修改后可以直接重发。

本插件采用 MIT 许可证开源,无额外依赖,不需要 Git 环境即可运行。快照默认存储在 ~/.dsh/rewind-snapshots/,插件会自动对同一会话的快照去重,还支持配置自动清理长期不活跃会话的快照。需要注意回退本身无法撤销,但撤回内容会完整保留在会话日志中,不会丢失数据。

Pre-install check安装前体检Compatibility · Security兼容性 · 安全性 no risk signal found未发现风险信号
  • This site's static screen found no obvious risk signal (stars, license, activity, manifest)本站静态筛查没发现明显风险信号(星标、许可证、更新活跃度、清单完整度)
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:SiriLee/dsh-rewind

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

READMEREADME

dsh-rewind

DeepSeek Harness 插件:一键就地回退对话到任意更早的用户消息——同窗口内完成,不新建分支、不换窗口,可一并还原工作区文件(完整 Claude Code /rewind 语义)。

npm version npm downloads tests

English | 中文

刻意聚焦、保持极简,只做一件事:就地回退到任意远的用户消息,还能顺手还原改过的文件。

  • 就地消息回退——目标消息及其之后的内容同时从模型上下文和渲染对话中撤回,目标消息文本自动回填输入框。始终在原会话内完成,不新建分支、不残留副本。
  • 轻量备份还原——对齐 Claude Code:追踪写类工具编辑过的文件,回退时一并还原,已跟踪文件的外部变更也能还原。局部追踪、写前备份、不变不存,不依赖 git。
  • 安全保障——会话日志仅追加回退标记,从不删改;文件备份与还原经安全加固;完备测试,随 DSH 升级长期维护。安全模型:SECURITY.md。

效果预览

每条用户消息的操作行都有一个 ↶ 回退 按钮。点击后弹出模式选择浮层——「仅回退对话」或「回退对话和代码」,后者会先展示文件变更清单再确认。还可以通过 /rewind 和 /undo 命令便捷地选择和回退。

用户消息旁的 ↶ 回退按钮
用户消息旁的 ↶ 回退按钮
模式选择浮层
模式选择浮层
影响清单
「回退对话和代码」影响清单
/rewind 候选面板
/rewind 候选面板

安装

确认本机 DSH 版本后,在 Release 找到适配的插件版本。

命令行:

dsh plugin --profile <name> add dsh-rewind-plugin@<版本>

图形界面:侧栏「插件」页 →「添加插件」→ 填 dsh-rewind-plugin@<版本> → 安装 → 重启 DSH 并刷新浏览器。

「添加插件」弹窗:在输入框填入 dsh-rewind-plugin@版本号
图片仅为示例,请以实际适配版本号为准。

更新:命令行可直接覆盖安装;图形界面会拒绝重复安装,需先卸载旧版本,再装新版本。

[!WARNING] npm 上的 dsh-rewind 属于其他作者,请用 dsh-rewind-plugin 安装。

使用

  1. 在对话中找到要回退的那条用户消息,或输入 /rewind(或其别名 /undo)打开候选列表选择。
  2. 选中它。 小浮层提供两种模式——「仅回退对话」或「回退对话和代码」。
  3. 回退立即生效:对话回到目标消息当时的样子,目标消息的文本自动回填输入框——改完直接重发。

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-turn-delete 下一个 Next DSH-Creator →