From aa3bc3d64d593bc9a9f7fd7b3a09434c341e8b11 Mon Sep 17 00:00:00 2001 From: Lion Arar Date: Tue, 7 Oct 2025 14:16:17 -0400 Subject: [PATCH] style: minor input changes --- src/modules/chatbot/components/conversation-box.vue | 11 ++--------- src/modules/chatbot/components/dialogue-phrase.vue | 2 +- 2 files changed, 3 insertions(+), 10 deletions(-) diff --git a/src/modules/chatbot/components/conversation-box.vue b/src/modules/chatbot/components/conversation-box.vue index 63c5b06..2d680cc 100644 --- a/src/modules/chatbot/components/conversation-box.vue +++ b/src/modules/chatbot/components/conversation-box.vue @@ -33,8 +33,8 @@ const text = ref(''); const { messages } = useChatStore(); const { sendMessage } = useChatApi(); const handleSend = async () => { - if (!text.value.trim()) return; - const userMessage = text.value; + const userMessage = text.value.trim(); + if (!userMessage) return text.value = ''; messages.push({ @@ -123,18 +123,11 @@ const handleSend = async () => { position: absolute; top: 0; left: 0; - /* attach to the left edge of the drawer */ width: 8px; - /* sensitive area for hover */ height: 100%; - /* full height of the drawer */ cursor: ew-resize; - /* horizontal resize cursor */ z-index: 1000; - /* make sure it's above other content */ - /* optional: visual feedback */ background-color: rgba(0, 0, 0, 0); - /* invisible but hoverable */ } .line-separator { diff --git a/src/modules/chatbot/components/dialogue-phrase.vue b/src/modules/chatbot/components/dialogue-phrase.vue index 76423dc..042117f 100644 --- a/src/modules/chatbot/components/dialogue-phrase.vue +++ b/src/modules/chatbot/components/dialogue-phrase.vue @@ -17,7 +17,7 @@ const md = new MarkdownIt({ // Removes all the h1,h2,h3 to make the Md more user friendly const cleanMarkdown = (markdown: string): string => { if (!markdown) return '' - return markdown.replace(/^#{1,3}\s.*$/gm, '') + return markdown.replace(/^#{1,3}\s(.*)$/gm, '#### $1') } // Compute parsed content