feat: 重构知识库文档导入任务化流程

- 新增上传建单、异步解析、分块处理与异步向量化闭环

- 收口分享页权限、完成态检索过滤与 SSE 局部状态刷新
This commit is contained in:
2026-04-15 19:27:22 +08:00
parent a41b50959e
commit 2689adfa40
56 changed files with 6376 additions and 1060 deletions

View File

@@ -129,16 +129,37 @@ const endpointDocs = computed(() => {
},
{
method: 'POST',
path: '/document/import/commit',
hint: '导入文档',
path: '/document/import/task/create',
hint: '创建导入任务',
params: [
{ name: 'knowledgeId', location: 'body', required: true },
{
name: 'previewSessionIds',
name: 'fileName',
location: 'body',
required: true,
note: '预览接口返回的会话 ID 数组',
note: '文件名',
},
{ name: 'filePath', location: 'body', required: true, note: '上传后的文件路径' },
],
},
{
method: 'POST',
path: '/document/import/task/preview',
hint: '生成分块预览',
params: [
{ name: 'knowledgeId', location: 'body', required: true },
{ name: 'documentId', location: 'body', required: true },
{ name: 'files[0].strategyConfig', location: 'body', note: '拆分策略配置' },
],
},
{
method: 'POST',
path: '/document/import/task/startIndex',
hint: '启动向量化',
params: [
{ name: 'knowledgeId', location: 'body', required: true },
{ name: 'documentId', location: 'body', required: true },
{ name: 'previewSessionId', location: 'body', note: '预览接口返回的会话 ID' },
],
},
];