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

index.ts

150 lines3.7 KB

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