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": { "packages/tfcode": {
"name": "tfcode", "name": "tfcode",
"version": "1.0.9", "version": "1.0.10",
"bin": { "bin": {
"tfcode": "./bin/tfcode", "tfcode": "./bin/tfcode",
}, },

View File

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

View File

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