history
Manage pattern edit history with undo, redo, list, restore, and compare actions. Access recent edits, revert changes, or compare entries.
Instructions
Navigate or inspect the pattern edit history. action=undo reverts the last edit on the targeted session. action=redo replays a previously-undone edit. action=list returns recent entries with timestamps and previews (limit defaults to 10). action=restore jumps the editor to a specific entry by id (current pattern goes on the undo stack). action=compare diffs two entries by id (or one entry vs current pattern). Example: history({ action: "list", limit: 5 }) — recent edits, newest first. For on-disk saved patterns use pattern_store — history deals with the in-memory edit timeline of the current session.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| action | Yes | Which history operation to perform | |
| limit | No | Maximum entries (action=list, default 10) | |
| id | No | History entry ID (action=restore) | |
| id1 | No | First entry ID (action=compare) | |
| id2 | No | Second entry ID (action=compare, default: current pattern) | |
| session_id | No | Optional session ID (#108). Omit to use default session. Note: undo/redo/history stacks are currently server-wide; only the read/write target changes. |