clearAndRestart method

Future<void> clearAndRestart({
  1. required ClearAndRestartConfirmation confirm,
})

Discard every on-device embedding (chunks table) and rotate the fingerprint baseline to the currently loaded model.

confirm is required and only accepts ClearAndRestartConfirmation.iUnderstandThisDeletesAllOnDeviceEmbeddings — the parameter exists solely to keep the destructive choice visible at every call site. The sources table is preserved so the original documents can be re-ingested through addDocument.

Throws StateError when no mismatch is active.

Implementation

Future<void> clearAndRestart({
  required ClearAndRestartConfirmation confirm,
}) =>
    _engine!.clearAndRestart(confirm: confirm);