Auto-compact Threshold UI improvements (#5354)
This commit is contained in:
@@ -201,7 +201,7 @@ pub async fn check_if_compaction_needed(
|
||||
let usage_ratio = current_tokens as f64 / context_limit as f64;
|
||||
|
||||
let needs_compaction = if threshold <= 0.0 || threshold >= 1.0 {
|
||||
usage_ratio > DEFAULT_COMPACTION_THRESHOLD
|
||||
false // Auto-compact is disabled.
|
||||
} else {
|
||||
usage_ratio > threshold
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user