diff --git a/frontend/src/App.vue b/frontend/src/App.vue index 08eee90..498065f 100644 --- a/frontend/src/App.vue +++ b/frontend/src/App.vue @@ -3,12 +3,19 @@ import Chat from "./components/Chat.vue"; import Toast from "primevue/toast"; import {useToast} from "primevue/usetoast"; -import {onMounted, provide, ref} from "vue"; +import {onMounted, provide, reactive, ref} from "vue"; import {GetStatus} from "../wailsjs/go/main/App"; import {WindowGetPosition, WindowSetPosition, WindowSetSize} from "../wailsjs/runtime"; +import {types} from "../wailsjs/go/models"; +import Message = types.Message; const toast = useToast() const isShrink = ref(false) +const helpMsg = ref('/help: 显示帮助信息\n/clear: 清除历史信息\n/loadconf: 重新加载配置文件\n/opconf: 打开配置文件夹\n' + + '/quit: 退出应用') +const msgList = reactive([{content: '欢迎使用Ai-Gui,用法介绍如下', userType: 'user', id: 'tool'}, + {content: helpMsg.value, userType: 'assistant', id: 'tool'}]) + const showInfoToast = (msg:string,summary:string = 'info',duration:number = 3000) => { toast.add({ severity: 'info', summary: summary, detail: msg, life: duration }); } @@ -40,7 +47,7 @@ onMounted(() => {