Skip to content

Commit

Permalink
fix: unleash AI chat message code not breaking to new line (#8455)
Browse files Browse the repository at this point in the history
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">
  • Loading branch information
nunogois authored Oct 15, 2024
1 parent 7fb9308 commit 8d4e84d
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions frontend/src/component/ai/AIChatMessage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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 }) => ({
Expand Down

0 comments on commit 8d4e84d

Please sign in to comment.