import type { ChatSession, ChatMessage } from "@polpo-ai/sdk"; export interface UseSessionsReturn { sessions: ChatSession[]; isLoading: boolean; error: Error | null; activeSessionId: string | null; setActiveSessionId: (id: string | null) => void; getMessages: (sessionId: string) => Promise; renameSession: (sessionId: string, title: string) => Promise; deleteSession: (sessionId: string) => Promise; refetch: () => Promise; } /** * Reads sessions from the shared `PolpoStore`. The initial list is fetched * lazily (first hook mount populates the store), and any change pushed by * other hooks — most importantly `useChat` observing a new sessionId * mid-stream — is reflected here automatically. Mirrors `useTasks` / * `useMissions`. * * Fixes #41: before this rewrite, each `useSessions()` instance held its * own `useState` array, so creating a session in one component left every * other consumer stale until a manual refetch. */ export declare function useSessions(): UseSessionsReturn; //# sourceMappingURL=use-sessions.d.ts.map