/** * @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/aisuggestioncontentpartview */ import { type Locale } from '@ckeditor/ckeditor5-utils'; import { View } from '@ckeditor/ckeditor5-ui'; import { type AISuggestionContentPartDefinition } from '../../utils/getsuggestionpartsfromreply.js'; import { type AIReplyChangeGroupState } from '../../model/aireply.js'; import { type AISuggestionActionName } from '../../../aichat/ui/feed/aichatfeedsuggestionitemactionsview.js'; import { type AIContentRenderingStrategy } from './aisuggestionstreamablecontentview.js'; /** * A view that displays a single part in the suggestion content. */ export declare class AISuggestionBodyViewContentPartView extends View { /** * The definition of the content part this content part view represents. */ partDefinition: AISuggestionContentPartDefinition; /** * The state of the content part (pending, accepted, rejected, etc.). It contributes to the `isEnabled` flag. */ state: AIReplyChangeGroupState; /** * Controls whether the content part is enabled, which means that it can be interacted with. This flag is a composition * of `isDone`, `state` and initial `areActionsDisabled` flags. */ isEnabled: boolean; /** * The part is active when its details are open in a dialog by the user. */ isActive: boolean; /** * A flag indicating that the content part is done streaming. It contributes to the `isEnabled` flag. */ isDone: boolean; /** * Controls the visibility of the content part. */ isVisible: boolean; /** * @inheritDoc */ constructor(locale: Locale, { part, uiIndex, areActionsDisabled, availableActions }: { part: AISuggestionContentPartDefinition; uiIndex: number; areActionsDisabled: boolean; availableActions: Array; }); /** * Updates the content of the content part. */ updateContent({ part, renderingStrategy, showUnchangedParts, abortSignal }: { part: AISuggestionContentPartDefinition; renderingStrategy: AIContentRenderingStrategy; showUnchangedParts?: boolean; abortSignal?: AbortSignal; }): Promise; /** * Marks the content part as done which means that it finished streaming. */ markAsDone(): void; }