/** * @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/aicore/ui/suggestioncontainer/aisuggestioncontainerview */ import { type Locale } from '@ckeditor/ckeditor5-utils'; import { View, type BodyCollection } from '@ckeditor/ckeditor5-ui'; import { type AISuggestionContentPartDefinition } from '../../utils/getsuggestionpartsfromreply.js'; import { type AIContentRenderingStrategy } from './aisuggestionstreamablecontentview.js'; import { type AISource } from '../../aiconnector.js'; import { type AISuggestionActionName } from '../../../aichat/ui/feed/aichatfeedsuggestionitemactionsview.js'; import '../../../../theme/aichat/aisuggestioncontainer.css'; /** * This view displays a suggestion from the AI. * * It comes with a header with a switch button to show/hide the changes. * * It also has a body view and a changes views that are toggled by the toggle button. */ export declare class AISuggestionContainerView extends View { /** * Observable property that indicates whether the track changes feature is on. */ isTrackChangesOn: boolean; /** * @inheritDoc */ constructor(locale: Locale, options: AISuggestionContainerViewOptions, bodyCollection: BodyCollection); updateContent(options: { parts: Array; renderingStrategy: AIContentRenderingStrategy; abortSignal?: AbortSignal; }): Promise; /** * Updates the web sources of the suggestion. */ updateSources(sources: Array): void; /** * Marks the suggestion container as done. */ markAsDone(): void; } export type AISuggestionContainerToggleSuggestionDisplayModeEvent = { name: 'toggleSuggestionDisplayMode'; args: [{ showDiff: boolean; }]; }; export type AISuggestionContainerViewOptions = { showDiff: boolean; areActionsDisabled: boolean; availableActions: Array; showUnchangedParts?: boolean; };