get_undo_state
Retrieve undo/redo counts, next entry labels, and transaction open status in one call before reverting or restoring edits. Avoid chaining checks and learn if a transaction is silently swallowing later edits.
Instructions
One call that answers everything you need before touching undo/redo: both counts, both next-entry LABELS, and whether a transaction is still OPEN (transaction_open -- the thing that silently swallows later edits into someone else's batch). Read this instead of chaining can_undo + can_redo, and read it BEFORE undo/undo_multiple so you know what you are about to revert.
Returns: { can_undo, can_redo, undo_count (entries undo can still revert), redo_count (undone entries redo can restore), next_undo, next_redo, transaction_open, transaction_index }
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||