import type { Conversation } from "@cubos/agent-sdk"; export interface UseConversationListResult { /** Newest activity first. */ conversations: Conversation[]; isLoading: boolean; error: Error | null; /** The live stream died and will not come back — the list still renders what * it loaded, but nothing will move again until the hook remounts. Transient * drops don't land here; the SDK reconnects through those. */ streamError: Error | null; /** Null when there is nothing older to load. */ hasMore: boolean; loadMore: () => Promise; isLoadingMore: boolean; /** Starts an empty conversation and prepends it. Usually unnecessary — * `useConversation(null).send` creates one on the first message, which is what * keeps abandoned "new chat" rows out of the list. */ create: (opts?: { agentSlug?: string; title?: string; }) => Promise; archive: (id: string) => Promise; } export interface UseConversationListOptions { /** Conversations per page. Defaults to the server's 30. */ pageSize?: number; } /** * The user's conversations, kept live: any conversation whose activity advances * is re-sorted to the top without a refetch, and an archived one leaves the list * on its own. * * Selection is not its business — hold the open id yourself and pass it to * `useConversation`, so a route param works as well as component state. */ export declare function useConversationList(opts?: UseConversationListOptions): UseConversationListResult;