feat(core): compact v2 session context (#30986)

This commit is contained in:
Kit Langton
2026-06-05 13:17:23 -04:00
committed by GitHub
parent a7bd1cd0d0
commit beae7290f3
26 changed files with 571 additions and 298 deletions
+1 -7
View File
@@ -1,7 +1 @@
const CHARS_PER_TOKEN = 4
export function estimate(input: string) {
return Math.max(0, Math.round((input || "").length / CHARS_PER_TOKEN))
}
export * as Token from "./token"
export { Token, estimate } from "@opencode-ai/core/util/token"