Skip to main content

Module context_meter

Module context_meter 

Source
Expand description

Context-window usage: how much of the model’s window a conversation has consumed, as a ring, a bar, or plain text, with a hover breakdown.

The meter changes tone as the window fills — calm below 65%, warning to 85%, danger above — and exposes the same numbers semantically so the level never depends on color alone.

Structs§

ContextMeter
A context-window usage readout.
ContextUsage
Application-measured token usage for one context window.

Enums§

ContextMeterVariant
How the meter draws its value.
UsageLevel
How full the context window is, in the three bands people act on.

Functions§

format_tokens
Formats a token count compactly: 912, 84.3K, 1.2M.