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
commit beae7290f3
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
26 changed files with 569 additions and 296 deletions

View file

@ -0,0 +1,5 @@
export * as Token from "./token"
const CHARS_PER_TOKEN = 4
export const estimate = (input: string) => Math.max(0, Math.round(input.length / CHARS_PER_TOKEN))