mirror of
https://gitea.toothfairyai.com/ToothFairyAI/tf_code.git
synced 2026-04-22 16:44:36 +00:00
feat: better compaction
This commit is contained in:
2
bun.lock
2
bun.lock
@@ -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",
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -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",
|
||||||
|
|||||||
@@ -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()
|
||||||
|
|||||||
Reference in New Issue
Block a user