beUI Pro pour mobile est disponible : 50 blocs et écrans React Native
Context Window
1 variante
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 />;
}
Le code source est verrouillé
Obtenez un accès pour installer les composants premium et voir tout le code source.
Ouvrir le tableau de bordInstallation
$ bunx --bun shadcn add @beui-pro/context-window-meter