import React, { type PropsWithChildren } from "react"; import type { TamboComponent, TamboTool } from "../../model/component-metadata.js"; import type { TamboThreadMessage } from "../types/message.js"; import type { TamboThread } from "@tambo-ai/client"; /** * Props for TamboStubProvider */ export interface TamboStubProviderProps { /** * Thread data to display. * Can be a full TamboThread or just an array of messages. */ thread?: TamboThread | { messages: TamboThreadMessage[]; }; /** * Optional thread ID. Defaults to "stub_thread" or thread.id if provided. */ threadId?: string; /** * Components to register with the registry. */ components?: TamboComponent[]; /** * Tools to register with the registry. */ tools?: TamboTool[]; /** * User key for the config context. */ userKey?: string; /** * Initial input value for the thread input context. */ inputValue?: string; /** * Whether the thread is currently streaming. */ isStreaming?: boolean; /** * Override for the submit function. * If not provided, submit will be a no-op that returns the threadId. */ onSubmit?: () => Promise<{ threadId: string; }>; /** * Override for the setValue function. */ onSetValue?: (value: string | ((prev: string) => string)) => void; /** * Override for startNewThread. */ onStartNewThread?: () => string; /** * Override for switchThread. */ onSwitchThread?: (threadId: string | null) => void; /** * Override for initThread. */ onInitThread?: (threadId: string) => void; } /** * TamboStubProvider provides mock implementations of all contexts * for testing components that use Tambo hooks. * * All operations are no-ops by default, returning stub data. * Override specific behaviors via props as needed for testing. * Stream state is derived once from props and is not updated by thread management. * @returns A provider wrapper suitable for tests */ export declare function TamboStubProvider({ children, thread: threadData, threadId: providedThreadId, components, tools, userKey, inputValue: initialInputValue, isStreaming, onSubmit, onSetValue, onStartNewThread, onSwitchThread, onInitThread, }: PropsWithChildren): React.JSX.Element; //# sourceMappingURL=tambo-v1-stub-provider.d.ts.map