@ckeditor/ckeditor5-ai
Version:
AI features for CKEditor 5.
102 lines (101 loc) • 2.97 kB
TypeScript
/**
* @license Copyright (c) 2003-2025, CKSource Holding sp. z o.o. All rights reserved.
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options
*/
/**
* @module ai/aireviewmode/ui/aireviewmodereviewcheckresultsview
*/
import { type Locale } from 'ckeditor5/src/utils.js';
import { ListItemView, View, ViewCollection } from 'ckeditor5/src/ui.js';
import { AIReviewModeReviewCheckListItemResultsView } from './aireviewmodechecklistitemresultview.js';
import { AIDisclaimerView } from '../../aicore/ui/aidisclaimerview.js';
import { type AIReviewCheckResultChange } from '../model/aireviewcheckresultchange.js';
import '../../../theme/aireviewmode/aireviewmode-check-run.css';
import '../../../theme/aireviewmode/aireviewmode-check-run-result.css';
export declare class AIReviewModeReviewCheckResultsView extends ListItemView {
/**
* The header view containing the title and action buttons.
*/
resultsHeader: View;
/**
* The disclaimer view shown below the results.
*/
reviewDisclaimer: AIDisclaimerView;
/**
* The title of the current check results.
*
* @observable
*/
headerTitle: string;
/**
* The subtitle of the current check results.
*
* @observable
*/
headerSubtitle: string;
/**
* The loading state of the controls.
*
* @observable
*/
isLoading: boolean;
/**
* The toggle diff state of the controls.
*
* @observable
*/
isToggleDiffOn: boolean;
/**
* Indicates whether the review is completed.
*
* @observable
*/
isCompleted: boolean;
/**
* Indicates whether the results are ready and can be interacted with.
*
* @observable
*/
isResultReady: boolean;
isError: boolean;
showErrorMessage: boolean;
errorType: 'chunk' | 'general' | undefined;
constructor(locale: Locale);
clearResults(): void;
getResults(): ViewCollection<AIReviewModeReviewCheckListItemResultsView>;
addResult(result: {
contentDiffed: string;
id: string;
}): void;
hideResult(id: string, status: AIReviewCheckResultChange['status']): void;
showResult(id: string, status: AIReviewCheckResultChange['status']): void;
/**
* Sets the title of the current check results.
*
* @param title The title to set in the header.
*/
setTitle(title: string, subtitle?: string): void;
showChunkErrorMessage(): void;
showGeneralErrorMessage(): void;
resetErrorState(): void;
}
export type AIAbortReviewStreamEvent = {
name: 'abortReviewStream';
args: [];
};
export type AILeaveReviewModeResultListEvent = {
name: 'leaveReviewModeResultList';
args: [];
};
export type AIAcceptAllChangesEvent = {
name: 'acceptAllChanges';
args: [];
};
export type AIToggleDiffEvent = {
name: 'toggleDiff';
args: [
{
on: boolean;
}
];
};