Context pour (Pro)
ProIncluded in $99The context window as something that fills: a file's token cost flies into the meter and the part it added stays lit.
On this page
ProEach attached file pours its token cost into the meter; the part it added stays lit for a moment, the bar warns near the limit and turns red past it.
When a file or a pasted log is added, its token cost flies into the meter, the bar pours forward to the new total, and the part just added stays lit for a moment before it settles into the rest, so you can see what that one file cost. Past 80% the bar takes the amber of things near a limit; past the window it turns red and says what to do.
Installation
Needs chatcn Pro
This command works with a Pro license, along with every Pro component.
Or start free: sign up and get three Pro components on us, with a new one every month.
Usage
import { ContextPour, pourInto } from "@/components/ui/chatcn/pro/context-pour"
await pourInto(chipEl, meterRef.current, file.tokens)
setUsed((u) => u + file.tokens)
<ContextPour ref={meterRef} used={used} limit={200_000} />Props
| Prop | Type | Notes |
|---|---|---|
used | number | Tokens in context |
limit | number | The model's window |
warnAt | number | Share where it warns. Default 0.8 |
label | string | Default "Context" |
Accessibility
role="meter"with the share in words; over the limit adds a status line that says how to fix it.
Motion
- The fill is a heavy spring on
scaleX; the fresh part glows in the accent and fades over 1.3 s. - Reduced motion: no flight and the bar jumps.