Files
common_agent/docs/前端实现文档/2.知识资产与文件解析模块前端实现.md

47 lines
1.3 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# 知识资产与文件解析模块前端实现
## 1. 页面
| 页面 | 职责 |
|------|------|
| `KnowledgeWorkspacePage.vue` | 展示知识库列表、配置、文档状态和发布影响 |
| `IngestionPipelinePage.vue` | 展示上传、解析、切片、向量化和任务日志 |
| 旧 `RagStoresPage.vue` | 保留知识库 CRUD 联调参考 |
| 旧 `RagDocumentsPage.vue` | 保留知识文档 CRUD 联调参考 |
## 2. 聚合 ViewModel
知识工作台建议使用 `KnowledgeWorkspaceView`
- 当前知识库基础信息。
- 文档健康度。
- Embedding 模型和维度。
- 检索配置。
- 文档列表摘要。
- 待处理任务。
- 发布影响说明。
文件解析管道建议使用 `IngestionRunView`
- 上传文件列表。
- 管道阶段状态。
- 解析文本预览。
- 切片预览。
- 任务日志。
## 3. 接口草案
- `GET /api/knowledge/workspaces/{storeId}`
- `POST /api/knowledge/ingestion-runs`
- `GET /api/knowledge/ingestion-runs/{runId}`
- `POST /api/rag/documents/parse`
- `POST /api/rag/documents/chunk`
## 4. 交互状态
- 解析失败显示可重试状态。
- 索引中显示进行中状态,不允许误标为可检索。
- 切片参数变更后提示需要重建索引。
- Embedding 模型变更后提示会影响当前知识库向量空间。