github / github/copilot-cli

Add a /redo command after /undo or /rewind

Aberta
#3,089 0 comentários 5 reações 0 responsáveis Ver no GitHub
area:sessions
Linguagem predominante
Shell
Estrelas
11.2k
Forks
1.9k
Merge médio
14h 16min
PRs com merge (30d)
6

Descrição

### 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.

Guia de contribuição

Abrir o guia de contribuição

Direção de pesquisa

Start by tracing the existing /undo and /rewind command implementations and how they store reverted turn and file state. Define how /redo advances through that state, when new prompts or edits clear it, and what happens when no redo step remains; done means the documented workflows restore the reverted state reliably.

Escrita pelo modelo de indexação a partir do texto da issue.

Avaliação

Stack de tecnologia
shell
Domínio
cli
Tipo de issue
Funcionalidade
Dificuldade
5/5
Tempo estimado
Mais de uma semana
Status de atividade
Pouca atividade
Clareza
Razoavelmente clara
Facilidade para iniciantes
35/100

Receba novas issues na sua caixa de entrada

Um resumo curto de issues do GitHub para quem está começando.