/**
* Thread Query Hook
*
* React Query hook for fetching a single thread.
*/
import type { UseQueryOptions } from "@tanstack/react-query";
import type { ThreadRetrieveResponse } from "@tambo-ai/typescript-sdk/resources/threads/threads";
/**
* Hook to fetch a single thread by ID.
*
* Uses React Query for caching and automatic refetching.
* Thread data is considered stale after 1 second (real-time data).
*
* Returns the thread with all its messages and current run status directly
* from the SDK with no transformation.
* @param threadId - Thread ID to fetch
* @param options - Additional React Query options
* @returns React Query query object with thread data
* @example
* ```tsx
* function ThreadView({ threadId }: { threadId: string }) {
* const { data: thread, isLoading, isError } = useTamboThread(threadId);
*
* if (isLoading) return