Spaces:
Paused
Paused
Download ui/src/lib/instance-settings.ts from testfirela/paperclip-app: direct link, hf CLI and curl.
- Browser
- Download file 813 Bytes
-
https://huggingface.co/spaces/testfirela/paperclip-app/resolve/main/ui/src/lib/instance-settings.ts
- Command line
-
hf download hf://spaces/testfirela/paperclip-app/ui/src/lib/instance-settings.ts
-
curl -L -o instance-settings.ts https://huggingface.co/spaces/testfirela/paperclip-app/resolve/main/ui/src/lib/instance-settings.ts
813 Bytes
| export const DEFAULT_INSTANCE_SETTINGS_PATH = "/instance/settings/general"; | |
| export function normalizeRememberedInstanceSettingsPath(rawPath: string | null): string { | |
| if (!rawPath) return DEFAULT_INSTANCE_SETTINGS_PATH; | |
| const match = rawPath.match(/^([^?#]*)(\?[^#]*)?(#.*)?$/); | |
| const pathname = match?.[1] ?? rawPath; | |
| const search = match?.[2] ?? ""; | |
| const hash = match?.[3] ?? ""; | |
| if ( | |
| pathname === "/instance/settings/general" || | |
| pathname === "/instance/settings/heartbeats" || | |
| pathname === "/instance/settings/plugins" || | |
| pathname === "/instance/settings/experimental" | |
| ) { | |
| return `${pathname}${search}${hash}`; | |
| } | |
| if (/^\/instance\/settings\/plugins\/[^/?#]+$/.test(pathname)) { | |
| return `${pathname}${search}${hash}`; | |
| } | |
| return DEFAULT_INSTANCE_SETTINGS_PATH; | |
| } | |