ReferenceHistory
History operations
Undo/redo history state and navigation.
5 operations. Names, descriptions, and behavior flags come from the canonical contract.
Operations
history.beginGroupBegin one editor-local undo group across awaited public writes. Nesting and temporary mutation overlap are rejected. Finish with endGroup in finally; failed writes leave the successful prefix undoable. Native input and undo/redo finish the group; remote peer edits retain their own ownership.readhistory.endGroupFinish the matching editor-local group. Call in finally after awaiting each write. A stale handle returns closed false when no group is active; a mismatched handle cannot close another active group. Successful writes become one Undo and one Redo without rolling back failed writes.readhistory.getQuery the current undo/redo history state of the document.readhistory.redoRedo the most recently undone action in the document.mutateshistory.undoUndo the most recent history-safe mutation in the document.mutates