UNPKG

@ckeditor/ckeditor5-ai

Version:

AI features for CKEditor 5.

60 lines (59 loc) 1.72 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 */ import { type AIConversationItem } from '../../aicore/aiconnector.js'; declare const AIChatHistoryItem_base: { new (): import("ckeditor5/src/utils.js").Observable; prototype: import("ckeditor5/src/utils.js").Observable; }; /** * Represents a single item in the chat history. * * An item contains basic information about a conversation that can be displayed * in the history list and used to restore or manage the conversation. */ export declare class AIChatHistoryItem extends /* #__PURE__ */ AIChatHistoryItem_base { /** * The unique ID of the conversation. */ readonly id: string; /** * The title or name of the conversation. */ title: string; /** * The timestamp when the conversation was created. */ readonly createdAt: Date; /** * The timestamp when the conversation was last updated. */ updatedAt: Date | null; /** * Informs if the conversation is pinned. */ pinned: boolean; /** * @inheritDoc */ constructor({ id, title, createdAt, updatedAt, pinned }: AIConversationItem); /** * Updates only the title of the item. */ updateTitle(title: string): void; /** * Updates the pinned status of the item. */ updatePinned(pinned: boolean): void; } export type AIChatHistoryItemUpdatedEvent = { name: 'itemUpdated'; args: [ { itemId: string; updates: Partial<Pick<AIChatHistoryItem, 'title' | 'pinned'>>; } ]; }; export {};