In the agent development workflow of DeepSeek Harness (DSH), adjusting historical prompts or rolling back project files often requires manual editing or cumbersome session operations. The dsh-rewind plugin aims to solve this pain point by providing a real-time rewind experience similar to OpenChamber and supporting automatic project file rollback when continuing a conversation at a rewind point.
Plugin Introduction¶
dsh-rewind is a DeepSeek Harness (DSH) plugin, modified based on Da-Mie/dsh-rewind. It leverages DSH’s native fork, archive, and append-only session log capabilities, combined with the plugin’s own project snapshot mechanism, to achieve seamless timeline rewind and file state restoration.
Core Features¶
-
Timeline Dialog
- Press the shortcut
Alt + Tto open the timeline dialog. - Supports searching user messages, with automatic scrolling and positioning after clicking.
- Click the inline
↩icon in the timeline to rewind directly.
- Press the shortcut
-
Inline Rewind
- User message row: Click
↩to rewind to that message. - Assistant reply row: Click
↩to rewind to after that reply.
- User message row: Click
-
Rewind Mode Selection
- After clicking
↩, a selection window appears, allowing you to specify the rewind method:- Conversation-only rewind: Rewinds the conversation context; subsequent new prompts will not roll back files.
- Rewind modified content: Rewinds the conversation, and subsequent new prompts will trigger project file rollback.
- After clicking
-
Seamless Background Switching
- After clicking rewind, the interface immediately shows a dock bar saying “N messages rewound,” and the rewound prompt text is automatically filled into the original input box (directly editable).
- Forking, preloading, and switching of the session are completed in the background, so users do not perceive any delay.
- Provides options to
[Restore to this]or[Restore all]individually.
-
Zero-Flicker Send
- In the rewound state, pressing Enter in the input box sends directly, and the conversation continues without any extra session switching.
- File rollback and archiving of the old session are performed asynchronously in the background, without affecting the current conversation flow.
Installation and Configuration¶
Installation¶
DSH supports automatic installation. Just send the repository link to DSH:
请安装这个插件:https://github.com/ddll8023/dsh-rewind
DSH will read the installation guide document in the repository and automatically complete the cloning, linking, registration, and restart process.
Manual Installation (Alternative)¶
If manual operation is required, follow these steps:
- Clone the repository to a stable directory, for example
E:\AI_apps\DSH\DSH_WorkFile\plugins\dsh-rewind. - Create a junction under
$env:USERPROFILE\.dsh\profiles\node_modulespointing to the package directory. - Add
"dsh-rewind": "link:<package path>"todependenciesinprofiles\web\package.json, and append"dsh-rewind"todsh.profile.bundles. - Restart the DSH desktop app backend and refresh the browser to load
lib/client.js.
Configuration¶
The plugin can be configured through cordis.yml. It is passed as the second argument to apply:
enabled: true
# 可选:覆盖默认的排除目录列表(如 node_modules/.git 等)
excludes:
- node_modules
- .git
Mechanisms and Limitations¶
- Rewind Boundary: Rewinding is only possible to completed turn boundaries. It cannot rewind into a turn that is still in progress (not yet
turn/end). Rewinding to the first message creates a new empty session branch. - Long Session Handling: Fork requires replaying the prefix event log on the host side, and the cost increases with session length. When rewind is clicked, the interface immediately shows “Processing” and refills the prompt, while the actual session switch is completed in the background.
- File Rollback: File rollback is performed asynchronously after sending a new prompt. It is usually faster than the Agent’s first file write, but is not strictly synchronized with the first reply.
- Original Session Management: The original session is archived only after sending a new prompt (hidden in the sidebar, with disk data retained for recovery).
Use Cases¶
- Scenarios that require frequently adjusting historical prompts during long conversations.
- Scenarios that require rolling back project files to a specific historical state and continuing development.
- Users who are accustomed to OpenChamber-style timeline interactions.
This plugin runs with the permissions of the current DSH process. It is recommended to check the source code and license before installation.