TRAE-style conversation rollback — per-turn checkpoints (10-turn sliding window) roll back touched files and truncate model context in place, keeping the same session id. Human-initiated only: a /rollback command or a per-turn Web button (works on interrupted turns too), with a preview listing each affected file and its action — restore, recover, delete, or skip.
Install
# from npm (prebuilt)
dsh plugin --profile web add @domitor-syh/dsh-rollback
# from GitHub (first run asks for allowBuilds approval — follow the hint, retry)
dsh plugin --profile web add github:domitor-syh/dsh-rollback
Any plugin you install runs third-party code with your own permissions — it can read your files, use your credentials, and reach the network, and tool approvals don’t sandbox it. GitHub-sourced plugins also run build scripts at install time — pnpm blocks those until you allow them, so an install can stop with ERR_PNPM_GIT_DEP_PREPARE_NOT_ALLOWED or ERR_PNPM_IGNORED_BUILDS; dsh prints the exact key to add under allowBuilds in your profile’s pnpm-workspace.yaml, and the install works on the next run. Allowing a build is a trust decision: only install sources you trust, and pin a commit (github:owner/repo#sha).
README
dsh-rollback · TRAE-style rollback plugin
中文 · English
Turn-based rollback for the DeepSeek Harness (DSH) Web client: restore tracked file changes and withdraw the corresponding model-visible conversation while keeping the same session.
Features
- Turn-based rollback: choose from the latest 10 retained checkpoints using a button or
/rollback. - Files and conversation together: restore previous content, recover deleted files and undo file creation; files with equal initial and final states are left untouched.
- Confirm before execution: review affected files and external-change warnings in the dialog.
- Draft restoration: the confirmation flow attempts to put the original message and recoverable attachments back into the composer.
- Recovery progress retained: retry after failure or attempt compensation of file operations.
Install
Web (dsh web):
dsh plugin --profile web add @domitor-syh/dsh-rollback
Desktop (the official channel) — enter the package name @domitor-syh/dsh-rollback where plugins are installed, or use the equivalent command:
dsh plugin --profile desktop add @domitor-syh/dsh-rollback
After installing: restart dsh web and refresh the page on the web side, restart the desktop app on the desktop side. When running DSH from source, prefix the commands with pnpm.
The current target is DSH 0.2.1-rc.3. That version changes no host API this plugin uses; the client-side changes only add navigation customization and analytics plus adaptive Tooltip placement, so no plugin code change is needed. The declared compatibility range remains >=0.1.5-rc.2 <0.2.0-0 || >=0.2.0-rc.2 <0.3.0-0 (already covering 0.2.1-rc.3); older versions have not been revalidated for this adaptation.
0.5.1 fixes relative file paths capturing a same-named file in the original directory after the session working directory changes. Rollback continues to use the target path recorded when the file was changed.
Usage
There are three ways to use the plugin:
- Rollback button: click Rollback on an ended turn → review affected files → confirm rollback.
/rollback: enter/rollbackwithout arguments → open the turn picker → choose a target turn → review affected files and confirm rollback./rollback+ Space: type/rollbackand press Space → open the subcommand menu → select a command or arguments → press Enter to execute. Selecting a menu item only completes arguments; it does not execute immediately.previewopens a turn submenu; press Esc to return.
| Command | Purpose |
|---|---|
/rollback |
Choose a turn and open the confirmation dialog |
/rollback latest |
Directly roll back the latest checkpoint |
/rollback <n> |
Directly roll back to before turn n |
/rollback list |
List available turns |
/rollback preview <n> |
Preview affected files |
/rollback retry |
Continue an unfinished recovery |
/rollback abort |
Attempt file compensation before conversation withdrawal is committed |
/rollback rescues |
List file rescue points without restoring them |
/rollback state |
Show the current rollback state |
/rollback diagnose |
Show diagnostics |
latest and numeric commands execute directly without a confirmation dialog. Use the interface or preview to inspect changes first.
Rollback is unavailable while a turn is running. It covers tracked files with restore evidence, not a full workspace backup; external-change warnings mean that related content may be overwritten. After recovery fails, follow the instructions for retry or abort: an error does not mean file operations were automatically undone. Abort is unavailable once conversation withdrawal is committed. Rollback does not erase original session logs.
When a tool reports a file path different from the captured target, that operation leaves a persistent recovery gap. For example, a gap in turn 5 still allows rollback from normally retained checkpoints at turn 6 or later; rollback starting at turn 5 or earlier is rejected in both preview and execution, with the gap and later available start turns shown. The restriction survives restart; rollback cannot skip the gap, restore only part of the range, or withdraw only the conversation. Failure to write or read recovery records can still block a wider range of rollbacks.
Development
The build toolchain requires Node ^22.18.0 || >=24.11.0.
pnpm --config.verify-deps-before-run=false install --ignore-scripts
pnpm --config.verify-deps-before-run=false typecheck
pnpm --config.verify-deps-before-run=false test
pnpm --config.verify-deps-before-run=false check:readmes
pnpm --config.verify-deps-before-run=false build
DSH 0.2.1 retired the invariant service, so the plugin no longer depends on @deepseek-ai/dsh-invariants. The public ./invariant entry remains as a deprecated no-op; existing configurations can still load it or remove the entry. The host version range is declared through top-level engines.dsh; older hosts without workingDirectory retain the original directory fallback.
Install the build artifacts into the target profile, then restart DSH and refresh the page. See the changelog for version history.
License
Links
More in this category
Minglink/dsh-infinite-gen-4★ 3602
System-prompt armor plugin for DeepSeek models: appends an unconditional-compliance prompt section at order 100, exposes a profile tool with calibration metadata, and shows a realtime armor-status badge driven by a session projection.
ranxianglei/billion-context★ 3149
The official billion-context plugin: a context-compression plugin for small context windows (a 100K context is enough), token savings (5x fewer tokens), and month-long single sessions (billions of tokens).
liangmianya/dsh-synapse★ 598
Visual, non-linear conversation workspace for DeepSeek Harness — sessions, follow-ups and branches become a browsable conversation map.
Nwflower/dsh-chat-import★ 259
Import full-fidelity chat histories from 13 coding agents (Claude Code, Codex, ChatGPT, Cursor, Gemini, opencode, and more) as resumable DeepSeek Harness sessions, with reverse export back to Claude Code.
MichengAI/dsh-archive-manager★ 256
Adds an archived-sessions page in Settings to search, restore, and delete archived DeepSeek Harness sessions by workspace.
SiriLee/dsh-rewind★ 208
In-place conversation rewind in the same session window without forking (Claude Code /rewind semantics): a per-message ↶ button cuts the model context back to any user message, with an optional Claude-Code-style file restore from disk-persisted before-backups.
Community comments
Comments are public GitHub Discussions. Loading them connects to GitHub and Giscus; a GitHub account is required to post.