import { CardTitle, CardHeader, CardContent, Card } from '@/components/ui/card' import { Worker, WorkerKind } from '@/lib/gql/generates/graphql' import { cn } from '@/lib/utils' type RunnerType = WorkerKind | 'INDEX' interface RunnerCardProps extends Partial> { kind: RunnerType } export default function RunnerCard({ addr, name, kind, device, cudaDevices, cpuCount, cpuInfo }: RunnerCardProps) { const textClass = cn("ml-2", "whitespace-nowrap", "overflow-hidden", "overflow-ellipsis") const cpuMessage = `${cpuInfo} (${cpuCount} cores)`; return (

{name}

{addr}

{cpuMessage}

{device == 'cuda' && cudaDevices?.length && cudaDevices.map((x, i) => (

{x}

))}
) } interface InfoProps { children: React.ReactNode } function Info({ children }: InfoProps) { return (
{children}
) } function ModelIcon({ type }: { type: RunnerType }) { const className = 'h-5 w-5' if (type == WorkerKind.Completion) { return ( ) } else if (type == WorkerKind.Chat) { return ( ) } else if (type == 'INDEX') { return ( ) } }