(fact: string)
| 36 | |
| 37 | /** A fact is "important" (always injected) if it carries the `!important` marker (case-insensitive). */ |
| 38 | export function isImportantFact(fact: string): boolean { |
| 39 | return /(^|\s)!important\b/i.test(fact); |
| 40 | } |
| 41 | |
| 42 | /** Rough token estimate — ~4 chars/token, the usual heuristic; good enough for a budget gate. */ |
| 43 | export function estimateTokens(text: string): number { |
no outgoing calls
no test coverage detected