import React from 'react'; import { Button } from '~/components/ui/Button'; import { Card, CardContent } from '~/components/ui/Card'; import { Cable, Server, ArrowLeft } from 'lucide-react'; import { useLocalModelHealth } from '~/lib/hooks/useLocalModelHealth'; import HealthStatusBadge from './HealthStatusBadge'; import { PROVIDER_ICONS } from './types'; // Status Dashboard Component function StatusDashboard({ onBack }: { onBack: () => void }) { const { healthStatuses } = useLocalModelHealth(); return (
{/* Header with Back Button */}

Provider Status

Monitor the health of your local AI providers

{healthStatuses.length === 0 ? (

No Endpoints Configured

Configure and enable local providers to see their endpoint status here.

) : (
{healthStatuses.map((status) => (
{React.createElement(PROVIDER_ICONS[status.provider as keyof typeof PROVIDER_ICONS] || Server, { className: 'w-5 h-5 text-bolt-elements-textPrimary', })}

{status.provider}

{status.baseUrl}

Models
{status.availableModels?.length || 0}
Version
{status.version || 'Unknown'}
Last Check
{status.lastChecked ? new Date(status.lastChecked).toLocaleTimeString() : 'Never'}
))}
)}
); } export default StatusDashboard;