History
Workflow
Every successful refactoring operation — rename, extract, move, inline — creates a checkpoint automatically. Use history to inspect and reverse those changes without re-reading files or diffing manually.
1
Apply
Run one or more refactor operations — each creates a checkpoint automatically.
→
2
Inspect
Call history_list to review what has been applied and confirm the result is correct.
→
3
Undo
Call history_undo to revert an unexpected result. The revert is itself safe — it can be re-done.
→
4
Redo
Call history_redo to re-apply an undone operation if you change your mind.
History is session-scoped. Checkpoints are cleared when the act server restarts. Do not rely on history across sessions — commit or stash changes you want to keep.
Operations
| Operation | Description | Parameters |
|---|---|---|
history_list |
List this session's operation checkpoints. Committing operations record an undoable checkpoint here. Params: none [, limit (u32)] | none [, limit (u32)] |
history_redo |
Redo the last N undone refactoring operations (default: 1). Re-applies previously undone changes. Params: none [, count (u32), preview (bool)] | none [, count (u32), preview (bool)] |
history_undo |
Undo the last N refactoring operations (default: 1). Reverts all file changes from each operation. Safe to use — can be re-done. Params: none [, count (u32), preview (bool)] | none [, count (u32), preview (bool)] |