DocumentChange
Represents a single change document change.
Properties
module:ai/toolkit/proposedchange~DocumentChange#afterRangeWhat the covered content becomes, represented as a range inside the processed data. The range covers existing elements which were modified or new elements.
In other words, the document change says that
beforeRangecontent becomesafterRangecontent.Note, that the range is placed inside the processed data represented as a model document fragment, not in the actual model document. One processed data model fragment is shared between all document changes in a given set.
Collapsed for a change that only removes content.
module:ai/toolkit/proposedchange~DocumentChange#aiSourceWhich AI feature produced the change or not set if the change did not come from AI.
See
aiSource.module:ai/toolkit/proposedchange~DocumentChange#beforeRangeWhat the change covers, represented as a range inside the captured snapshot. The range covers the existing elements which were either removed or modified.
Note, that the range is placed inside the snapshot represented as a model document fragment, not in the actual model document. One snapshot model fragment is shared between all document changes in a given set.
Collapsed for a change that only adds content.
channelId: stringmodule:ai/toolkit/proposedchange~DocumentChange#channelIdThe ID of the document the change was captured from.
rootName: stringmodule:ai/toolkit/proposedchange~DocumentChange#rootNameThe name of the editor root the change applies to.
sessionId: stringmodule:ai/toolkit/proposedchange~DocumentChange#sessionIdThe editing session ID during which the change was captured.
version: numbermodule:ai/toolkit/proposedchange~DocumentChange#versionThe document version for which the change is proposed.