()
| 419 | * so a flag served as null/string/NaN leaks through. |
| 420 | */ |
| 421 | export function getPerMessageBudgetLimit(): number { |
| 422 | const override = getFeatureValue_CACHED_MAY_BE_STALE<number | null>( |
| 423 | 'tengu_hawthorn_window', |
| 424 | null, |
| 425 | ) |
| 426 | if ( |
| 427 | typeof override === 'number' && |
| 428 | Number.isFinite(override) && |
| 429 | override > 0 |
| 430 | ) { |
| 431 | return override |
| 432 | } |
| 433 | return MAX_TOOL_RESULTS_PER_MESSAGE_CHARS |
| 434 | } |
| 435 | |
| 436 | /** |
| 437 | * Provision replacement state for a new conversation thread. |
no test coverage detected