Bundle
dsh-rewind
A /rewind picker for DeepSeek Harness: scroll to an earlier message and continue from a clean forked session, trimming all later context.
- Source
- jiangr100
- License
- MIT
- Updated
- Updated 2 days ago
Readme
# dsh-rewind
A `/rewind` plugin for [DeepSeek Harness (dsh)](https://github.com/deepseek-ai/deepseek-harness): rewind a conversation to any earlier message and continue from a clean forked session — all later context is trimmed away, reducing context pollution. The original conversation is archived (restorable from the sidebar); nothing is deleted.
## What it does
- **`/rewind`** opens a picker window above the composer (type it, or pick the `rewind` skill from the `/` menu).
- The window **opens at the most recent message** — scroll **up** through the conversation, then **click a line** to rewind to that message.
- Each line shows a preview, its position number, and how many later entries a rewind would drop. Messages in the still-open turn are dimmed and not selectable.
- Rewinding **forks a new session** at that message's completed turn, switches to it automatically, and **archives the original conversation** (restorable from the sidebar). The rewound session appears in the sidebar, titled like a fork (e.g. `Session (2)`).
- Close the window with **Esc**, **✕**, or by clicking outside. `/rewind <anything>` is ignored — the window is the only usage.
- A `rewind` **skill** is registered, so the model recognizes rewind requests and points you to `/rewind`.
## Requirements
- A DeepSeek Harness deployment (web profile layout, `$DSH_HOME/profiles/<name>`).
- `pnpm` on `PATH` (the `dsh plugin` command forwards to it).
## Installation
### Recommended (plugin bundle — no manual edits)
```bash
dsh plugin --profile web add github:jiangr100/dsh-rewind
```
Then restart the harness. `dsh plugin` installs the package into the profile and, because it declares `dsh.bundle`, mounts the plugin row automatically on the next boot.
### Manual
```bash
# 1. Install into the profile
cd "$DSH_HOME/profiles/web" # or your profile directory
pnpm add github:jiangr100/dsh-rewind
# 2. Add the row to the profile's patch layer
# ($DSH_HOME/profiles/web/cordis.patch.yml):
- insert:
- id: dsh-rewind
name: dsh-rewind
# 3. Restart the harness
```
### Verify
Type `/rewind` in a conversation and press Enter — the picker opens at the most recent message; scroll up, click a line, and the GUI switches to the rewound session.
## Uninstall
```bash
dsh plugin --profile web remove dsh-rewind
```
Then restart the harness. (With a manual install, remove the row from `cordis.patch.yml` and run `pnpm remove dsh-rewind` in the profile directory.)
## License
[MIT](./LICENSE)
Install
dsh plugin --profile web add github:jiangr100/dsh-rewind
Profile: web
With the hub plugin installed, ask your agent to install it by name — it resolves the same plan shown here.
dsh plugin --profile web add github:stvlynn/dsh.fish#path:packages/dsh-plugin-hub
install dsh-rewind from the hub
- This source has no pinned commit, so a later push upstream changes what installs. Prefer pinning a commit.