Alpha: Document API is currently alpha and subject to breaking changes.
Summary
Query the current undo/redo history state of the active editor.- Operation ID:
history.get - API member path:
editor.doc.history.get(...) - Mutates document:
no - Idempotency:
idempotent - Supports tracked mode:
no - Supports dry run:
no - Deterministic target resolution:
yes
Expected result
Returns a HistoryState object with undoDepth, redoDepth, canUndo, canRedo, and a list of history-unsafe operations.Input fields
No fields.Example request
Output fields
| Field | Type | Required | Description |
|---|---|---|---|
canRedo | boolean | yes | |
canUndo | boolean | yes | |
historyUnsafeOperations | string[] | yes | |
redoDepth | integer | yes | |
undoDepth | integer | yes |
Example response
Pre-apply throws
- None
Non-applied failure codes
- None
Raw schemas
Raw input schema
Raw input schema
Raw output schema
Raw output schema

