Skip to main content

fmt_approx_tokens

Function fmt_approx_tokens 

Source
pub fn fmt_approx_tokens(n: u64) -> String
Expand description

Render an estimated token count in the shared UX style: ~21,904 tok (tilde prefix + comma-grouped thousands, matching the stub-line comma style in reduce.rs). Every figure that flows through estimate_tokens/estimate_view_tokens/estimate_deferred_schema_tokens should be rendered through this helper so the ~ discipline (D11) is applied uniformly rather than ad hoc at each call site.