Download src/components/features/onboarding/onboarding-preview.ts from SaylorTwift/openhands: direct link, hf CLI and curl.
- Browser
- Download file 790 Bytes
-
https://huggingface.co/SaylorTwift/openhands/resolve/main/src/components/features/onboarding/onboarding-preview.ts
- Command line
-
hf download hf://SaylorTwift/openhands/src/components/features/onboarding/onboarding-preview.ts
-
curl -L -o onboarding-preview.ts https://huggingface.co/SaylorTwift/openhands/resolve/main/src/components/features/onboarding/onboarding-preview.ts
790 Bytes
| export const ONBOARDING_PREVIEW_STEP_QUERY_PARAM = "previewOnboardingStep"; | |
| const MAX_ONBOARDING_STEP = 3; | |
| /** Reads `?previewOnboardingStep=<0-3>` for dev/design review of a single slide. */ | |
| export function readOnboardingPreviewStep( | |
| search = typeof window !== "undefined" ? window.location.search : "", | |
| ): number | null { | |
| const raw = new URLSearchParams(search).get( | |
| ONBOARDING_PREVIEW_STEP_QUERY_PARAM, | |
| ); | |
| if (raw == null) return null; | |
| const step = Number.parseInt(raw, 10); | |
| if (!Number.isFinite(step) || step < 0 || step > MAX_ONBOARDING_STEP) { | |
| return null; | |
| } | |
| return step; | |
| } | |
| export function isOnboardingPreviewActive( | |
| search = typeof window !== "undefined" ? window.location.search : "", | |
| ): boolean { | |
| return readOnboardingPreviewStep(search) != null; | |
| } | |