Skip to main content

Modes

A document in suggesting mode records every change as a tracked suggestion instead of applying it. This applies to typing, toolbar commands, and agent tool calls equally — which is what makes “let the model draft it, then review every change” work without any special casing.
Set the starting mode per document, or editor-wide:
defaultDocumentMode seeds the mode; it does not control it. Changing the prop later will not move a document that has already opened — use view.setDocumentMode() for that.

Reviewing

The review controller is the host-facing surface for tracked changes. It is deliberately not an agent tool: it exposes interactive state and moves the caret and viewport.
Subscribe to render your own review UI:

Targeted operations

When you know which suggestions you care about — for instance, everything a particular agent run produced — operate on the IDs directly:
previewCurrent() and previewAll() do the same for the current stop and the whole document. Pass null to clear a preview.

Display

"final" shows the document as it would read with everything accepted; "original" as it read before. Useful for a read-only “clean copy” toggle without mutating anything.

Direct mode

Sometimes an agent edit should just apply — a formatting sweep, a find-and-replace the user explicitly asked for. Pass directMode per call:
For a delegated agent run, the mode is inherited by every tool call in the loop, so one flag governs the whole task.
Direct mode bypasses the tracked-change trail. Reserve it for changes the user has already approved in your own UI; anything speculative should stay a suggestion.

Attribution

Suggestions carry their author, and agent-authored ones are distinguishable from human edits. review.getState().visibleAgentSuggestionIds narrows to the agent’s own work, and nextAgentSuggestion() steps through only those — enough to build a “review what the AI changed” flow that skips the user’s own typing.

Export

Tracked changes survive exportDocx() as Word revision marks, so a reviewer who opens the file in Word sees the same suggestions, and accepting them there produces the same result as accepting them in Revise.