revert: back out experimental codemode (#35077)

This commit is contained in:
Aiden Cline 2026-07-02 23:57:30 -05:00 committed by GitHub
commit 379adee35c
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
37 changed files with 47 additions and 12261 deletions

View file

@ -1,10 +0,0 @@
/**
* Token estimation for budgeting model-facing text. Copied from
* `@opencode-ai/core/util/token` (chars / 4) so this package stays
* dependency-free; keep the two in sync if the heuristic ever changes.
*/
export * as Token from "./token.js"
const CHARS_PER_TOKEN = 4
export const estimate = (input: string) => Math.max(0, Math.round(input.length / CHARS_PER_TOKEN))