feat(knowledgeBase): add knowledge graph rebuild and delete functionality

- Add deleteKnowledgeGraph and rebuildKnowledgeGraph API endpoints to knowledgeBase.ts
- Add internationalization strings for rebuild confirmation dialog and success/failure messages in both English and Chinese
- Implement rebuild mode logic in CreateModal component with confirmation dialog before rebuilding
- Add originalType state tracking to distinguish between rebuild and regular edit modes
- Update handleSave to trigger graph deletion and rebuild when in rebuild mode with graphrag enabled
- Add handleDeleteGraph method to delete existing knowledge graph data before rebuild
- Update performSave to use correct type value during save operation in rebuild mode
- Enhance Private.tsx to refresh knowledge base details after table data refresh
- Import new API functions (deleteKnowledgeGraph, rebuildKnowledgeGraph) in CreateModal
- Update KnowledgeGraphCard component timestamp in file header
This commit is contained in:
yujiangping
2026-01-06 11:22:11 +08:00
parent 43dd31d0c9
commit 5a5c5e5bf4
6 changed files with 81 additions and 8 deletions

View File

@@ -657,6 +657,7 @@ const Private: FC = () => {
const handleRefreshTable = () => {
// 刷新表格数据
fetchKnowledgeBaseDetail(knowledgeBase.id)
tableRef.current?.loadData();
}
return (