Context meter
Context window usage split by what is spending it. The bar and legend are linked, and the meter turns amber, then red, as the window fills.
npx shadcn add @bjork-ui/context-meter
import { ContextMeter, SAMPLE_CONTEXT } from "@/components/bjork-ui/ai/context-meter";export function Demo() { return ( <> <ContextMeter segments={SAMPLE_CONTEXT} limit={200_000} /> <ContextMeter segments={SAMPLE_CONTEXT} limit={200_000} variant="compact" /> </> );}