revert: back out experimental codemode (#35077)
This commit is contained in:
parent
2ef1a5991c
commit
379adee35c
37 changed files with 47 additions and 12261 deletions
|
|
@ -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))
|
||||
Loading…
Add table
Add a link
Reference in a new issue