/*! * 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 { IAsyncStorage } from "jodit/esm/types/index"; import type { IAIAssistantStorage, IConversation, IConversationMeta, IGlobalSettings } from "../../interface/index"; /** * Unified web storage implementation using Jodit's storage providers * Supports localStorage, sessionStorage, and memory storage */ export declare class WebStorageConversationStorage implements IAIAssistantStorage { private storage; private maxConversations; constructor(storageProvider: IAsyncStorage, maxConversations: number); close(): Promise; /** * Get storage key for a conversation ID */ private getConversationKey; /** * Get all conversation IDs from storage */ private getAllKeys; /** * Update conversation index */ private updateIndex; /** * Add conversation ID to index */ private addToIndex; /** * Remove conversation ID from index */ private removeFromIndex; /** * List all conversations * @param query - Optional search query to filter conversations by title and message content */ list(query?: string): Promise; /** * Get a specific conversation by ID */ get(id: string): Promise; /** * Save or update a conversation */ save(conversation: IConversation): Promise; /** * Delete a conversation */ delete(id: string): Promise; /** * Clear all conversations */ clear(): Promise; /** * Evict oldest conversation (LRU) */ private evictOldest; /** * Get global settings */ getGlobalSettings(): Promise; /** * Save global settings */ saveGlobalSettings(settings: Partial): Promise; } /** * Factory functions to create storage providers using Jodit's Storage */ export declare function createStorageProvider(type: 'indexedDB' | 'localStorage' | 'sessionStorage' | 'memoryStorage', rootKey?: string): IAsyncStorage; /** * Generate unique conversation ID */ export declare function generateConversationId(): string; /** * Generate unique message ID */ export declare function generateMessageId(): string; /** * Generate unique tool call ID */ export declare function generateToolCallId(): string;