Skip to content

Commit

Permalink
chore(ai): avoid line wrap in code response parts
Browse files Browse the repository at this point in the history
Line wrapping lead to cut off code. Instead, we now never wrap and show a horizontal bar. Moreover, this change ensures that mouse wheel events aren't caught be the code parts but always continue scrolling the chat view.
  • Loading branch information
planger committed Oct 30, 2024
1 parent fbcd368 commit 5723d52
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -176,7 +176,11 @@ export const CodeWrapper = (props: {
scrollBeyondLastColumn: 0,
renderFinalNewline: 'off',
maxHeight: -1,
scrollbar: { vertical: 'hidden' },
scrollbar: {
vertical: 'hidden',
alwaysConsumeMouseWheel: false
},
wordWrap: 'off',
codeLens: false,
inlayHints: { enabled: 'off' },
hover: { enabled: false }
Expand Down
1 change: 1 addition & 0 deletions packages/ai-chat-ui/src/browser/style/index.css
Original file line number Diff line number Diff line change
Expand Up @@ -125,6 +125,7 @@ div:last-child > .theia-ChatNode {

.theia-ChatNode .theia-CodeWrapper {
padding: 0.5em;
padding-bottom: 0;
background-color: var(--theia-editor-background);
border-radius: 6px;
border: var(--theia-border-width) solid var(--theia-checkbox-border);
Expand Down

0 comments on commit 5723d52

Please sign in to comment.