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

Function getFastModeRuntimeState

src/utils/fastMode.ts:200–213  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

198export const onCooldownExpired = cooldownExpired.subscribe
199
200export function getFastModeRuntimeState(): FastModeRuntimeState {
201 if (
202 runtimeState.status === 'cooldown' &&
203 Date.now() >= runtimeState.resetAt
204 ) {
205 if (isFastModeEnabled() && !hasLoggedCooldownExpiry) {
206 logForDebugging('Fast mode cooldown expired, re-enabling fast mode')
207 hasLoggedCooldownExpiry = true
208 cooldownExpired.emit()
209 }
210 runtimeState = { status: 'active' }
211 }
212 return runtimeState
213}
214
215export function triggerFastModeCooldown(
216 resetTimestamp: number,

Callers 2

isFastModeCooldownFunction · 0.85
FastModePickerFunction · 0.85

Calls 3

isFastModeEnabledFunction · 0.85
emitMethod · 0.80
logForDebuggingFunction · 0.70

Tested by

no test coverage detected