Skip to main content

How to use dsh-recall-plugin

Add a recall button next to DSH user messages to roll back both project files and conversation history to their state before that message was sent, using shadow git repository snapshots with official sessions.fork.

This article is auto-derived from indexed fields (wiki / faq / compatibility_json), not freshly AI-generated.

This article is derived from the plugin's already-indexed fields (wiki / faq / compatibility_json / readme), not freshly generated by AI. Source field is noted at the end of each section.

Quick start

dsh-recall-plugin

— source: plugin_wiki.wiki_content

Install & verify

dsh plugin --profile web add dsh-recall-plugin

Run the command above in your DSH Web Profile. Then enable the plugin in the plugin list.

— source: plugins.install

Key points

  • 设置页 · 排除项快速编辑(设置 → 插件 → 撤回设置)
  • 文件 + 对话,整段回退:撤回的不只是聊天记录,agent 改过的文件也一并回到原样。
  • 不碰你项目自己的 git:快照存在独立的影子 git 仓库里,你的分支、暂存区、未提交改动统统不受影响;.git、node_modules 自动排除。
  • 项目目录保持干净:快照始终存在 $DSH_HOME 下,不会往项目里塞任何东西;与会话的沙箱权限无关(workspace-write / read-only 会话照常快照与回退),仅当 home 本身不可写(如指到只读盘)才降级到项目内 .dsh-recall-snapshots(降级时页面会提示),home 恢复后自动迁走、清理干净。
  • 可以反复后悔:只要会话还在(含归档),快照全量保留、不修剪。撤回一次后还能再撤到更早;撤回时被覆盖的文件也一直找得回来。会话被彻底删除后,其快照随之清理(见下)。

— source: plugin_wiki.readme_en (fallback readme_raw)

FAQ

What if the recall button doesn't appear?

In most cases it's because the DSH process wasn't restarted, or git CLI isn't in PATH — messages sent before the plugin was enabled had no snapshots in the first place, so the button won't appear either (README.md:69).

Will recall pollute the project's own git repository?

No. Snapshots are stored in a separate shadow git repository under home (~/.dsh/dsh-recall-snapshots//), no branches are created, the staging area is untouched, and .git/node_modules in the project are automatically excluded (README.md:34).

Where is data stored when home is not writable?

Falls back to .dsh-recall-snapshots/ in the project, and a fallback prompt will appear at the top of the page; once home is restored, the next snapshot will migrate the fallback data back to home and clean up the project directory (README.md:35, lib/store.js:259-289).

How to customize what doesn't go into snapshots?

Go to Settings → Plugins → Recall Settings to visually edit exclude.txt (gitignore syntax), and the next snapshot/rollback will take effect immediately after saving; alternatively, directly edit dsh-recall-snapshots/exclude.txt under home (README.md:85-94).

Are snapshots still there after a session is deleted?

No. Archiving doesn't count as deletion — the original session snapshots archived by the recall feature are preserved; only when session logs disappear from disk will the next maintenance automatically clean up all snapshots for that session (README.md:84, lib/maintenance.js:66-85).

If I recall the wrong thing, can I get it back?

Yes. Before rollback, an unlisted snap-pre-rollback- safe snapshot tag is automatically created, which can still be found via orphan reconstruction or manual git tag, and you can restore from that tag (CHANGELOG.md:40-41).

Will snapshot data be deleted together after uninstall?

No. dsh plugin --profile web remove only removes dependencies and mount layers, with snapshot data preserved in dsh-recall-snapshots/ under home; to completely clear it, manually delete that directory (README.md:71).

Why does the first user message only rollback files but not conversation?

Because forking requires an earlier turn boundary, and there's no point to cut before the first message, so only file rollback is done while keeping the conversation (README.md:45).

— source: plugin_wiki.faq_json

Compatibility

  • DSH: >=0.1.0-rc.8 (peerDependencies)
  • Node: >=20 (engines.node)

— source: plugin_wiki.compatibility_json

Pitfalls

Review the upstream repo before installing. This guide is auto-derived from indexed fields and may lag the latest release. If anything contradicts the official docs, treat the upstream source as authoritative.

— source: general rule

How to use dsh-recall-plugin