import type { UIAttachment } from '../../types/chat' import { AttachmentGallery } from './AttachmentGallery' import { MessageActionBar } from './MessageActionBar' type Props = { content: string attachments?: UIAttachment[] onRewind?: () => void rewindLabel?: string } export function UserMessage({ content, attachments, onRewind, rewindLabel }: Props) { const hasText = content.trim().length > 0 return (
{attachments && attachments.length > 0 && ( )} {hasText && (
{content}
)} {hasText && ( )}
) }