'use client'; import { FileText, X } from 'lucide-react'; import { formatBytes } from './MessageAttachments'; import type { PendingAttachment } from './useAttachmentDraft'; /** * The staged-files strip above the composer. Shows what will be sent and lets * the agent drop any of it before hitting send. */ export function AttachmentDraftBar({ attachments, onRemove, }: { attachments: PendingAttachment[]; onRemove: (id: string) => void; }) { if (attachments.length === 0) return null; return (
{attachments.map((a) => (
{a.previewUrl ? ( // eslint-disable-next-line @next/next/no-img-element {a.file.name} ) : ( )} {a.file.name} {formatBytes(a.file.size)}
))}
); }