From bf5906fd89c639427e0f361e42eb8018759a7a8a Mon Sep 17 00:00:00 2001 From: Nate Date: Thu, 26 Mar 2026 14:26:04 -0700 Subject: [PATCH] fix: resolve TypeScript compilation errors from merge - Fix LocalProfileLoader test: remove controlPlaneClient refs, update default title to match "Main Config" - Remove showStagingIndicator from Layout.tsx (variable was undefined) - Remove usePlatform from MockIdeMessenger (removed from config types) - Add GithubIcon component and DISCUSSIONS_LINK to StreamError.tsx - Add overloaded retry constants to streamThunkWrapper.tsx Co-Authored-By: Claude Opus 4.6 (1M context) --- core/config/profile/LocalProfileLoader.vitest.ts | 16 ++++------------ gui/src/components/Layout.tsx | 9 --------- gui/src/context/MockIdeMessenger.ts | 1 - gui/src/pages/gui/StreamError.tsx | 10 ++++++++++ gui/src/redux/thunks/streamThunkWrapper.tsx | 9 +++++++++ 5 files changed, 23 insertions(+), 22 deletions(-) diff --git a/core/config/profile/LocalProfileLoader.vitest.ts b/core/config/profile/LocalProfileLoader.vitest.ts index 0f33c191b..d8f11861b 100644 --- a/core/config/profile/LocalProfileLoader.vitest.ts +++ b/core/config/profile/LocalProfileLoader.vitest.ts @@ -62,13 +62,9 @@ describe("LocalProfileLoader", () => { configName: "My Custom Config", }); - const loader = new LocalProfileLoader( - testIde, - controlPlaneClient, - llmLogger, - ); + const loader = new LocalProfileLoader(testIde, llmLogger); - expect(loader.description.title).toBe("Local Config"); + expect(loader.description.title).toBe("Main Config"); await loader.doLoadConfig(); @@ -82,14 +78,10 @@ describe("LocalProfileLoader", () => { configLoadInterrupted: false, }); - const loader = new LocalProfileLoader( - testIde, - controlPlaneClient, - llmLogger, - ); + const loader = new LocalProfileLoader(testIde, llmLogger); await loader.doLoadConfig(); - expect(loader.description.title).toBe("Local Config"); + expect(loader.description.title).toBe("Main Config"); }); }); diff --git a/gui/src/components/Layout.tsx b/gui/src/components/Layout.tsx index f4bebec19..7e2788a22 100644 --- a/gui/src/components/Layout.tsx +++ b/gui/src/components/Layout.tsx @@ -208,15 +208,6 @@ const Layout = () => { - {showStagingIndicator && ( - - )}
+ + + ); +} import { GhostButton } from "../../components"; import { useEditModel } from "../../components/mainInput/Lump/useEditBlock"; import { useMainEditor } from "../../components/mainInput/TipTapEditor"; diff --git a/gui/src/redux/thunks/streamThunkWrapper.tsx b/gui/src/redux/thunks/streamThunkWrapper.tsx index 78d864bcd..869763b35 100644 --- a/gui/src/redux/thunks/streamThunkWrapper.tsx +++ b/gui/src/redux/thunks/streamThunkWrapper.tsx @@ -2,6 +2,15 @@ import { createAsyncThunk } from "@reduxjs/toolkit"; import StreamErrorDialog from "../../pages/gui/StreamError"; import { analyzeError } from "../../util/errorAnalysis"; + +const OVERLOADED_RETRIES = 3; +const OVERLOADED_DELAY_MS = 2000; + +function isOverloadedErrorMessage(message?: string): boolean { + if (!message) return false; + const lower = message.toLowerCase(); + return lower.includes("overloaded") || lower.includes("529"); +} import { selectSelectedChatModel } from "../slices/configSlice"; import { setDialogMessage, setShowDialog } from "../slices/uiSlice"; import { ThunkApiType } from "../store";