Skip to content
This repository was archived by the owner on May 15, 2026. It is now read-only.

Commit ad3e2ac

Browse files
committed
More prominent details CTA for errors
1 parent 3251ac2 commit ad3e2ac

19 files changed

Lines changed: 28 additions & 15 deletions

File tree

webview-ui/src/components/chat/ErrorRow.tsx

Lines changed: 10 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
import React, { useState, useCallback, memo, useMemo } from "react"
22
import { useTranslation } from "react-i18next"
33
import { VSCodeButton } from "@vscode/webview-ui-toolkit/react"
4-
import { BookOpenText, MessageCircleWarning, Info, Copy, Check } from "lucide-react"
4+
import { BookOpenText, MessageCircleWarning, Copy, Check } from "lucide-react"
55
import { useCopyToClipboard } from "@src/utils/clipboard"
66
import { vscode } from "@src/utils/vscode"
77
import CodeBlock from "../common/CodeBlock"
88
import { Dialog, DialogContent, DialogHeader, DialogTitle, DialogFooter } from "@src/components/ui/dialog"
9-
import { Button, Tooltip, TooltipContent, TooltipTrigger } from "../ui"
9+
import { Button } from "../ui"
1010
import { useExtensionState } from "@src/context/ExtensionStateContext"
1111
import { useSelectedModel } from "@src/components/ui/hooks/useSelectedModel"
1212

@@ -242,19 +242,6 @@ export const ErrorRow = memo(
242242
: t("chat:apiRequest.errorMessage.docs")}
243243
</a>
244244
)}
245-
{formattedErrorDetails && (
246-
<Tooltip>
247-
<TooltipTrigger asChild>
248-
<button
249-
onClick={() => setIsDetailsDialogOpen(true)}
250-
className="transition-opacity opacity-30 group-hover:opacity-100 cursor-pointer"
251-
aria-label={t("chat:errorDetails.title")}>
252-
<Info className="size-4" />
253-
</button>
254-
</TooltipTrigger>
255-
<TooltipContent>{t("chat:errorDetails.title")}</TooltipContent>
256-
</Tooltip>
257-
)}
258245
</div>
259246
</div>
260247
)}
@@ -265,6 +252,14 @@ export const ErrorRow = memo(
265252
"my-0 font-light whitespace-pre-wrap break-words text-vscode-descriptionForeground"
266253
}>
267254
{message}
255+
{formattedErrorDetails && (
256+
<button
257+
onClick={() => setIsDetailsDialogOpen(true)}
258+
className="cursor-pointer ml-1 text-vscode-descriptionForeground/50 hover:text-vscode-descriptionForeground hover:underline font-normal"
259+
aria-label={t("chat:errorDetails.title")}>
260+
{t("chat:errorDetails.link")}
261+
</button>
262+
)}
268263
</p>
269264
{additionalContent}
270265
</div>

webview-ui/src/i18n/locales/ca/chat.json

Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

webview-ui/src/i18n/locales/de/chat.json

Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

webview-ui/src/i18n/locales/en/chat.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -291,6 +291,7 @@
291291
"noToolsUsedDetails": "The model provided text/reasoning but did not call any of the required tools. This usually indicates the model misunderstood the task or is having difficulty determining which tool to use. The model has been automatically prompted to retry with proper tool usage."
292292
},
293293
"errorDetails": {
294+
"link": "Details",
294295
"title": "Error Details",
295296
"copyToClipboard": "Copy to Clipboard",
296297
"copied": "Copied!"

webview-ui/src/i18n/locales/es/chat.json

Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

webview-ui/src/i18n/locales/fr/chat.json

Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

webview-ui/src/i18n/locales/hi/chat.json

Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

webview-ui/src/i18n/locales/id/chat.json

Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

webview-ui/src/i18n/locales/it/chat.json

Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

webview-ui/src/i18n/locales/ja/chat.json

Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)