022
See exactly what's filling your model's context, as a field of cells or a treemap of the same parts; hover anything to light it in both, drop a file you don't need, and Compact folds older turns into a short summary.
akacontext window·tokens·treemap
Run this in any project set up for the shadcn CLI. It copies the Token Budget source into your components folder, so the code is yours to change.
npx shadcn@latest add https://devl.dev/r/token-budget.jsonImport it and render it. Every prop has a typed default, so it works straight away, and you pass your own data when you’re ready.
import { TokenBudget } from "@/components/token-budget";
export default function Page() {
return <TokenBudget />;
}A free React component in the Mission Control collection, written in TypeScript with Tailwind CSS on coss ui. MIT licensed.
Read from the Token Budget source. Everything is optional unless it says required.
| Prop | Type | Default |
|---|---|---|
| model | string | "orbit-2" |
| limit | number | 200_000 |
| system | number | 4_200 |
| tools | number | 14_800 |
| memory | number | 3_100 |
| files | BudgetFile[] | [] |
| chat | number | 0 |
| turns | number | 0 |
| results | number | 0 |
| keepRecent | number | 0.2 |
| summaryRatio | number | 0.06 |
| defaultView | BudgetView | "cells" |
| cells | number | 200 |
| columns | number | 20 |
| onRemoveFile | (id: string) => void | — |
| onCompact | (summary: { turns: number; summaryTokens: number; freed: number }) => void | — |
| className | string | — |