import { ActionIcon, Box, Group, Image, Paper, Text } from "@mantine/core"; 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 ? ( {a.file.name} ) : ( )} {a.file.name} {formatBytes(a.file.size)} onRemove(a.id)} style={{ position: "absolute", top: -6, right: -6 }} > ))} ); }