diff --git a/frontend/src/components/Assistant.vue b/frontend/src/components/Assistant.vue new file mode 100644 index 0000000..7a9e7ed --- /dev/null +++ b/frontend/src/components/Assistant.vue @@ -0,0 +1,396 @@ + + + + + diff --git a/frontend/src/components/Dashboard.vue b/frontend/src/components/Dashboard.vue index 27eb04c..0334406 100644 --- a/frontend/src/components/Dashboard.vue +++ b/frontend/src/components/Dashboard.vue @@ -2,13 +2,17 @@ import { RouterView } from "vue-router"; import Headbar from "./Headbar.vue"; import Sidebar from "./Sidebar.vue"; +import Assistant from "./Assistant.vue"; diff --git a/frontend/src/composables/ai/useAiChat.ts b/frontend/src/composables/ai/useAiChat.ts index f9092f9..2eb97a5 100644 --- a/frontend/src/composables/ai/useAiChat.ts +++ b/frontend/src/composables/ai/useAiChat.ts @@ -3,8 +3,6 @@ import { ref } from "vue"; import client from "../../api/client"; import useAuthStore from "../store/useAuthStore"; -const authStore = useAuthStore(); - export const useAiChat = () => { const messages = ref< { @@ -21,6 +19,7 @@ export const useAiChat = () => { const chat = async (message: string) => { isLoading.value = true; + const authStore = useAuthStore(); const ctrl = new AbortController(); currentController = ctrl; messages.value.push({