shouldCompactPreemptively method
Returns true if preemptive compaction should trigger.
The threshold is 80% of maxTokens.
Implementation
@override
bool shouldCompactPreemptively(int currentTokens, int maxTokens) {
if (maxTokens <= 0) return false;
return currentTokens / maxTokens >= _preemptiveThreshold;
}