Fix message too long when first received and make CRTL + enter work

This commit is contained in:
2024-08-05 09:10:04 +02:00
parent 41eba45872
commit f4b0945a5a
3 changed files with 6 additions and 3 deletions
+1 -1
View File
@@ -124,7 +124,7 @@
}
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
// Trigger the same action as the send button
document.getElementById('chat-input-send-btn').click();