/** * @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, type AIReplyChangeGroupOutdatedReason } from "../../model/aireply.js"; import { type AISuggestionActionName } from "../../../aichat/ui/feed/aichatfeedsuggestionitemactionsview.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; /** * For the `'outdated'` state, the reason that selects the state pill's tooltip. */ outdatedReason: AIReplyChangeGroupOutdatedReason | undefined; /** * 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; /** * Observable property that indicates whether the track changes feature is on. */ isTrackChangesOn: boolean; /** * Whether the target editor is read-only. Forwarded to the toolbar to disable the write actions (apply, suggest). * * @observable */ isTargetReadOnly: 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, showUnchangedParts, abortSignal }: { part: AISuggestionContentPartDefinition; showUnchangedParts?: boolean; abortSignal?: AbortSignal; }): Promise; /** * Marks the content part as done which means that it finished streaming. */ markAsDone(): void; }