Permet l'ajout de nouvelles lignes dans le message

This commit is contained in:
Sylvain Philip 2024-09-10 09:22:54 +02:00
parent 0e5aff407d
commit c12f9c9639

View File

@ -169,6 +169,12 @@
} }
function handleChatInputKey(event) { function handleChatInputKey(event) {
if (event.key === 'Enter' && event.shiftKey) {
// Allow the default behavior of adding a new line
return;
}
if (event.key === 'Enter') { if (event.key === 'Enter') {
sendMessage(chatInput.value); sendMessage(chatInput.value);
} }