| 933 | |
| 934 | // Only used in tests |
| 935 | export function resetStateForTests(): void { |
| 936 | if (process.env.NODE_ENV !== 'test') { |
| 937 | throw new Error('resetStateForTests can only be called in tests') |
| 938 | } |
| 939 | Object.entries(getInitialState()).forEach(([key, value]) => { |
| 940 | STATE[key as keyof State] = value as never |
| 941 | }) |
| 942 | outputTokensAtTurnStart = 0 |
| 943 | currentTurnTokenBudget = null |
| 944 | budgetContinuationCount = 0 |
| 945 | sessionSwitched.clear() |
| 946 | } |
| 947 | |
| 948 | // You shouldn't use this directly. See src/utils/model/modelStrings.ts::getModelStrings() |
| 949 | export function getModelStrings(): ModelStrings | null { |