feat: chat首页渲染优化

This commit is contained in:
rd
2025-08-25 18:01:04 +08:00
parent 13670acc9a
commit 6926a43d8a
14 changed files with 544 additions and 343 deletions

View File

@ -1,5 +1,6 @@
import { defineStore } from 'pinia';
import { createSession } from '@/api/all/chat';
import { createSession, getAgentInfo } from '@/api/all/chat';
import { handleUserHome } from '@/utils/user';
interface ChatState {
@ -24,6 +25,12 @@ export const useChatStore = defineStore('chat', {
clearSearchValue() {
this.searchValue = '';
},
async getAgentInfo() {
const { code, data } = await getAgentInfo();
if (code === 200) {
this.setAgentInfo(data);
}
},
setAgentInfo(agentInfo: agentInfo) {
this.agentInfo = agentInfo;
},