diff --git a/webview-ui/src/components/chat/ChatRow.tsx b/webview-ui/src/components/chat/ChatRow.tsx index 4fa921f443..d829f18353 100644 --- a/webview-ui/src/components/chat/ChatRow.tsx +++ b/webview-ui/src/components/chat/ChatRow.tsx @@ -118,6 +118,8 @@ export const ChatRowContent = ({ const [reasoningCollapsed, setReasoningCollapsed] = useState(true) const [isDiffErrorExpanded, setIsDiffErrorExpanded] = useState(false) const [showCopySuccess, setShowCopySuccess] = useState(false) + const [isErrorExpanded, setIsErrorExpanded] = useState(false) + const [showErrorCopySuccess, setShowErrorCopySuccess] = useState(false) const [isEditing, setIsEditing] = useState(false) const [editedContent, setEditedContent] = useState("") const [editMode, setEditMode] = useState(mode || "code") @@ -1132,15 +1134,96 @@ export const ChatRowContent = ({ ) case "error": return ( - <> - {title && ( -
- {icon} - {title} +
+
+
setIsErrorExpanded(!isErrorExpanded)}> +
+ + + {t("chat:error")} + +
+
+ { + e.stopPropagation() + + // Call copyWithFeedback and handle the Promise + copyWithFeedback(message.text || "").then((success) => { + if (success) { + // Show checkmark + setShowErrorCopySuccess(true) + + // Reset after a brief delay + setTimeout(() => { + setShowErrorCopySuccess(false) + }, 1000) + } + }) + }}> + + + +
- )} -

{message.text}

- + {isErrorExpanded && ( +
+

+ {message.text} +

+
+ )} +
+
) case "completion_result": return (