Context-budget warning state (= calculateTokenWarningState, autoCompact.ts)
Source:R/context.R
calculate_token_warning_state.RdComputes how much context is left and which thresholds have been crossed, for the "X% context left" indicator in the REPL banner and Shiny status bar.
Arguments
- token_usage
Integer. Current token usage (see token_count_with_estimation).
- model
Character. Model id/name.
- chat
An
ellmer::Chator NULL.