Skip to content

Commit 3ad710e

Browse files
committed
Fix AI error message wrapping
1 parent d2e5a26 commit 3ad710e

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

components/ai/ChatMessageList.tsx

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -139,7 +139,9 @@ const ChatMessageList: React.FC<ChatMessageListProps> = ({ messages, isStreaming
139139
<div className="flex items-start gap-2 px-3 py-2 rounded-md bg-destructive/10 border border-destructive/20 text-sm">
140140
<AlertCircle className="h-4 w-4 text-destructive shrink-0 mt-0.5" />
141141
<div className="flex-1 min-w-0">
142-
<p className="text-destructive font-medium">{message.errorInfo.message}</p>
142+
<p className="text-destructive font-medium whitespace-pre-wrap break-words [overflow-wrap:anywhere]">
143+
{message.errorInfo.message}
144+
</p>
143145
{message.errorInfo.retryable && (
144146
<p className="text-muted-foreground text-xs mt-1">{t('ai.chat.retryHint')}</p>
145147
)}

0 commit comments

Comments
 (0)