From 8d4e84d6ebd4d0f2e8b341b953d813c552878bf0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nuno=20G=C3=B3is?= Date: Tue, 15 Oct 2024 15:43:01 +0100 Subject: [PATCH] fix: unleash AI chat message code not breaking to new line (#8455) https://linear.app/unleash/issue/2-2841/fix-a-bug-where-code-does-not-break-to-new-lines-in-messages Fixes a bug where code in an Unleash AI chat message would not break to new lines. ### Before image ### After image --- frontend/src/component/ai/AIChatMessage.tsx | 3 +++ 1 file changed, 3 insertions(+) diff --git a/frontend/src/component/ai/AIChatMessage.tsx b/frontend/src/component/ai/AIChatMessage.tsx index d6286a721a84..868e6fedc150 100644 --- a/frontend/src/component/ai/AIChatMessage.tsx +++ b/frontend/src/component/ai/AIChatMessage.tsx @@ -43,6 +43,9 @@ const StyledAIMessage = styled('div')(({ theme }) => ({ borderWidth: '5px', borderColor: `transparent ${theme.palette.secondary.border} transparent transparent`, }, + pre: { + whiteSpace: 'pre-wrap', + }, })); const StyledUserMessage = styled(StyledAIMessage)(({ theme }) => ({