Download apps/desktop/src/lib/code-skew-error.ts from SaylorTwift/hermes-agent: direct link, hf CLI and curl.
- Browser
- Download file 378 Bytes
-
https://huggingface.co/SaylorTwift/hermes-agent/resolve/main/apps/desktop/src/lib/code-skew-error.ts
- Command line
-
hf download hf://SaylorTwift/hermes-agent/apps/desktop/src/lib/code-skew-error.ts
-
curl -L -o code-skew-error.ts https://huggingface.co/SaylorTwift/hermes-agent/resolve/main/apps/desktop/src/lib/code-skew-error.ts
378 Bytes
| /** True when a backend error is the post-update stale-module 503 (#97046). */ | |
| export function isCodeSkewRestartRequired(error: unknown): boolean { | |
| return /Restart required:/i.test(errorText(error)) | |
| } | |
| function errorText(error: unknown): string { | |
| if (error instanceof Error) { | |
| return error.message | |
| } | |
| return typeof error === 'string' ? error : String(error ?? '') | |
| } | |