Spaces:
Configuration error
Configuration error
Download frontend/src/utils/feature-flags.ts from flyingdarkdev/README: direct link, hf CLI and curl.
- Browser
- Download file 558 Bytes
-
https://huggingface.co/spaces/flyingdarkdev/README/resolve/main/frontend/src/utils/feature-flags.ts
- Command line
-
hf download hf://spaces/flyingdarkdev/README/frontend/src/utils/feature-flags.ts
-
curl -L -o feature-flags.ts https://huggingface.co/spaces/flyingdarkdev/README/resolve/main/frontend/src/utils/feature-flags.ts
558 Bytes
| export function loadFeatureFlag( | |
| flagName: string, | |
| defaultValue: boolean = false, | |
| ): boolean { | |
| try { | |
| const stringValue = | |
| localStorage.getItem(`FEATURE_${flagName}`) || defaultValue.toString(); | |
| const value = !!JSON.parse(stringValue); | |
| return value; | |
| } catch (e) { | |
| return defaultValue; | |
| } | |
| } | |
| export const BILLING_SETTINGS = () => loadFeatureFlag("BILLING_SETTINGS"); | |
| export const HIDE_LLM_SETTINGS = () => loadFeatureFlag("HIDE_LLM_SETTINGS"); | |
| export const ENABLE_TRAJECTORY_REPLAY = () => | |
| loadFeatureFlag("TRAJECTORY_REPLAY"); | |