gpui-kit GitHub

Components

ContextGauge builder

How much of a context window a run has used.

A builder is RenderOnce. Construct and mount it in one expression.

use gpui_kit::agent::ContextGauge;

Construct

new(ident: impl Into<Ident>, used: Reading) -> Self

Options

Chain onto the value.

label(label: impl Into<SharedString>) -> Self
limit(limit: Limit) -> Self
stale(verified: LastVerified) -> Self

Queries

Only answer; they change nothing.

fraction() -> Option<f32>

Rendered by

Each of these compiles and is captured by the gate, so the code behind them is verified rather than written.

Source: crates/gpui-kit/src/agent/cost.rs