feat(user): add user data management system with global state

- Implement user store with Zustand for global state management
- Create UserDataProvider component to initialize user data on app load
- Add useUserData hook for accessing and managing user data
- Refactor knowledge base list page to use new hooks
This commit is contained in:
2025-10-11 17:18:40 +08:00
parent 6f0332c1ff
commit 836ee763e3
16 changed files with 1256 additions and 243 deletions

View File

@@ -1,5 +1,4 @@
import { RunningStatus } from '@/constants/knowledge';
import { TreeData } from '@antv/g6/lib/types';
import type { RunningStatus } from '@/constants/knowledge';
// knowledge base
export interface IKnowledge {
@@ -10,6 +9,7 @@ export interface IKnowledge {
created_by: string;
description: string;
doc_num: number;
language: string;
id: string;
name: string;
parser_config: ParserConfig;
@@ -164,5 +164,5 @@ export type IRenameTag = { fromTag: string; toTag: string };
export interface IKnowledgeGraph {
graph: Record<string, any>;
mind_map: TreeData;
// mind_map: TreeData;
}