From 749026a44bf7e855960074aa2b616202f79abb7a Mon Sep 17 00:00:00 2001 From: Bruno Bergher Date: Tue, 13 Jan 2026 15:43:51 +0000 Subject: [PATCH] ux: Further improve error display (#10692) * Ensures error details are shown for all errors (except diff, which has its own case) * More details * litellm is a proxy --- webview-ui/src/components/chat/ChatRow.tsx | 12 ++-- webview-ui/src/components/chat/ErrorRow.tsx | 23 +++++-- .../ApiOptions.provider-filtering.spec.tsx | 4 +- .../src/components/settings/constants.ts | 68 +++++++++---------- webview-ui/src/i18n/locales/ca/chat.json | 3 +- webview-ui/src/i18n/locales/de/chat.json | 3 +- webview-ui/src/i18n/locales/en/chat.json | 3 +- webview-ui/src/i18n/locales/es/chat.json | 3 +- webview-ui/src/i18n/locales/fr/chat.json | 3 +- webview-ui/src/i18n/locales/hi/chat.json | 3 +- webview-ui/src/i18n/locales/id/chat.json | 3 +- webview-ui/src/i18n/locales/it/chat.json | 3 +- webview-ui/src/i18n/locales/ja/chat.json | 3 +- webview-ui/src/i18n/locales/ko/chat.json | 3 +- webview-ui/src/i18n/locales/nl/chat.json | 3 +- webview-ui/src/i18n/locales/pl/chat.json | 3 +- webview-ui/src/i18n/locales/pt-BR/chat.json | 3 +- webview-ui/src/i18n/locales/ru/chat.json | 3 +- webview-ui/src/i18n/locales/tr/chat.json | 3 +- webview-ui/src/i18n/locales/vi/chat.json | 3 +- webview-ui/src/i18n/locales/zh-CN/chat.json | 3 +- webview-ui/src/i18n/locales/zh-TW/chat.json | 3 +- 22 files changed, 97 insertions(+), 64 deletions(-) diff --git a/webview-ui/src/components/chat/ChatRow.tsx b/webview-ui/src/components/chat/ChatRow.tsx index e36ef2811b..24749bb419 100644 --- a/webview-ui/src/components/chat/ChatRow.tsx +++ b/webview-ui/src/components/chat/ChatRow.tsx @@ -1132,14 +1132,16 @@ export const ChatRowContent = ({ // } } else { body = t("chat:apiRequest.errorMessage.unknown") - docsURL = "mailto:support@roocode.com?subject=Unknown API Error" + docsURL = + "mailto:support@roocode.com?subject=Unknown API Error&body=[Please include full error details]" } } else if (message.text.indexOf("Connection error") === 0) { body = t("chat:apiRequest.errorMessage.connection") } else { // Non-HTTP-status-code error message - store full text as errorDetails body = t("chat:apiRequest.errorMessage.unknown") - docsURL = "mailto:support@roocode.com?subject=Unknown API Error" + docsURL = + "mailto:support@roocode.com?subject=Unknown API Error&body=[Please include full error details]" } } @@ -1336,7 +1338,9 @@ export const ChatRowContent = ({ } // Fallback for generic errors - return + return ( + + ) case "completion_result": return ( <> @@ -1526,7 +1530,7 @@ export const ChatRowContent = ({ case "ask": switch (message.ask) { case "mistake_limit_reached": - return + return case "command": return ( p.value === provider)?.proxy ?? false + // Format error details with metadata prepended const formattedErrorDetails = useMemo(() => { if (!errorDetails) return undefined @@ -104,14 +107,14 @@ export const ErrorRow = memo( const metadata = [ `Date/time: ${new Date().toISOString()}`, `Extension version: ${version}`, - `Provider: ${provider}`, + `Provider: ${provider}${usesProxy ? " (proxy)" : ""}`, `Model: ${modelId}`, "", "", ].join("\n") return metadata + errorDetails - }, [errorDetails, version, provider, modelId]) + }, [errorDetails, version, provider, modelId, usesProxy]) const handleDownloadDiagnostics = useCallback( (e: React.MouseEvent) => { @@ -290,10 +293,18 @@ export const ErrorRow = memo( {t("chat:errorDetails.title")} -
-
+							
+
 									{formattedErrorDetails}
 								
+ {usesProxy && ( +
+ + + {t("chat:errorDetails.proxyProvider")} + +
+ )}