Browse components
ChatComponent
Context
Context-window usage indicator for AI chat: a ghost button showing percent used with a ring icon that opens a hover card with a progress bar, token counts (input, output, reasoning, cached) and a USD cost estimated by tokenlens from the model id, with reasoning billed as output and cached reads at the cache rate so the rows add up to the total. Use in a chat toolbar or prompt-input footer to show how much of the model's context a conversation has consumed.
pnpm dlx shadcn@latest add @uifiles/context
Installs with
Two points in a conversation
Hover or focus the percentage for token usage by kind and the estimated cost for the current model.
40% of the window
95% of the window