From 64c7f34f41eb2089b72333fff87b8a86e4ff5119 Mon Sep 17 00:00:00 2001 From: Lion Arar Date: Fri, 26 Sep 2025 11:26:40 -0400 Subject: [PATCH] feat: fixed the @keydown.enter function so that it actually works, previously it would not work properly --- src/modules/chatbot/components/conversation-box.vue | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/src/modules/chatbot/components/conversation-box.vue b/src/modules/chatbot/components/conversation-box.vue index d64332d..4e45e65 100644 --- a/src/modules/chatbot/components/conversation-box.vue +++ b/src/modules/chatbot/components/conversation-box.vue @@ -26,6 +26,15 @@ const sendMessage = async () => { text.value = ''; } + +const handleEnter = async (e: KeyboardEvent) => { + if (e.shiftKey) { + text.value += '\n'; + } else { + e.preventDefault(); + await sendMessage(); + } +};