Preface¶
In DSH, having an agent modify code typically involves sending a command, waiting for it to edit files and run tools, discovering the direction is wrong, then issuing a “revert the recent changes” command or manually running git checkout. On the chat side, you’d need to start a new session or manually find a branching point in the history. File state and chat history are two separate tracks, making it difficult to precisely return to the overall state “before that message was sent.”
dsh-recall-plugin adds a “↶ Recall” button next to each user message: upon confirmation, both the workspace files and conversation history revert to the state before that message was sent. Snapshots are stored in an independent shadow git repository, without affecting the project’s own git branches or staging area.
What This Is¶
- Plugin Name:
dsh-recall-plugin(same as the npm package name) - Maintainer: limbo947
- Category: Client-side (DSH web profile)
- Current Version: 1.7.1 (MIT License)
- GitHub: limbo947/dsh-recall-plugin (approx. 25 stars)
- Directory Page: SkillHub Plugin Page
One-line summary: Adds a recall entry point next to the user message bubble, reverting both project files (via shadow git snapshots) and conversation history (via DSH’s official sessions.fork) to the state before that message was sent.
Core Features¶
File + Conversation Block Rollback¶
When each user message is sent (before the agent modifies files), the workspace is snapshotted into an independent shadow git repository. After clicking “↶ Recall,” a confirmation panel appears, listing the files that will be changed (modified / restored / deleted). The restoration only proceeds after confirmation. Files are restored to their state before that message was sent; the view switches to a new session (that message and subsequent conversations are removed), and the original session is archived and can be retrieved at any time.
After recall, the message text is repopulated into the input box by default for easy modification and resending; this can be disabled in the settings card.
Does Not Affect the Project’s Own Git¶
Snapshots are stored in a shadow repository under $DSH_HOME, with the default path being dsh-recall-snapshots/<SHA256(absolute project path)>/. .git and node_modules are automatically excluded; the project’s branches, staging area, and uncommitted changes are unaffected. Snapshots use git delta compression, performing incremental updates rather than full directory copies. Large files exceeding 100MB are automatically skipped; the threshold can be adjusted in the settings card.
When the home directory is unwritable (e.g., pointing to a read-only drive), it degrades to a .dsh-recall-snapshots directory within the project, and the page will notify the user. Once the home directory becomes writable, data can be automatically migrated and cleaned up.
Supports Repeated Regrets¶
As long as the session exists (including archives), snapshots are fully retained and not pruned. After a recall, you can recall to an even earlier state; files overwritten during the recall can also be recovered. After a session is permanently deleted, its snapshots are automatically cleaned up during the next maintenance cycle; archiving does not count as deletion.
Fault Tolerance and Self-Healing (1.7.0+)¶
Snapshot failures, skipped paths, and consecutive failure circuit breakers trigger toast notifications at the top of the page (similar faults only notify once every 10 minutes); failure reasons can be viewed in the “Recent Errors” section of the settings card. After a snapshot failure, residual objects are automatically cleaned up; consecutive failures (3 or more) trigger exponential backoff circuit breaking, with automatic retry after the cooldown. Embedded git repositories or paths without read permissions are skipped and no longer cause entire snapshot failures; during recall, these paths are neither restored nor deleted.
Snapshot Maintenance¶
- Periodic GC: Background
git gcruns every 50 snapshots or 24 hours since the last GC (whichever triggers first). Thresholds can be modified in the settings card or overridden using environment variablesDSH_RECALL_GC_SNAPSandDSH_RECALL_GC_HOURS. - Exclusion List: Settings → Plugin Configuration → Recall Plugin, or directly edit
$DSH_HOME/dsh-recall-snapshots/exclude.txt(when$DSH_HOMEis not set, use~/.dsh/dsh-recall-snapshots/exclude.txt), with one gitignore-style pattern per line. - Tree Snapshot Management: The settings page displays snapshots in a three-level hierarchy: Workspace → Session → Snapshot, supporting expand/collapse and hierarchical deletion.
Installation and Enabling¶
Prerequisites: git CLI (if not installed, the recall button will not appear, and the page will notify at the top); Windows requires PowerShell 5.1 / 7, Linux/macOS requires bash + git; DSH 0.1.0-rc.x (peer dependencies are listed in the package’s peerDependencies, including @deepseek-ai/dsh-session and others at ^0.1.1-rc.2). Node.js >= 20.
Install and mount to the web profile using DSH’s official plugin command:
dsh plugin --profile web add dsh-recall-plugin
You can also install directly from GitHub (pure JS, no build steps required):
dsh plugin --profile web add github:limbo947/dsh-recall-plugin
After installation, restart the DSH process:
dsh web # Start directly in the foreground
pm2 restart <your-dsh-process-name> # If using pm2 for management
Verification: After restarting, hard-refresh the page (Ctrl+Shift+R). Hover over any user message sent after the plugin was enabled— if the “↶” symbol appears next to the copy button, it is active. If the button does not appear, the common reasons are that the DSH process was not restarted, or the git CLI is not in the PATH.
Uninstallation:
dsh plugin --profile web remove dsh-recall-plugin
Snapshot data remains in the home directory under dsh-recall-snapshots/; to completely remove it, manually delete that directory.
Typical Usage¶
- Hover the mouse over any user message sent after the plugin was enabled, and “↶ Recall” appears to the left of the copy button.
- After clicking, the confirmation panel displays the list of files that will be changed.
- Click “Confirm Rollback” → files are restored, the conversation switches to a new session, and the original session is archived for retention.
To directly view snapshot tags in the shadow repository:
git --git-dir="<store>\git\.git" tag -l
git --git-dir="<store>\git\.git" ls-tree -r --name-only snap-<messageID>
Here, <store> is the snapshot storage directory for the corresponding project.
Use Cases and Notes¶
Who It’s For: Developers who frequently have agents modify code in DSH and need to precisely return to the overall state (files + conversation) before a specific command.
Known Limitations (from the README):
- Snapshots are created when a message is sent; historical messages before the plugin was enabled have no snapshots and do not display the recall button.
- The first user message in a session cannot revert the conversation (only files), as the fork requires an earlier turn boundary.
- Nested git repositories within the workspace (subdirectories with their own
.git) cannot be indexed; the rest is snapshotted normally, but the content of nested repositories does not participate in rollback. - Windows has been fully verified on bare metal; Linux has been tested on WSL2 (Ubuntu 26.04); macOS scripts are written for bash 3.2 compatibility but have not been tested on bare metal.
Security Note: The plugin runs with the current DSH process permissions, reads and writes workspace files, and maintains a shadow repository under the home directory. Before installation, it is recommended to review the GitHub source code and the MIT license; SkillHub is a community directory site and has no official affiliation with DeepSeek or High-Flyer.
Conclusion¶
dsh-recall-plugin turns “recalling a message” into a confirmable, repeatable overall rollback: files via shadow git, conversation via official fork, both aligned to the same point in time. If you’re looking for client-side recall capabilities in the DSH ecosystem, you can install and try it from the directory page or GitHub.
- Directory page: https://www.skillhub.cn/plugins/limbo947/dsh-recall-plugin
- GitHub: https://github.com/limbo947/dsh-recall-plugin