feat: implement knowledge move functionality
- Added API endpoints for moving knowledge items between knowledge bases, including validation for source and target compatibility. - Implemented asynchronous task handling for knowledge moves, tracking progress and status updates. - Introduced new localization strings for move-related UI elements in English, Korean, Russian, and Chinese. - Enhanced the frontend to support knowledge move operations, including target selection and progress monitoring. These changes significantly improve the application's capabilities for managing knowledge across different bases, providing users with a seamless experience in organizing their knowledge assets.
This commit is contained in:
@@ -45,6 +45,26 @@ export function copyKnowledgeBase(data: { source_id: string; target_id?: string
|
||||
return post(`/api/v1/knowledge-bases/copy`, data);
|
||||
}
|
||||
|
||||
// 获取可移动目标知识库列表(同类型、同Embedding模型)
|
||||
export function listMoveTargets(sourceKbId: string) {
|
||||
return get(`/api/v1/knowledge-bases/${sourceKbId}/move-targets`);
|
||||
}
|
||||
|
||||
// 移动知识到其他知识库
|
||||
export function moveKnowledge(data: {
|
||||
knowledge_ids: string[];
|
||||
source_kb_id: string;
|
||||
target_kb_id: string;
|
||||
mode: 'reuse_vectors' | 'reparse';
|
||||
}) {
|
||||
return post('/api/v1/knowledge/move', data);
|
||||
}
|
||||
|
||||
// 获取知识移动进度
|
||||
export function getKnowledgeMoveProgress(taskId: string) {
|
||||
return get(`/api/v1/knowledge/move/progress/${taskId}`);
|
||||
}
|
||||
|
||||
export function togglePinKnowledgeBase(id: string) {
|
||||
return put(`/api/v1/knowledge-bases/${id}/pin`);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user