diff --git a/packages/ui/src/components/chat/ChatMessage.tsx b/packages/ui/src/components/chat/ChatMessage.tsx index 3fe0ef62..9b39eb34 100644 --- a/packages/ui/src/components/chat/ChatMessage.tsx +++ b/packages/ui/src/components/chat/ChatMessage.tsx @@ -705,30 +705,25 @@ const ChatMessage: React.FC = ({ } if (errorName === 'SessionRetry') { return { - text: `Opencode failed to send a message. Retry attempt info: \n\`${detail}\``, - variant: 'info' as const, + text: `Opencode failed to send a message. Retry attempt info: ${detail}`, }; } if (isLikelyProviderAuthFailure(detail)) { return { text: PROVIDER_AUTH_FAILURE_MESSAGE, - variant: 'error' as const, }; } if (detail.trim().toLowerCase() === 'aborted') { return { text: 'The running turn was stopped before OpenCode could send the next message.', - variant: 'info' as const, }; } return { - text: `Opencode failed to send message with error:\n\`${detail}\``, - variant: 'error' as const, + text: `Opencode failed to send message with error: ${detail}`, }; }, [isUser, message.info]); const assistantErrorText = assistantError?.text; - const assistantErrorVariant = assistantError?.variant; const messageTextContent = React.useMemo(() => { if (isUser) { @@ -1089,7 +1084,6 @@ const ChatMessage: React.FC = ({ contextPinPending={pinPending} onToggleContextPin={canPinIntoContext && messageCreatedAt ? handleToggleContextPin : undefined} errorMessage={assistantErrorText} - errorVariant={assistantErrorVariant} userActionsMode={useExternalUserActionsRow ? 'external-content' : 'inline'} stickyUserHeaderEnabled={stickyUserHeader} /> @@ -1126,7 +1120,6 @@ const ChatMessage: React.FC = ({ contextPinPending={pinPending} onToggleContextPin={canPinIntoContext && messageCreatedAt ? handleToggleContextPin : undefined} errorMessage={assistantErrorText} - errorVariant={assistantErrorVariant} userActionsMode="external-actions" stickyUserHeaderEnabled={stickyUserHeader} /> @@ -1169,7 +1162,6 @@ const ChatMessage: React.FC = ({ agentMention={agentMention} turnGroupingContext={turnGroupingContext} errorMessage={assistantErrorText} - errorVariant={assistantErrorVariant} reviewTransferDirection={reviewTransferDirection} footerProviderID={headerProviderID} footerModelName={headerModelName} diff --git a/packages/ui/src/components/chat/message/MessageBody.tsx b/packages/ui/src/components/chat/message/MessageBody.tsx index dc870847..9def5286 100644 --- a/packages/ui/src/components/chat/message/MessageBody.tsx +++ b/packages/ui/src/components/chat/message/MessageBody.tsx @@ -432,7 +432,6 @@ interface MessageBodyProps { onRevert?: () => void; onFork?: () => void; errorMessage?: string; - errorVariant?: 'error' | 'info'; userActionsMode?: 'inline' | 'external-content' | 'external-actions'; stickyUserHeaderEnabled?: boolean; reviewTransferDirection?: ReviewTransferDirection | null; @@ -1094,7 +1093,6 @@ const AssistantMessageBody = React.memo(({ showReasoningTraces = false, turnGroupingContext, errorMessage, - errorVariant = 'error', reviewTransferDirection = null, contextPinned, contextPinPending, @@ -1704,7 +1702,6 @@ const AssistantMessageBody = React.memo(({ const shouldDeferSortedInlineText = isSortedRenderMode && !hasStopFinish; const showErrorMessage = Boolean(errorMessage); - const errorIconName = errorVariant === 'info' ? 'information' : 'error-warning'; const isPeekSurface = chatSurfaceMode === 'peek'; const shouldShowMessageActions = hasCopyableText && !isPeekSurface; const shouldShowTurnFooter = isLastAssistantInTurn && hasTextContent && (hasStopFinish || Boolean(errorMessage)) && !isPeekSurface; @@ -2217,17 +2214,9 @@ const AssistantMessageBody = React.memo(({ {renderedParts} {showErrorMessage && ( -
-
- +
+
+