@promptbook/remote-client
Version:
Promptbook: Turn your company's scattered knowledge into AI ready books
26 lines (25 loc) • 780 B
TypeScript
import type { ChatMessage } from '../types/ChatMessage';
/**
* Utility functions for persisting chat conversations in localStorage
*
* @private util of `LlmChat`
*/
export declare class ChatPersistence {
private static readonly STORAGE_PREFIX;
/**
* Save messages to localStorage under the given key
*/
static saveMessages(persistenceKey: string, messages: ReadonlyArray<ChatMessage>): void;
/**
* Load messages from localStorage for the given key
*/
static loadMessages(persistenceKey: string): ChatMessage[];
/**
* Clear messages from localStorage for the given key
*/
static clearMessages(persistenceKey: string): void;
/**
* Check if localStorage is available
*/
static isAvailable(): boolean;
}