File tree Expand file tree Collapse file tree 1 file changed +8
-18
lines changed Expand file tree Collapse file tree 1 file changed +8
-18
lines changed Original file line number Diff line number Diff line change 168
168
169
169
.input-box textarea {
170
170
margin-bottom : 1px ;
171
- overflow-y : hidden
171
+ }
172
+
173
+ .input-box textarea ::-webkit-scrollbar {
174
+ display : none;
175
+
172
176
}
173
177
174
178
.input-icon {
@@ -1724,22 +1728,8 @@ <h5 class="font-weight-bold mb-4">MCP</h5>
1724
1728
this . images = [ ] ;
1725
1729
} ,
1726
1730
handleKeydown ( e ) {
1727
- if ( e . key === "Enter" && ( e . altKey || e . shiftKey || e . ctrlKey ) ) {
1728
- // Alt/Shift + Enter, insert a \n
1729
- e . preventDefault ( ) ;
1730
- const textarea = e . target ;
1731
- // Get the current cursor position
1732
- const start = textarea . selectionEnd ;
1733
-
1734
- // Insert '\n' at the current cursor position
1735
- const textBefore = this . userMessage . substring ( 0 , start ) ;
1736
- const textAfter = this . userMessage . substring ( start ) ;
1737
- this . userMessage = textBefore + '\n' + textAfter ;
1738
- setTimeout ( ( ) => {
1739
- // Set the cursor position after the inserted '\n'
1740
- textarea . selectionStart = start + 1 ; // Move the cursor to the position after the newline
1741
- textarea . selectionEnd = start + 1 ;
1742
- } , 0 ) ;
1731
+ if ( e . key === "Enter" && e . shiftKey ) {
1732
+ // A new line by default
1743
1733
} else if ( e . key === "Enter" ) {
1744
1734
// Only Enter is pressed, send message
1745
1735
e . preventDefault ( ) ;
@@ -2660,4 +2650,4 @@ <h5 class="font-weight-bold mb-4">MCP</h5>
2660
2650
</ script >
2661
2651
</ body >
2662
2652
2663
- </ html >
2653
+ </ html >
You can’t perform that action at this time.
0 commit comments