DocumentCompareSnapshot
The captured before-state of a document plus the metadata to reconcile changes later. The snapshot is a plain object and is safe to JSON.stringify, send between the frontend and backend, store, parse, and later feed back into DocumentCompare#diffSnapshot.
Properties
channelId : stringmodule:ai/aisdk/documentsnapshot~DocumentCompareSnapshot#channelIdThe collaboration channel the snapshot was captured from.
content : Record<string, string>module:ai/aisdk/documentsnapshot~DocumentCompareSnapshot#contentEach root's content, serialized to HTML, keyed by root name (excluding
$graveyard).editorConfig : AIEditorConfigmodule:ai/aisdk/documentsnapshot~DocumentCompareSnapshot#editorConfigThe editor's feature configuration at capture time, so external processing can interpret the serialized HTML within the editor's capabilities.
selection : Record<string, Array<DocumentCompareSnapshotRange>>module:ai/aisdk/documentsnapshot~DocumentCompareSnapshot#selectionEach root's captured selection as character offsets into its HTML, keyed by root name (omitted if root has no selection).
sessionId : stringmodule:ai/aisdk/documentsnapshot~DocumentCompareSnapshot#sessionIdThe editing session the snapshot was captured in.
version : numbermodule:ai/aisdk/documentsnapshot~DocumentCompareSnapshot#versionThe document version the snapshot was captured at.