import { ChatModel } from './chat-model'; import { SerializedChatData } from './chat-model-serialization'; import { ChatAgentLocation } from './chat-agents'; export declare const ChatSessionStore: unique symbol; export interface ChatModelWithMetadata { model: ChatModel; title?: string; pinnedAgentId?: string; /** Timestamp (ms since epoch) of the last user interaction. Used as the display date for session cards. */ lastInteraction?: number; /** Whether the last request ended with an error. */ hasError?: boolean; /** ID of the root session in the delegation chain. */ rootSessionId?: string; /** ID of the immediate parent session that delegated this one. */ parentSessionId?: string; } export interface ChatSessionStore { /** * Stores the handed over sessions. * * Might overwrite existing sessions when maximum storage capacity is exceeded. */ storeSessions(...sessions: Array): Promise; /** * Read specified session */ readSession(sessionId: string): Promise; /** * Delete specified session */ deleteSession(sessionId: string): Promise; /** * Deletes all sessions */ clearAllSessions(): Promise; /** * Get index of all stored sessions. * Note: This may trigger storage initialization if not already initialized. */ getSessionIndex(): Promise; /** * Check if there are persisted sessions available * This has the benefit of not initializing the storage on disk if it does not * already exist. */ hasPersistedSessions(): Promise; } export interface ChatSessionIndex { [sessionId: string]: ChatSessionMetadata; } export interface ChatSessionMetadata { sessionId: string; title: string; saveDate: number; location: ChatAgentLocation; /** ID of the agent pinned to the session (used for icon and display name on cards). */ pinnedAgentId?: string; /** Whether the last request ended with an error. */ hasError?: boolean; /** ID of the root session in the delegation chain. */ rootSessionId?: string; /** ID of the immediate parent session that delegated this one. */ parentSessionId?: string; } //# sourceMappingURL=chat-session-store.d.ts.map