Skip to content
Source
Sign inSign up
TanStack/ai
Open History to see the last commit

index.ts

153 lines3.7 KB

1export { useChat } from './use-chat'
2export { createChatHook } from './create-chat-hook'
3export { useByok } from './use-byok'
4export {
5 usePageWebMCPTools,
6 useRegisterWebMCPTools,
7 useWebMCPTools,
8} from './use-web-mcp-tools'
9export type {
10 UsePageWebMCPToolsOptions,
11 UseRegisterWebMCPToolsOptions,
12 UseWebMCPToolsOptions,
13} from './use-web-mcp-tools'
14export type {
15 DeepPartial,
16 UseChatOptions,
17 UseChatReturn,
18 UIMessage,
19 ChatRequestBody,
20 QueuedMessage,
21 SendMessageOptions,
22 WhenBusy,
23 QueueConfig,
24 QueueStrategy,
25 QueueOption,
26} from './types'
27​
28// Generation hooks
29export { useGeneration } from './use-generation'
30export type {
31 UseGenerationOptions,
32 UseGenerationReturn,
33} from './use-generation'
34​
35export { useGenerateImage } from './use-generate-image'
36export type {
37 UseGenerateImageOptions,
38 UseGenerateImageReturn,
39} from './use-generate-image'
40​
41export { useGenerateAudio } from './use-generate-audio'
42export type {
43 UseGenerateAudioOptions,
44 UseGenerateAudioReturn,
45} from './use-generate-audio'
46​
47export { useGenerateSpeech } from './use-generate-speech'
48export type {
49 UseGenerateSpeechOptions,
50 UseGenerateSpeechReturn,
51} from './use-generate-speech'
52​
53export { useTranscription } from './use-transcription'
54export type {
55 UseTranscriptionOptions,
56 UseTranscriptionReturn,
57} from './use-transcription'
58​
59export { useSummarize } from './use-summarize'
60export type { UseSummarizeOptions, UseSummarizeReturn } from './use-summarize'
61​
62export { useGenerateVideo } from './use-generate-video'
63export type {
64 UseGenerateVideoOptions,
65 UseGenerateVideoReturn,
66} from './use-generate-video'
67​
68export { useAudioRecorder } from './use-audio-recorder'
69export type {
70 UseAudioRecorderOptions,
71 UseAudioRecorderReturn,
72} from './use-audio-recorder'
73​
74// Re-export from ai-client for convenience
75export {
76 AudioRecorder,
77 ChatClient,
78 InterruptManager,
79 RealtimeClient,
80 GenerationClient,
81 VideoGenerationClient,
82 GENERATION_EVENTS,
83 reconstructImageResult,
84 reconstructAudioResult,
85 reconstructSpeechResult,
86 reconstructTranscriptionResult,
87 reconstructSummarizeResult,
88 UnsupportedResponseStreamError,
89 createAIDevtoolsGenerationPreview,
90 StreamTruncatedError,
91 DurableStreamIncompleteError,
92 StreamReconnectLimitError,
93 uiMessageToModelMessages,
94 modelMessageToUIMessage,
95 modelMessagesToUIMessages,
96 convertMessagesToModelMessages,
97 normalizeToUIMessage,
98 generateMessageId,
99 StreamProcessor,
100 ImmediateStrategy,
101 PunctuationStrategy,
102 BatchStrategy,
103 WordBoundaryStrategy,
104 CompositeStrategy,
105 parsePartialJSON,
106 PartialJSONParser,
107 defaultJSONParser,
108 registerWebMCPTools,
109 getWebMCPTools,
110 subscribeWebMCPTools,
111 type GetWebMCPToolsOptions,
112 type SubscribeWebMCPToolsOptions,
113 type WebMCPPageTool,
114 clientTools,
115 createMcpAppBridge,
116 type McpAppBridge,
117 type CreateMcpAppBridgeOptions,
118 fetchServerSentEvents,
119 localStoragePersistence,
120 sessionStoragePersistence,
121 indexedDBPersistence,
122 StorageUnavailableError,
123 type ChatClientPersistence,
124 type ChatPersistedState,
125 type ChatPersistenceOption,
126 type ChatStorageAdapter,
127 type WebStoragePersistenceOptions,
128 type IndexedDBPersistenceOptions,
129 fetchHttpStream,
130 xhrServerSentEvents,
131 xhrHttpStream,
132 stream,
133 rpcStream,
134 webSocket,
135 createChatClientOptions,
136 type ConnectionAdapter,
137 type ConnectConnectionAdapter,
138 type SubscribeConnectionAdapter,
139 type RunAgentInputContext,
140 type FetchConnectionOptions,
141 type XhrConnectionOptions,
142 type WebSocketConnectionOptions,
143 type InferChatMessages,
144 type GenerationClientState,
145 type ImageGenerateInput,
146 type AudioGenerateInput,
147 type SpeechGenerateInput,
148 type TranscriptionGenerateInput,
149 type SummarizeGenerateInput,
150 type VideoGenerateInput,
151 type VideoGenerateResult,
152 type VideoStatusInfo,
153} from '@tanstack/ai-client'