From 4aeafb10877236816b62e9c20a074192ebcb8217 Mon Sep 17 00:00:00 2001 From: Lion Arar Date: Wed, 1 Oct 2025 14:10:34 -0400 Subject: [PATCH] fix: fixed the chatbox server side communication --- .../chatbot/components/conversation-box.vue | 24 +++++++++---- .../chatbot/components/dialogue-content.vue | 7 +++- src/modules/chatbot/composables/chat-api.ts | 5 ++- .../chatbot/services/messageService.ts | 10 +++--- src/stores/message-store.ts | 34 ++++++++----------- 5 files changed, 46 insertions(+), 34 deletions(-) diff --git a/src/modules/chatbot/components/conversation-box.vue b/src/modules/chatbot/components/conversation-box.vue index 74b7387..9e3181e 100644 --- a/src/modules/chatbot/components/conversation-box.vue +++ b/src/modules/chatbot/components/conversation-box.vue @@ -2,11 +2,11 @@ import { isChatVisible } from "src/stores/dialogue-box"; import DialogueContent from "./dialogue-content.vue"; import { ref } from "vue"; -import type { Message } from "../types/dialogue-message"; import { useChatApi } from "../composables/chat-api"; +import { useChatStore } from "src/stores/message-store"; const text = ref(''); -const messages = ref([]); +const { messages } = useChatStore(); const { sendMessage } = useChatApi(); const handleSend = async () => { @@ -19,14 +19,26 @@ const handleSend = async () => {