wang-xudong/dsh-plugin-undo

Plugin ⭐ 1 MIT web-ui

DSH 会话撤回插件:在当前会话内原地撤销最后 n 轮对话,不 fork、不新建会话 | Undo the last n turns in-place in the current DSH session

Install

Click the header to expand or collapse that turn in place. The `/undo` command card itself is hidden; the folded headers are the only visible undo feedback.

## How it works

1. The host derives the currently model-visible turns from `turn/start` / `turn/end`
2. It takes the last n turns and appends `surfaceOp: { op: 'replace', start, end }` over their surface range
3. The checkpoint is an **empty assistant message** outside any turn boundary; message derivation skips empty assistant content, so the model sees only the retained history — no undo marker, no turn numbers
4. The client half reads the successful `/undo` command nodes and folds the undone turns with DOM/CSS

## Install

Add wang-xudong/dsh-plugin-undo to your DSH config (web profile) to enable.

README

Expand full README Collapse

README is empty.