-
Notifications
You must be signed in to change notification settings - Fork 2.8k
Long words in assistant chat responses now wrap properly #5707
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Long words in assistant chat responses now wrap properly #5707
Conversation
✅ Deploy Preview for continuedev canceled.
|
All contributors have signed the CLA ✍️ ✅ |
I have read the CLA Document and I hereby sign the CLA |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice fix to implement the expected word wrap behavior for long non-"breakable" words in chat
@ryanjwilson9 just to confirm, this doesn't cause code to wrap? |
@RomneyDa currently it does wrap code. But I also wrote something up to not wrap code. Not sure what you prefer. Wrap text, not code: |
The expected behavior should be
|
Description
Previously, very long unbroken words in assistant responses would overflow their container or get cut off, especially on smaller screens.
This was due to markdown-rendered content (via StyledMarkdown) not propagating word-break and overflow-wrap to deeply nested elements
This change:
Only added a global * { word-break: break-word; overflow-wrap: break-word; } rule inside StyledMarkdown
-> gui/src/components/StyledMarkdownPreview/index.tsx
An explicit white-space: pre-wrap rule for p, span, and div
These changes ensure all markdown-rendered assistant responses wrap gracefully, even with unusually long tokens.
Checklist
Screenshots
None
Summary by mrge
Long unbroken words in assistant chat responses now wrap correctly, preventing overflow and cut-off on all screen sizes.