Fix message too long when first received and make CRTL + enter work
This commit is contained in:
parent
41eba45872
commit
f4b0945a5a
5
TODO.md
5
TODO.md
@ -1,9 +1,10 @@
|
|||||||
# Bugs
|
# Bugs
|
||||||
[ ] The SSE event that sometime fails
|
[ ] The SSE event that sometime fails after some times. Reconnect when sending a new message.
|
||||||
[X] 2 selected messages
|
[X] 2 selected messages
|
||||||
[ ] On first response, code block width are too long
|
[X] On first response, code block width are too long
|
||||||
[X] Change Terms of service to say that I use one cookie
|
[X] Change Terms of service to say that I use one cookie
|
||||||
[X] Change the lastSelectedLLMs, 2 users can't use the same time...
|
[X] Change the lastSelectedLLMs, 2 users can't use the same time...
|
||||||
|
[X] CTRL + Enter not working
|
||||||
|
|
||||||
# Features
|
# Features
|
||||||
[X] Add max tokens
|
[X] Add max tokens
|
||||||
|
@ -124,7 +124,7 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
function handleTextareaKeydown(event) {
|
function handleTextareaKeydown(event) {
|
||||||
if (event.metaKey && event.key === 'Enter' && event.target === textarea && textarea.value.trim() !== '' && document.getElementsByClassName('selected icon-llm').length !== 0) {
|
if ((event.ctrlKey || event.metaKey) && event.key === 'Enter' && event.target === textarea && textarea.value.trim() !== '' && document.getElementsByClassName('selected icon-llm').length !== 0) {
|
||||||
// Check if the cursor is in the textarea
|
// Check if the cursor is in the textarea
|
||||||
// Trigger the same action as the send button
|
// Trigger the same action as the send button
|
||||||
document.getElementById('chat-input-send-btn').click();
|
document.getElementById('chat-input-send-btn').click();
|
||||||
|
@ -82,6 +82,8 @@
|
|||||||
<div class="is-flex is-align-items-start">
|
<div class="is-flex is-align-items-start">
|
||||||
<div class="message-content"
|
<div class="message-content"
|
||||||
id="content-{{ ConversationAreaId }}"
|
id="content-{{ ConversationAreaId }}"
|
||||||
|
style="width: 100%;
|
||||||
|
overflow-y: hidden"
|
||||||
sse-swap="swapContent-{{ ConversationAreaId }}">
|
sse-swap="swapContent-{{ ConversationAreaId }}">
|
||||||
<hx hx-trigger="load" hx-get="/generateMultipleMessages" id="generate-multiple-messages"></hx>
|
<hx hx-trigger="load" hx-get="/generateMultipleMessages" id="generate-multiple-messages"></hx>
|
||||||
<div class='message-header'>
|
<div class='message-header'>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user