refactor(token-meter): simplify singleton service (round 1)

This commit is contained in:
Hypatia May
2026-07-16 12:58:07 +08:00
parent 7250aaea7e
commit 5c243e8a8d
31 changed files with 653 additions and 1077 deletions
@@ -34,14 +34,11 @@ describe.skipIf(!process.env.DEEPSEEK_API_KEY)('compaction: a long session compa
ctx = await codingHarness(workdir, {
persona: SYSTEM_PROMPT,
tokenMeter: {
models: {
'deepseek-v4-flash': { contextWindow: 2000 },
},
contextWindow: 2000,
},
compact: {
models: {
'deepseek-v4-flash': { thresholdRatio: 0.5, retainTokens: 400 },
},
thresholdRatio: 0.5,
retainTokens: 400,
summarizationModel: '',
maxTokens: 1024,
compactionRetries: 1,