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.
- Apply one or more refactor operations. Each creates a checkpoint.
- Call
history_listto review what has been applied and confirm the result is correct. - If a refactoring produced an unexpected result, call
history_undoto revert it. The revert is itself safe — it can be re-done. - Call
history_redoto 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 recent operation checkpoints. Every refactoring tool (rename, extract, move, inline) creates a checkpoint that can be undone. 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)] |