Download src/utils/permissions/autoModeState.ts from chenbhao/codev: direct link, hf CLI and curl.
- Browser
- Download file 1.1 kB
-
https://huggingface.co/chenbhao/codev/resolve/e91c8197c9918ff9e5df3140e8c36282bb30e9a2/src/utils/permissions/autoModeState.ts
- Command line
-
hf download hf://chenbhao/codev@e91c8197c9918ff9e5df3140e8c36282bb30e9a2/src/utils/permissions/autoModeState.ts
-
curl -L -o autoModeState.ts https://huggingface.co/chenbhao/codev/resolve/e91c8197c9918ff9e5df3140e8c36282bb30e9a2/src/utils/permissions/autoModeState.ts
1.1 kB
| // Auto mode state functions — lives in its own module so callers can | |
| // conditionally require() it on feature('TRANSCRIPT_CLASSIFIER'). | |
| let autoModeActive = false | |
| let autoModeFlagCli = false | |
| // Set by the async verifyAutoModeGateAccess check when it | |
| // reads a fresh tengu_auto_mode_config.enabled === 'disabled' from GrowthBook. | |
| // Used by isAutoModeGateEnabled() to block SDK/explicit re-entry after kick-out. | |
| let autoModeCircuitBroken = false | |
| export function setAutoModeActive(active: boolean): void { | |
| autoModeActive = active | |
| } | |
| export function isAutoModeActive(): boolean { | |
| return autoModeActive | |
| } | |
| export function setAutoModeFlagCli(passed: boolean): void { | |
| autoModeFlagCli = passed | |
| } | |
| export function getAutoModeFlagCli(): boolean { | |
| return autoModeFlagCli | |
| } | |
| export function setAutoModeCircuitBroken(broken: boolean): void { | |
| autoModeCircuitBroken = broken | |
| } | |
| export function isAutoModeCircuitBroken(): boolean { | |
| return autoModeCircuitBroken | |
| } | |
| export function _resetForTesting(): void { | |
| autoModeActive = false | |
| autoModeFlagCli = false | |
| autoModeCircuitBroken = false | |
| } | |