remove the hivectl-only quota verbs and the trollshell status feed
This commit is contained in:
parent
70a8e54038
commit
cf360b74b9
1 changed files with 51 additions and 521 deletions
|
|
@ -451,9 +451,8 @@ fn compact(bus: &Bus, wake_prompt: Option<String>) -> Response {
|
|||
message: "compact refused: effective context window is unknown (0)".to_owned(),
|
||||
};
|
||||
}
|
||||
// Token counts stay well under 2^53 in practice, so the f64 conversion
|
||||
// is exact; this is a threshold ratio, not a byte-count display, but the
|
||||
// same "cosmetic precision loss" reasoning as `hivectl::quota::human_bytes` applies.
|
||||
// Token counts stay well under 2^53 in practice, so the f64 conversion is exact.
|
||||
// The ratio is only compared against a fixed threshold, so a last-place rounding error cannot change the outcome.
|
||||
#[allow(clippy::cast_precision_loss)]
|
||||
let fraction = usage.context_tokens() as f64 / window as f64;
|
||||
if fraction < COMPACT_MIN_USAGE_FRACTION {
|
||||
|
|
|
|||
Loading…
Reference in a new issue