declare const STORAGE_KEYS: { readonly CHAT_HISTORY_LIST: "earthsdkui_chatHistoryList"; readonly CURRENT_CHAT_ID: "earthsdkui_currentChatId"; readonly SILICONFLOW_API_KEY: "earthsdkui_siliconflow_api_key"; readonly LOCAL_MODELS: "earthsdkui_local_models"; readonly CURRENT_MODEL_CONFIG: "earthsdkui_current_model_config"; readonly EARTH_SERVER_SESSION_ID: "earthsdkui_earthserver_session_id"; }; type StorageKey = typeof STORAGE_KEYS[keyof typeof STORAGE_KEYS]; /** * StorageService 类 * 提供统一的 localStorage 读取/写入/防抖接口 */ export declare class StorageService { private debounceTimers; /** * 从 localStorage 读取数据 */ get(key: StorageKey | string): T | null; /** * 同步写入 localStorage */ set(key: StorageKey | string, value: T): void; /** * 防抖写入 localStorage * 用于频繁更新的数据(如聊天历史) * @param key 存储键 * @param value 存储值 * @param delay 防抖延迟(毫秒),默认 300ms */ debouncedSet(key: StorageKey | string, value: T, delay?: number): void; /** * 立即触发防抖写入(不清除之前的定时器,立即保存) */ flushDebounced(key: StorageKey | string, value: T): void; /** * 清除所有防抖定时器并保存 */ flushAll(): void; /** * 移除指定键 */ remove(key: StorageKey | string): void; /** * 清除所有存储 */ clear(): void; } export declare const storageService: StorageService; export { STORAGE_KEYS };