Skip to content
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

feat(ui): enable wrap long lines in code block #3146

Merged
merged 9 commits into from
Sep 19, 2024

Conversation

liangfung
Copy link
Collaborator

@liangfung liangfung commented Sep 14, 2024

Change

Add a button to enable/disable line wrapping after stream completion.

Screen record

https://jam.dev/c/4860fbc8-1c85-48e6-8fe3-b3fa1919201a

@liangfung liangfung marked this pull request as ready for review September 14, 2024 08:31
@liangfung liangfung requested a review from wsxiaoys September 14, 2024 08:31
@wsxiaoys
Copy link
Member

Use https://lucide.dev/icons/wrap-text / https://lucide.dev/icons/align-justify for toggling line wrapping

@liangfung liangfung force-pushed the feat-ui-code-block-line-wrap branch from 083ef3e to 15b2699 Compare September 18, 2024 03:08
@@ -1135,6 +1136,7 @@ function AnswerBlock({
onCodeCitationMouseLeave={onCodeCitationMouseLeave}
contextInfo={contextInfo}
fetchingContextInfo={fetchingContextInfo}
canWrapLongLines={isLoading}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

should be !isLoading?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done

@wsxiaoys wsxiaoys enabled auto-merge (squash) September 19, 2024 01:34
@wsxiaoys wsxiaoys merged commit f32811b into main Sep 19, 2024
4 checks passed
@wsxiaoys wsxiaoys deleted the feat-ui-code-block-line-wrap branch September 19, 2024 01:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants