1
0
mirror of https://github.com/Unleash/unleash.git synced 2025-02-09 00:18:00 +01:00

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

<img width="451" alt="image"
src="https://github.com/user-attachments/assets/43023206-f6e9-48ef-bd22-cc0c0fe04668">

### After

<img width="404" alt="image"
src="https://github.com/user-attachments/assets/2f0bad32-8d40-4edd-bdbb-df0eb9ffb977">
This commit is contained in:
Nuno Góis 2024-10-15 15:43:01 +01:00 committed by GitHub
parent 7fb9308b3e
commit 8d4e84d6eb
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -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 }) => ({