import { UseChatOptions, UseChatReturn } from "./types.js"; import { InferredClientContext } from "@tanstack/ai-client"; import { AnyClientTool as AnyClientTool$1, InterruptDefinition, SchemaInput } from "@tanstack/ai"; //#region src/create-chat-hook.d.ts type ChatHookOverrides, TSchema extends SchemaInput | undefined, TContext, TInterrupts extends ReadonlyArray>> = { threadId?: string; live?: boolean; forwardedProps?: Record; body?: Record; initialMessages?: UseChatOptions['initialMessages']; }; /** * Bind chat options once at module scope. The returned `useChat` primitive * creates a chat instance from those options. * * Pass per-call overrides for instance keys such as `threadId`, * `initialMessages`, `live`, and `forwardedProps`. Do not change `tools`, * `interrupts`, or `outputSchema` here. Those stay on the factory options. * * Rename the primitive at the call site if you already import `useChat` from * `@tanstack/ai-solid`: `const { useChat: useAppChat } = createChatHook(chatOptions)`. * * @example * ```tsx * const { useChat } = createChatHook(chatOptions) * * function Support() { * const chat = useChat({ threadId: 'support-1' }) * return * } * ``` */ declare function createChatHook = any, TSchema extends SchemaInput | undefined = undefined, TContext = InferredClientContext, const TInterrupts extends ReadonlyArray> = readonly []>(options: UseChatOptions): { useChat: (overrides?: ChatHookOverrides) => UseChatReturn; }; //#endregion export { createChatHook }; //# sourceMappingURL=create-chat-hook.d.ts.map