MCPcopy Create free account
hub / github.com/Noumena-Network/code / resetStateForTests

Function resetStateForTests

src/bootstrap/state.ts:935–946  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

933
934// Only used in tests
935export 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()
949export function getModelStrings(): ModelStrings | null {

Calls 3

getInitialStateFunction · 0.85
entriesMethod · 0.80
clearMethod · 0.45

Tested by 1

restoreEnvFunction · 0.68