pub fn default_compact_threshold_chars(model: &str) -> usizeExpand description
Compute the default compaction character-count threshold for a model.
Strategy (mirrors fake-cc getAutoCompactThreshold):
- Start from the model’s context window in tokens.
- Reserve 20 000 tokens for the compaction summary output.
- Take 80 % of the remainder as the trigger point (leaves a comfortable 20 % buffer before the hard limit is hit).
- Convert tokens → characters using a conservative 4 chars/token ratio.