From 2642f6d21d702e7aa92b098dfbc2c7f9728d384a Mon Sep 17 00:00:00 2001 From: Daniel Han Date: Mon, 16 Mar 2026 06:28:39 +0000 Subject: [PATCH] Add sloth emoji to section labels, friendlier network error - Add sloth emoji prefix to "Downloaded" and "Recommended" section labels in the Hub model picker so they are visually distinct. - Replace browser network errors ("NetworkError when attempting to fetch resource" / "Failed to fetch") with a clearer message: "Studio isn't running -- please relaunch it." --- .../components/assistant-ui/model-selector/pickers.tsx | 4 ++-- studio/frontend/src/features/auth/api.ts | 10 +++++++++- 2 files changed, 11 insertions(+), 3 deletions(-) diff --git a/studio/frontend/src/components/assistant-ui/model-selector/pickers.tsx b/studio/frontend/src/components/assistant-ui/model-selector/pickers.tsx index 22a1cb7e72..6baeb9b55b 100644 --- a/studio/frontend/src/components/assistant-ui/model-selector/pickers.tsx +++ b/studio/frontend/src/components/assistant-ui/model-selector/pickers.tsx @@ -495,7 +495,7 @@ export function HubModelPicker({
{!showHfSection && (cachedGguf.length > 0 || cachedModels.length > 0) ? ( <> - Downloaded + {"\uD83E\uDDA5"} Downloaded {cachedGguf.map((c) => (
- Recommended + {"\uD83E\uDDA5"} Recommended {recommendedIds.length === 0 ? (
No default models. diff --git a/studio/frontend/src/features/auth/api.ts b/studio/frontend/src/features/auth/api.ts index e2e4932936..3bb2c9139c 100644 --- a/studio/frontend/src/features/auth/api.ts +++ b/studio/frontend/src/features/auth/api.ts @@ -84,7 +84,15 @@ export async function authFetch( headers.set("Authorization", `Bearer ${accessToken}`); } - const response = await fetch(input, { ...init, headers }); + let response: Response; + try { + response = await fetch(input, { ...init, headers }); + } catch (err) { + if (err instanceof TypeError) { + throw new Error("Studio isn't running -- please relaunch it."); + } + throw err; + } if (await isPasswordChangeRequiredResponse(response)) { void redirectToAuth(); return response;