'use client' import { SEQUENCE_SLOTS, PUBLIC_SLOT_CAP } from '@/lib/clusterMock' type Props = { used: number size?: 'sm' | 'lg' showCap?: boolean } /** * The signature element. Eight discrete cells, one per vLLM sequence slot. * Cells past PUBLIC_SLOT_CAP are operator headroom and read as reserved. */ export function SlotMeter({ used, size = 'sm', showCap = false }: Props) { const cell = size === 'lg' ? 'h-6 w-3' : 'h-3 w-[7px]' return (
{Array.from({ length: SEQUENCE_SLOTS }, (_, i) => { const reserved = i >= PUBLIC_SLOT_CAP const active = i < used return ( ) })}
{showCap && ( {used}/{PUBLIC_SLOT_CAP} public ยท {SEQUENCE_SLOTS} total )}
) }