import { useState } from 'react' import { Button } from '@/components/ui/button' import { DisclosureCaret } from '@/components/ui/disclosure-caret' import { ArrowUp, Pencil, Trash2 } from '@/lib/icons' import { cn } from '@/lib/utils' import type { QueuedPromptEntry } from '@/store/composer-queue' interface QueuePanelProps { busy: boolean editingId: null | string entries: QueuedPromptEntry[] onDelete: (id: string) => void onEdit: (entry: QueuedPromptEntry) => void onSendNow: (id: string) => void } const entryPreview = (entry: QueuedPromptEntry) => entry.text.trim() || (entry.attachments.length > 0 ? 'Attachment-only turn' : 'Empty turn') export function QueuePanel({ busy, editingId, entries, onDelete, onEdit, onSendNow }: QueuePanelProps) { const [collapsed, setCollapsed] = useState(false) if (entries.length === 0) { return null } return (
{entryPreview(entry)}
{(attachmentsCount > 0 || isEditing) && (