import type { ChatMessageBase } from '../../components'; /** A record as a tool returned it, before any display-time annotation. */ export type ChatRecord = Record & { objectID: string; }; export type ChatRecords = Record; /** * The records the chat's tools have fetched, keyed by `objectID`: the shared * lookup between the tools that search and the tools handed only identifiers. */ export type ChatRecordsStore = { get: (objectID: string) => ChatRecord | undefined; has: (objectID: string) => boolean; /** The current map, not a copy — read-only, and replaced by `clear()`. */ getAll: () => ChatRecords; /** Last write wins per `objectID`; records without one are skipped. */ merge: (records: Array) => void; clear: () => void; }; export declare function createChatRecordsStore(): ChatRecordsStore; /** * Collects into `store` the records of every completed tool call in `messages` * whose output holds `hits`. Matching on the output rather than on a tool name * means any tool that fetches records contributes them by returning them. * * Idempotent, so it can re-run over the whole conversation on every update: * streaming deltas and a conversation restored from storage are one code path. */ export declare function collectChatRecords(messages: ChatMessageBase[] | undefined, store?: ChatRecordsStore): ChatRecordsStore;