import { X, RefreshCw, CheckCircle2, XCircle, AlertCircle } from 'lucide-react'; import { neonModelDisplayName } from '../utils/displayName'; const STATUS_META = { online: { label: 'Online', Icon: CheckCircle2, className: 'status-online' }, unavailable: { label: 'Unavailable', Icon: AlertCircle, className: 'status-unavailable' }, error: { label: 'Error', Icon: XCircle, className: 'status-error' }, }; export default function ModelStatusModal({ statuses, loading, onClose, onRefresh }) { return (
e.stopPropagation()}>

Model Status

{loading && !statuses.length ? (

Checking models…

) : !statuses.length ? (

No models configured.

) : (
    {statuses.map((s) => { const meta = STATUS_META[s.status] || STATUS_META.unavailable; const { Icon } = meta; const displayName = s.is_neon ? neonModelDisplayName(s.model_name || s.model_id) : s.model_name; return (
  • {s.provider_name} {displayName} {meta.label}
    {s.status === 'error' && s.error && (
    {s.error}
    )}
  • ); })}
)}
); }