Open History to see the last commit
1/**
2 * @tanstack/ai-solid-ui
3 *
4 * Headless Solid.js components for building AI chat interfaces.
5 *
6 * Features:
7 * - Parts-based message rendering (text, tool calls, tool results)
8 * - Native tool approval workflows
9 * - Client-side tool execution support
10 * - Streaming support
11 * - Fully customizable with render props
12 * - Compound component pattern
13 *
14 * @example
15 * ```tsx
16 * import { Chat, ChatMessages, ChatInput, ChatMessage } from '@tanstack/ai-solid-ui'
17 *
18 * <Chat connection={fetchServerSentEvents('/api/chat')}>
19 * <ChatMessages>
20 * {(message) => <ChatMessage message={message} />}
21 * </ChatMessages>
22 * <ChatInput />
23 * </Chat>
24 * ```
25 */
26
27// Main components
28export { Chat, useChatContext, type ChatProps } from './chat'
29export { ChatMessages, type ChatMessagesProps } from './chat-messages'
30export {
31 ChatMessage,
32 type ChatMessageProps,
33 type ToolCallRenderProps,
34} from './chat-message'
35export {
36 ChatInput,
37 type ChatInputProps,
38 type ChatInputRenderProps,
39} from './chat-input'
40export {
41 ToolApproval,
42 type ToolApprovalProps,
43 type ToolApprovalRenderProps,
44} from './tool-approval'
45export { TextPart, type TextPartProps } from './text-part'
46export { ThinkingPart, type ThinkingPartProps } from './thinking-part'
47
48// Re-export hooks from @tanstack/ai-solid for convenience
49export { useChat } from '@tanstack/ai-solid'
50
51// Re-export types from @tanstack/ai-solid
52export type {
53 UIMessage,
54 MessagePart,
55 ToolCallPart,
56 ToolResultPart,
57 TextPart as TextPartType,
58 ConnectionAdapter,
59} from '@tanstack/ai-client'
60
61export type { UseChatOptions, UseChatReturn } from '@tanstack/ai-solid'