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:
@@ -726,6 +726,11 @@ export const en = {
|
||||
graphTips: 'Explore the entity nodes in the knowledge base and their relationship networks',
|
||||
sourceDocuments: 'Source Documents',
|
||||
rebuildGraph: 'Rebuild Graph',
|
||||
rebuildConfirmTitle: 'Confirm the rebuild graph',
|
||||
rebuildConfirmContent: 'The rebuild graph will erase the existing map data and rebuild it from scratch. This operation is irreversible. Are you sure you want to proceed?',
|
||||
deleteGraphSuccess: 'Knowledge graph deletion successful',
|
||||
deleteGraphFailed:'Knowledge graph deletion failed',
|
||||
graphEmpty: 'At the foot of the mountain of books, the journey begins.',
|
||||
createForm:{
|
||||
name: 'Name',
|
||||
embedding_id: 'Embedding',
|
||||
|
||||
@@ -336,6 +336,11 @@ export const zh = {
|
||||
graphTitle: '知识图谱:实体、关系与属性的关联网络',
|
||||
graphTips: '探索知识库中的实体节点及其关系脉络',
|
||||
rebuildGraph: '重建图谱',
|
||||
rebuildConfirmTitle: '确认重建图谱',
|
||||
rebuildConfirmContent: '重建图谱将清除现有的图谱数据并重新构建,此操作不可逆。确定要继续吗?',
|
||||
deleteGraphSuccess: '删除知识图谱成功',
|
||||
deleteGraphFailed:'删除知识图谱失败',
|
||||
graphEmpty: '书山有路,此处为始',
|
||||
createForm: {
|
||||
name: '名称',
|
||||
embedding_id: '嵌入模型',
|
||||
|
||||
Reference in New Issue
Block a user