{{ $t('nav_bar.logout') }}
diff --git a/src/modules/chatbot/components/conversation-box.vue b/src/modules/chatbot/components/conversation-box.vue
index 8b58fa0..a5a871d 100644
--- a/src/modules/chatbot/components/conversation-box.vue
+++ b/src/modules/chatbot/components/conversation-box.vue
@@ -26,7 +26,6 @@ const onDrag = (e: MouseEvent) => {
const stopDrag = () => {
dragging = false
}
-
window.addEventListener('mousemove', onDrag)
window.addEventListener('mouseup', stopDrag)
@@ -40,7 +39,6 @@ onMounted(() => {
chatStore.showInstructionsOnce();
})
-
const handleSend = async () => {
const userMessage = text.value.trim();
if (!userMessage) return
@@ -83,7 +81,7 @@ const handleSend = async () => {
throw error;
}
};
-//---------------------------------------------
+
// Block to handle sending the url to n8n as context
const route = useRoute()
const sendUlr = chatbotService.sendUlrContext;
@@ -110,7 +108,7 @@ watch(
+ >{{ $t('chatbot.chat_header') }}
@@ -125,7 +123,7 @@ watch(
{
v-if="!msg.isThinking"
:text="msg.text"
:sent="msg.sent"
- :name="msg.sent ? currentUser.firstName : 'AI Assistant'"
+ :name="msg.sent ? currentUser.firstName :
+ $t('chatbot.chat_header')"
:class="['chat-message', msg.sent ? 'user' : 'ai']"
/>
diff --git a/src/stores/message-store.ts b/src/stores/message-store.ts
index 98bea6b..179854f 100644
--- a/src/stores/message-store.ts
+++ b/src/stores/message-store.ts
@@ -2,10 +2,12 @@ import type { Message } from "src/modules/chatbot/types/dialogue-message";
import { defineStore } from "pinia";
import { chatbotService } from "src/modules/chatbot/services/messageService";
import { ref } from "vue";
+import { useI18n } from "vue-i18n";
export const useChatStore = defineStore("chat", () => {
const messages = ref([]);
const hasShownInstructions = ref(false);
+ const { t } = useI18n();
const sendMessage = async (userInput: string) => {
const reply = await chatbotService.getChatMessage(userInput);
@@ -15,7 +17,7 @@ export const useChatStore = defineStore("chat", () => {
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.",
+ text: t("chatbot.chat_initial_message"),
sent: false,
isThinking: false,
});