/** * Example of how to use the chat components with Vercel AI SDK v5 * * This example shows how to: * 1. Use UIMessage directly from the AI SDK * 2. Handle different part types in messages * 3. Create custom tools and data parts */ export declare function ExampleChatInterface(): import("react/jsx-runtime").JSX.Element; /** * Key points about the simplified approach: * * 1. **Use UIMessage directly**: No need for custom EnhancedMessage types * * 2. **Leverage parts system**: Different content types are handled through message.parts * - 'text' parts for regular text content * - 'file' parts for file attachments * - 'tool-{toolName}' parts for tool invocations (following AI SDK v5 pattern) * - 'data-{dataType}' parts for custom UI components * * 3. **Tool parts follow AI SDK v5 pattern**: * - type: 'tool-{toolName}' * - state: 'input-available' | 'output-available' | 'output-error' * - args: input parameters * - output: tool execution results * * 4. **Custom data parts for UI components**: * - type: 'data-{dataType}' (e.g., 'data-reference', 'data-menu') * - Contains the data needed to render custom UI components * * 5. **Helper functions available**: * - getTextContent(message): Extract all text from message parts * - hasToolPart(message, toolName): Check if message has specific tool * - getToolPart(message, toolName): Get specific tool part * - hasFilePart(message): Check if message has file attachments * - getFileParts(message): Get all file parts * - hasDataPart(message, dataType): Check for custom data parts * - getDataPart(message, dataType): Get specific data part */