How it behaves
Configuration changes are automatically snapshotted. Manual snapshots can be created from the WebUI, conversation commands or the CLI. Automatic storage keeps the most recent 20 files; manual snapshots are not automatically cleaned. Undo creates a redo or “regret” snapshot. Restoring plugin or mount-related changes may require restarting DSH. After an abnormal exit, the WebUI and GUI can identify the last-good snapshot. Before restoration, the plugin checks for missing plugins and reports them.
The snapshot covers these files and the user plugin code tree:
| Location |
Files |
| DSH profile |
cordis.patch.yml, package.json, cordis.yml, pnpm-workspace.yaml |
$DSH_HOME |
settings.yaml, .env |
| Plugin files |
User plugin code tree |
.env and credential data are redacted in snapshots and exported ZIP files. Actual values are kept in a local vault so a local rollback can restore them.
Commands
The documented CLI operations include:
snapshot — create a manual snapshot.
restore -Id <id> — restore a selected snapshot.
remove -Id <id> — delete a snapshot.
recent — view recent rollback records.
safe-mode -Label on — enable safe mode when DSH cannot boot.
The WebUI and offline GUI also provide undo, redo, rollback, deletion, import and export. Conversation commands include undo, undo_recent, “保存快照” and “回退到 <id>”.
Configuration and paths
The current profile is detected from dsh --profile mine or --profile=mine; dsh web falls back to web. Offline tools use DSH_UNDO_PROFILE or profileName, defaulting to web.
| Setting |
Default or behaviour |
DSH_HOME |
The DSH data home; otherwise the user home .dsh directory |
profileDir |
The current profile directory |
manualDir |
Manual snapshot repository |
autoDir |
Automatic snapshot repository |
profileName |
Profile name; offline default is web |
DSH_UNDO_SETTINGS |
Explicit settings-file override |
DSH_UNDO_ROOT |
Explicit snapshot-root override |
DSH_UNDO_EXPORT |
Explicit export-path override |
By default, settings are stored at $DSH_HOME/undo/settings.json, snapshots at $DSH_HOME/undo-snapshots/<profile>/{auto,manual}, and profiles at $DSH_HOME/profiles/<profile>. Explicit environment variables and configuration paths take precedence.
Requirements and recovery mode
The README requires DSH (@deepseek-ai/dsh) and Node.js ≥20. Safe mode disables every plugin except the undo system, saves a configuration backup, and can later be exited. The offline GUI and CLI are installed inside the plugin’s tools directory rather than on the desktop; the README documents .bat launchers and Windows paths.
Written from the project's own documentation and kept in sync with it. Where the two disagree, the source is authoritative — read the README on GitHub