diff --git a/src/modules/chatbot/components/conversation-box.vue b/src/modules/chatbot/components/conversation-box.vue
index 2d680cc..8b58fa0 100644
--- a/src/modules/chatbot/components/conversation-box.vue
+++ b/src/modules/chatbot/components/conversation-box.vue
@@ -1,9 +1,12 @@
diff --git a/src/modules/chatbot/services/messageService.ts b/src/modules/chatbot/services/messageService.ts
index 08d14b8..363a8fd 100644
--- a/src/modules/chatbot/services/messageService.ts
+++ b/src/modules/chatbot/services/messageService.ts
@@ -7,4 +7,9 @@ export const chatbotService = {
const response = await api.post("/chat/respond", { userInput });
return response.data as Message;
},
+
+ sendUlrContext: async (url: string): Promise => {
+ const response = await api.post("/chat/page-context", { url });
+ return response.data;
+ },
};
diff --git a/src/stores/message-store.ts b/src/stores/message-store.ts
index ef8a37c..98bea6b 100644
--- a/src/stores/message-store.ts
+++ b/src/stores/message-store.ts
@@ -5,14 +5,27 @@ import { ref } from "vue";
export const useChatStore = defineStore("chat", () => {
const messages = ref([]);
+ const hasShownInstructions = ref(false);
const sendMessage = async (userInput: string) => {
const reply = await chatbotService.getChatMessage(userInput);
return reply;
};
+ const showInstructionsOnce = () => {
+ if (!hasShownInstructions.value) {
+ messages.value.push({
+ text: "Welcome to your technical assistant.\nPlease provide the Client ID and \na description of the problem.",
+ sent: false,
+ isThinking: false,
+ });
+ hasShownInstructions.value = true;
+ }
+ };
+
return {
messages,
sendMessage,
+ showInstructionsOnce,
};
});