/*! * Jodit Editor PRO (https://xdsoft.net/jodit/) * See LICENSE.md in the project root for license information. * Copyright (c) 2013-2026 Valerii Chupurnov. All rights reserved. https://xdsoft.net/jodit/pro/ */ import type { IConversation, IConversationMeta } from "./conversations"; import type { AIAssistantDisplayMode, AIAssistantTheme } from "./types"; /** * Global settings that apply across all conversations */ export interface IGlobalSettings { /** Display mode (dialog, left, right, top, bottom) */ displayMode?: AIAssistantDisplayMode; /** Panel size in pixels */ panelWidth?: number; panelHeight?: number; defaultModel?: string; defaultTemperature?: number; /** Whether the assistant is currently open (persisted state) */ isOpen?: boolean; /** Theme mode */ theme?: AIAssistantTheme; /** * Currently active conversation ID */ currentConversationId?: string; } /** * Storage interface for conversation persistence */ export interface IAIAssistantStorage { /** * List all conversations * @param query - Optional search query to filter conversations * @returns Promise resolving to array of conversation metadata */ list(query?: string): Promise; /** * Get a specific conversation by ID * @param id - Conversation ID * @returns Promise resolving to conversation or null if not found */ get(id: string): Promise; /** * Save or update a conversation * @param conversation - Conversation to save * @returns Promise resolving when save is complete */ save(conversation: IConversation): Promise; /** * Delete a conversation * @param id - Conversation ID to delete * @returns Promise resolving when delete is complete */ delete(id: string): Promise; /** * Clear all conversations * @returns Promise resolving when clear is complete */ clear?(): Promise; /** * Get global settings * @returns Promise resolving to global settings or null if not set */ getGlobalSettings(): Promise; /** * Save global settings * @param settings - Global settings to save * @returns Promise resolving when save is complete */ saveGlobalSettings(settings: Partial): Promise; /** * Close the storage (for cleanup, if needed) */ close?(): Promise; }