beUI Pro for mobile is live — 50 React Native blocks and screens
Context Window
1 variant
A token meter for an agent's context window: what fills it, how much is left, and ways to compact or clear it before it runs out.
Context meter
context-window-panel.tsxThe window splits into system prompt, tools, files, conversation, and tool results as a segmented meter that grows turn by turn. Past 70% it warns, Compact now summarizes the conversation, rows clear tool results or unpin files, and crossing the threshold tick compacts on its own.
Context window
Sonnet 5.5
129k of 200k tokens
70.9k left
- System promptInstructions3.2kPinned
- Tool definitions14 tools11.8kPinned
- Pinned files6 files31.4k
- Conversation38 messages58.6k
- Tool results21 calls24.1k
TSXcomponents/previews/premium/context-window-meter-preview.tsx
"use client";
import { ContextWindowPanel } from "@/components/premium/context-window";
export function ContextWindowMeterPreview() {
return <ContextWindowPanel />;
}
Source code is locked
Get access to install premium components and view the full source.
Open dashboardInstall
$ bunx --bun shadcn add @beui-pro/context-window-meter