import { FileText, X } from 'lucide-react'; import type { Attachment } from '@/lib/attachments'; interface Props { attachment: Attachment; onRemove: (id: string) => void; onPreview: (attachment: Attachment) => void; } export function AttachmentChip({ attachment, onRemove, onPreview }: Props) { const lineCount = attachment.content.split('\n').length; const label = attachment.kind === 'lines' && attachment.range ? `${attachment.filename}:${attachment.range[0]}-${attachment.range[1]}` : attachment.filename; return (