/** * @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/aichathistory/aichathistoryui */ import { type Context, type Editor, ContextPlugin, type PluginDependenciesOf } from "@ckeditor/ckeditor5-core"; import { AITabs } from "../aitabs/aitabs.js"; export declare const AI_CHAT_HISTORY_UI_EVENT_NAMES: readonly ["showConversationHistory", "removeConversation", "editConversationTitle", "setConversationPinned", "selectConversation", "startConversation"]; export declare class AIChatHistoryUI extends ContextPlugin { /** * @inheritDoc */ static get requires(): PluginDependenciesOf<[AITabs]>; /** * @inheritDoc */ static get pluginName(): "AIChatHistoryUI"; /** * @inheritDoc */ static override get isOfficialPlugin(): true; /** * @inheritDoc */ static override get isPremiumPlugin(): true; /** * @inheritDoc */ constructor(context: Context | Editor); /** * Removes a conversation item from the history list. */ removeHistoryItem(id: string): void; /** * Updates the history items with categorized data. */ updateItems(categories: Array): void; /** * Updates the title of a specific history item in the UI. */ updateItemTitle(itemId: string, title: string): void; /** * Updates the loading state of a specific history item in the UI. */ updateItemLoadingState(itemId: string, operation: string | null, isLoading: boolean): void; /** * Toggles the loading skeleton in the history view. */ setLoadingSkeleton(isLoading: boolean): void; /** * Shows an error message in the history view. */ showError(message: string): void; /** * Hides the error message in the history view. */ hideError(): void; } export type AIChatHistoryItemData = { id: string; title: string; createdAt: string; active: boolean; pinned?: boolean; }; export type AIChatHistoryCategoryData = { title: string; items: Array; }; export type AIChatHistoryUIRemoveConversationEvent = { name: "removeConversation"; args: [{ id: string; }]; }; export type AIChatHistoryUIEditTitleEvent = { name: "editConversationTitle"; args: [{ id: string; title: string; }]; }; export type AIChatHistoryUISelectConversationEvent = { name: "selectConversation"; args: [{ id: string; }]; }; export type AIChatHistoryUISetPinnedEvent = { name: "setConversationPinned"; args: [{ id: string; pinned: boolean; }]; };