Add a /redo command after /undo or /rewind
- Langage dominant
- Shell
- Étoiles
- 11.2k
- Forks
- 1.9k
- Merge moyen
- 14 h 16 min
- PR mergées (30 j)
- 6
Description
### Describe the feature or problem you'd like to solve
`/undo` and `/rewind` are documented, but there is no documented way to redo after rewinding too far. If a user accidentally undoes one turn too many, they have to recover by manually reconstructing state from session history, editor local history, git history, or by rerunning the original prompt.
### Proposed solution
Add a complementary `/redo` command that steps forward through the rewind stack created by `/undo` and `/rewind`, restoring the reverted turn and its file changes until a new action invalidates the redo stack. This would make rewind safer to use, reduce accidental loss of work, and align with common editor and terminal expectations.
### Example prompts or workflows
1. Use `/undo` to inspect the state before the last turn, realize it was one step too far, then run `/redo` to restore that turn.
2. Rewind several turns while comparing alternative outputs, then step forward one turn at a time with `/redo`.
3. Accidentally use `/undo` twice, then recover without needing `/resume`, session history, or rerunning the original prompt.
4. Use `/undo` after a broad code change, confirm the change was actually desired, then `/redo` to restore it intact.
### Additional context
A standard undo/redo stack would be a good fit:
- `/redo` should only be available immediately after `/undo` or `/rewind`.
- Any new user prompt, edit, or state-changing command could clear the redo stack.
- If a full session-state restore is too expensive, even a best-effort redo for turn and file state would materially improve the UX.
Guide de contribution
Ouvrir le guide de contribution
Évaluation
Cette issue n'a pas encore été évaluée.