'use client' import * as React from 'react' import { Paperclip, Wrench } from 'lucide-react' import { cn } from '../../lib/utils' import type { ChatMessageAttachment, ChatMessageData } from './types' import { isImageName } from './attachment-utils' export interface ChatMessageProps { message: ChatMessageData /** Optional custom renderer for the message body (e.g. markdown). */ renderContent?: (content: string, message: ChatMessageData) => React.ReactNode className?: string } function StreamingDots() { return ( ) } /** * A single chat row. Text messages render as aligned bubbles (user right, * assistant left); `tool` / `status` kinds render as compact centered system * rows. Fully generic — no presentation-specific knowledge. */ /** Attachment chips/thumbnails rendered on a message bubble. */ function MessageAttachments({ attachments, isUser, }: { attachments: ChatMessageAttachment[] isUser: boolean }) { return (