mirror of
https://github.com/affaan-m/everything-claude-code.git
synced 2026-03-30 21:53:28 +08:00
fix: consistent periodic interval spacing in suggest-compact, add 10 tests
- suggest-compact.js: count % 25 → (count - threshold) % 25 for consistent spacing regardless of threshold value - Update existing periodic interval test to match corrected behavior - 10 new tests: interval fix regression (non-25-divisible threshold, false suggestion prevention), corrupted counter file, 1M boundary, malformed JSON pass-through, non-TS extension pass-through, empty sessions dir, blank template skip
This commit is contained in:
@@ -66,8 +66,8 @@ async function main() {
|
||||
log(`[StrategicCompact] ${threshold} tool calls reached - consider /compact if transitioning phases`);
|
||||
}
|
||||
|
||||
// Suggest at regular intervals after threshold
|
||||
if (count > threshold && count % 25 === 0) {
|
||||
// Suggest at regular intervals after threshold (every 25 calls from threshold)
|
||||
if (count > threshold && (count - threshold) % 25 === 0) {
|
||||
log(`[StrategicCompact] ${count} tool calls - good checkpoint for /compact if context is stale`);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user