fix compaction issues

This commit is contained in:
Dax Raad
2025-09-12 05:59:53 -04:00
parent 3c502861a7
commit 983e3b2ee3
2 changed files with 185 additions and 115 deletions

View File

@@ -0,0 +1,7 @@
export namespace Token {
const CHARS_PER_TOKEN = 4
export function estimate(input: string) {
return Math.max(0, Math.round((input || "").length / CHARS_PER_TOKEN))
}
}