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

index.ts

155 lines3.8 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 fetchJson,
131 xhrServerSentEvents,
132 xhrHttpStream,
133 stream,
134 rpcStream,
135 webSocket,
136 createChatClientOptions,
137 type ConnectionAdapter,
138 type ConnectConnectionAdapter,
139 type SubscribeConnectionAdapter,
140 type RunAgentInputContext,
141 type FetchConnectionOptions,
142 type FetchJsonOptions,
143 type XhrConnectionOptions,
144 type WebSocketConnectionOptions,
145 type InferChatMessages,
146 type GenerationClientState,
147 type ImageGenerateInput,
148 type AudioGenerateInput,
149 type SpeechGenerateInput,
150 type TranscriptionGenerateInput,
151 type SummarizeGenerateInput,
152 type VideoGenerateInput,
153 type VideoGenerateResult,
154 type VideoStatusInfo,
155} from '@tanstack/ai-client'