UNPKG

@ckeditor/ckeditor5-ai

Version:

AI features for CKEditor 5.

48 lines (47 loc) 1.73 kB
/** * @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/aichat/ui/feed/aichatfeedreplyitemview */ import { type Locale } from 'ckeditor5/src/utils.js'; import { AIChatFeedItemView, type AIChatItemViewOptions } from './aichatfeeditemview.js'; import { type Document } from '../../../aicore/utils/htmlparser.js'; import { type AIContentRenderingStrategy } from '../../../aicore/ui/suggestioncontainer/aisuggestioncontentpartview.js'; import { type AIReplySource } from '../../../aicore/model/aireply.js'; /** * A view for an AI reply item in the AI chat feed. * * The reply can be either a static message (marked as done immediately) or a content that gets updated over time. * * The content of the reply is always streamed into its reply container. */ export declare class AIChatFeedReplyItemView extends AIChatFeedItemView { /** * @inheritDoc */ constructor(locale: Locale, options: AIChatFeedReplyItemViewOptions); /** * @inheritDoc */ render(): Promise<void>; /** * @inheritDoc */ updateContent({ parsedContent, renderingStrategy, abortSignal }: { parsedContent: Document; renderingStrategy: AIContentRenderingStrategy; abortSignal?: AbortSignal; }): Promise<void>; updateSources(sources: Array<AIReplySource>): void; } /** * Options for the {@link AIChatFeedReplyItemView} class. */ export interface AIChatFeedReplyItemViewOptions extends AIChatItemViewOptions { /** * The initial message to be streamed immediately while rendering the view. */ initialContent?: string; }