/** * @license Copyright (c) 2003-2026, CKSource Holding sp. z o.o. All rights reserved. * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options */ /** * @module ai/aireviewcore/aireviewcorecontroller */ import { ContextPlugin } from "@ckeditor/ckeditor5-core"; import { type AIReviewCheck } from "./model/aireviewcheck.js"; import { type AIReviewCheckRun } from "./model/aireviewcheckrun.js"; import { type AIReviewCoreUIRunReviewCheckEvent } from "./ui/aireviewcorereviewcommandlistitemview.js"; export declare abstract class AIReviewCoreController extends ContextPlugin { /** * @inheritDoc */ static override get isOfficialPlugin(): true; /** * @inheritDoc */ static override get isPremiumPlugin(): true; /** * @inheritDoc */ init(): void; /** * Runs the given review check on the currently loaded document and wires the check * run into the UI (results panel, error views, balloons). * * This is the programmatic entry point used by {@link module:ai/aireviewmode/aireviewmode~AIReviewMode#startReview} * and by the `runReviewCheck` UI event fired from the check list view — both paths end up here. * * Rejection of `data.id` (unknown check) is logged via `_logError` and the method returns without * throwing, matching the original UI-event behavior. Stream errors surface via the existing UI * error views; only unexpected apply-phase errors are thrown as `ai-review-mode-check-run-failed`. */ runCheck(data: AIReviewCoreUIRunReviewCheckEvent["args"][0]): Promise; /** * Aborts the currently running review check, if any. No-op when no check is in flight. * * Called by the `abortReviewStream` UI event and by programmatic callers (e.g. the `AbortSignal` * wiring in {@link module:ai/aireviewmode/aireviewmode~AIReviewMode#startReview}). */ abort(): void; /** * Exposes the list of review checks visible in the UI. */ getAvailableChecks(): ReadonlyArray; /** * Exposes the currently active review check run, if any. */ getCurrentCheckRun(): AIReviewCheckRun | undefined; }