Back to home

jiangr100

dsh-rewind

Replica of the Claude Code /rewind skill

Stars
0
Language
JavaScript
Created
Aug 16, 2026
Updated
Aug 16, 2026

Introduction

dsh-rewind

A /rewind plugin for DeepSeek Harness (dsh): 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)

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

# 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

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