Skip to content

DfsyJian/dsh-snapshot

31Last commit Aug 15, 2026

dsh-snapshot DSH plugin

dsh-snapshot automatically saves file content before every write/edit/delete by the agent. It provides a sidebar timeline panel and a /rollback command to restore any historical snapshot. The plugin groups snapshots by user message, allowing whole-group rollback.

How to install the dsh-snapshot DSH plugin

dsh plugin --profile web add dsh-snapshot

Copying does not run this command. Review the repository and version before installing the dsh-snapshot DSH plugin.

dsh-snapshot DSH plugin data source

dsh-snapshot DSH plugin snapshot date: Aug 16, 2026

discovered

What the dsh-snapshot DSH plugin can do

  • Auto-snapshot before write, edit, and shell delete operations
  • Group snapshots by user message for one-click rollback of the entire group
  • Sidebar timeline panel showing snapshot history with file statistics
  • `/rollback` command with searchable selection panel
  • Configurable settings via settings page or configuration file

Where the dsh-snapshot DSH plugin fits

  • Recover from accidental file deletion or overwrite during AI agent sessions
  • Compare different versions of a file after multiple edits
  • Roll back to a specific point in the conversation history
  • Clear all snapshots when starting a new task

Who the dsh-snapshot DSH plugin is for

  • Developers using DSH web for AI-assisted coding
  • Users who need a safety net for agent file modifications

dsh-snapshot DSH plugin limitations

  • Requires DSH web and pnpm to be installed
  • Settings form in the official npm release is not editable until the host is updated; use configuration file method instead
  • After updating the plugin, you must fully exit DSH web, restart, and hard refresh the browser (Ctrl+Shift+R) to clear the bundle cache

dsh-snapshot DSH plugin: from the repository README

Quoted from the DfsyJian/dsh-snapshot README, the upstream source of the dsh-snapshot DSH plugin. Copyright remains with the original authors.

**自动快照、一键回滚**的 DeepSeek Harness(DSH)Web 插件。 > Agent 每次 `write`/`edit` 前自动保存目标文件内容,经 shell 执行删除(如 `Remove-Item`、`rm`)时也先保存被删文件内容,支持 `/rollback` 命令恢复到任意历史快照(类似 Trae 的 Checkpoint 能力)。 > 附带侧边栏 **“快照时间线”** 面板与 **设置页配置卡片**。 --- ## 功能 每次 `write`/`edit` 前自动快照目标文件内容;agent 经 shell 执行删除(如 `Remove-Item`、`rm`)时,先快照被删文件的内容再放行。所有快照追加进该会话的 `snapshots.jsonl`。同一用户消息引发的所有快照自动归为一组:**时间线以「对话」为单位显示一行,撤回一行即整体还原该对话产生的全部修改**。 ### 界面操作 - **快照时间线** 侧边栏底部「快照」按钮点击打开面板,列出当前会话的快照历史。 - **一行 = 一次对话**:同一条用户消息引发的多次写入/编辑/删除合并为一行,显示该消息的预览与「创建/修改/删除」统计(如 `创建 ×2 · 修改 ×1`,只列出出现的类型;**按文件数统计**,同一文件多次写入只计一次);仅改动一个文件时附上文件路径。 - 点击某行即**整体撤回该对话产生的全部修改**(撤回前自动记录当前状态,支持再次撤回)。 - 撤回某一对话后,其后的历史默认一并折叠(由 `collapseOnRollback` 控制)。 - 悬浮在行上可查看该对话涉及每个文件的「创建/修改/删除」路径明细;悬浮在时间上可查看完整时间。 - 面板底部左下角为「检查更新」入口(探测 npm 最新版本),右下角显示插件版本号。 - 头部「清空」按钮可二次确认后删除全部快照。 - **`/rollback` 选择面板** 在输入框直接输入 `/rollback` 即可弹出可搜索的选择面板(交互与 `/model` 一致),无需记忆子命令: - 顶部为「清空快照」命令项,二次确认后删除该会话全部快照。 - 下方每个快照一行「撤回至快照 #N」,副行显示时间与「创建/修改/删除」的文件路径明细;输入序号、文件名或操作类型可即时过滤。 - 选中任意撤回项后先弹出风险确认条,确认后才执行回滚。 <div align="center"> <img src="docs/timeline1.png" alt="侧栏快照时间线" width="600" /> </div> - **配置卡片** 设置页「插件配置」中的 snapshot 卡片。布尔字段为二态开关,数字字段留空或点击「恢复默认」即可回退,

Read the full READMERepository license: MIT

dsh-snapshot DSH plugin questions

How do I install dsh-snapshot?

Run `dsh plugin --profile web add dsh-snapshot`. If you don't have the global dsh CLI, use `npx @deepseek-ai/dsh plugin --profile web add dsh-snapshot`. Make sure pnpm is installed.

How do I rollback to a previous snapshot?

Type `/rollback` in the chat input to open the selection panel, then choose a snapshot group or use `/rollback <seq> --yes` to rollback. You can also click on a timeline entry in the sidebar panel.

Where can I see the snapshot history?

Click the 'Snapshot' button at the bottom of the sidebar to open the timeline panel. Each row represents a user message group with file statistics.

How do I configure the plugin?

You can edit the settings in the DSH settings page (under 'Plugins' → 'snapshot') or directly modify `~/.dsh/settings.yaml` or `~/.dsh/profiles/web/cordis.yml`. Refer to the configuration table in the README.

The plugin doesn't work after updating. What should I do?

Fully exit DSH web (not just close the browser tab), restart it, and then hard refresh the browser with Ctrl+Shift+R to clear the bundle cache. The old client bundle may still be cached otherwise.