# DocumentCompareProcessOptions

interface

Options for [`process`](module_ai_toolkit_documentcompare-DocumentCompare.md#function-process).

<a id="properties"></a>

## Properties

<a id="member-aiSource"></a>

### `aiSource?: AIOperationSource` _(inherited)_

Which AI feature produced the processed data. You can use one of available values or pass a custom string. When set, the operations applying the patch will be stamped as made-by-AI. This information is passed to suggestions and revisions meta data. Such suggestions and revisions will be visually marked as made-by-AI accordingly to these features config ([`config.trackChanges.showAISource`](module_track-changes_trackchangesconfig-TrackChangesConfig.md#member-showAISource) and [`config.revisionHistory.showAISource`](module_revision-history_revisionhistoryconfig-RevisionHistoryConfig.md#member-showAISource)).

Do not set for changes coming from non-AI sources.

<a id="member-asSuggestions"></a>

### `asSuggestions?: boolean` _(inherited)_

Whether the comparison marks removed content for track changes instead of removing it.

<a id="member-overwriteOnError"></a>

### `overwriteOnError?: boolean`

What to do when diffing or applying the processed data fails.

By default, the underlying error is rethrown.

When the option is set to `true`, the whole document is instead overwritten with the processed data via `editor.setData()` and [`process`](module_ai_toolkit_documentcompare-DocumentCompare.md#function-process) returns `false`.

The overwrite ignores the `asSuggestions` and `aiSource` options, so the content is replaced directly and is not marked as an AI change. It cannot be undone, and it clears the undo stack.

This option does not cover errors thrown by `callback`, which are always rethrown.

Note that the overwrite is also performed in real-time collaboration environment, and it may roll back some edits made by remote users while `callback` was processing. Opt in only when overwriting the whole document is acceptable.

Defaults to `false`

<a id="member-useDataIds"></a>

### `useDataIds?: boolean`

Whether the snapshot handed to `callback` is stamped with `data-id` attributes. See [`useDataIds`](module_ai_toolkit_documentcompare-DocumentCompareSnapshotOptions.md#member-useDataIds).

Defaults to `true`

---

Full index of the CKEditor 5 API reference: [llms.txt](llms.txt)
