init assistant

This commit is contained in:
Chuck1sn
2025-05-31 16:08:40 +08:00
parent a5108057ee
commit eec1039b1e
3 changed files with 402 additions and 3 deletions

View File

@@ -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({