feat: better compaction

This commit is contained in:
Gab 2026-03-26 19:42:30 +11:00
parent ee358a01eb
commit b893490db0
3 changed files with 3 additions and 3 deletions

View File

@ -381,7 +381,7 @@
},
"packages/tfcode": {
"name": "tfcode",
"version": "1.0.9",
"version": "1.0.10",
"bin": {
"tfcode": "./bin/tfcode",
},

View File

@ -1,6 +1,6 @@
{
"$schema": "https://json.schemastore.org/package.json",
"version": "1.0.9",
"version": "1.0.10",
"name": "tfcode",
"type": "module",
"license": "MIT",

View File

@ -29,7 +29,7 @@ export namespace SessionCompaction {
}
const COMPACTION_BUFFER = 20_000
const COMPACTION_BUFFER_TOOTHFAIRYAI = 100_000
const COMPACTION_BUFFER_TOOTHFAIRYAI = 250_000
export async function isOverflow(input: { tokens: MessageV2.Assistant["tokens"]; model: Provider.Model }) {
const config = await Config.get()