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