refactor: 重构前端骨架,及admin模块子路由和懒加载

refactor: 优化多次请求,并使用pinia状态管理
This commit is contained in:
sophie committed 2026-06-03 10:30:16 +08:00
1 parent f877f61efd
commit 61693d014d
74 files changed
+9493 -6418

No files matched your search

@@ -0,0 +1,20 @@
import { defineStore } from 'pinia';
import { ref } from 'vue';
/**
* 聊天域共享状态骨架。Phase 2 迁移 ChatView 时会话列表、当前 agent 等迁入此处。
*/
export const useChatStore = defineStore('chat', () => {
const currentAgentId = ref<number | null>(null);
const sidebarCollapsed = ref(false);
const setCurrentAgentId = (agentId: number | null): void => {
currentAgentId.value = agentId;
};
return {
currentAgentId,
sidebarCollapsed,
setCurrentAgentId,
};
});