ai-robot-core/docs/progress/ai-service-admin-progress.md

135 lines
4.2 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.

---
module: ai-service-admin
feature: ASA
status: in_progress
created: 2026-02-24
last_updated: 2026-02-24
---
# AI 中台管理界面ai-service-admin进度文档
## context
- **module**: ai-service-admin
- **feature**: ASA
- **status**: 🔄进行中
## spec_references
- requirements: "spec/ai-service-admin/requirements.md"
- design: "spec/ai-service-admin/design.md"
- tasks: "spec/ai-service-admin/tasks.md"
- openapi_admin: "spec/ai-service/openapi.admin.yaml"
## overall_progress
- [x] Phase 1: 基础建设 (100%) [P1-01 ~ P1-05]
- [x] Phase 2: 知识库管理 (100%) [P2-01 ~ P2-05]
- [ ] Phase 3: RAG 实验室 (0%) [P3-01 ~ P3-04]
- [ ] Phase 4: 会话监控与详情 (0%) [P4-01 ~ P4-03]
## current_phase
**goal**: 知识库管理模块开发,实现文档上传、列表展示与状态轮询
### sub_tasks
- [x] (P1-01) 初始化 `ai-service-admin` 前端工程Vue 3 + Element Plus + RuoYi-Vue 基座对齐),落地基础目录结构与路由骨架
- [x] (P1-02) 接入 Pinia实现 `tenant` store`currentTenantId`并持久化localStorage提供切换租户能力
- [x] (P1-03) Axios/SDK 请求层封装:创建统一 `request` 实例,自动注入必填 Header `X-Tenant-Id`
- [x] (P1-04) 全局异常拦截:实现 401/403 响应拦截策略
- [x] (P1-05) 基础组件封装:`BaseTable`、`BaseForm` 并给出示例页
- [x] (P2-01) 创建 `openapi.deps.yaml` 明确依赖契约 (L1) [AC-ASA-08]
- [x] (P2-02) 实现知识库列表 API 对接及分页展示 [AC-ASA-08]
- [x] (P2-03) 实现文档上传功能Multipart/form-data[AC-ASA-01]
- [x] (P2-04) 实现索引任务状态轮询机制3s 间隔)[AC-ASA-02]
- [x] (P2-05) 失败任务错误详情弹窗展示 [AC-ASA-02]
### next_action
**immediate**: 开始 Phase 3 RAG 实验室模块
**details**:
- file: "ai-service-admin/src/views/rag-lab/index.vue"
- action: "实现 RAG 实验调试界面支持参数配置、Query 提交及召回片段对比展示"
### next_action
**immediate**: 初始化 `ai-service-admin` 前端工程
**details**:
- file: "待创建 - 前端工程根目录"
- action: "创建 Vue 3 + Element Plus 项目骨架,对齐 RuoYi-Vue 基座,配置基础目录结构与路由骨架"
- reference: "spec/ai-service-admin/tasks.md:26-27"
**constraints**:
- 必须符合 AC-ASA-01 验收标准
- 需与 RuoYi-Vue-Plus 基座对齐(用户认证、权限校验及菜单框架)
## technical_context
### module_structure
```
ai-service-admin/ # 前端工程(待创建)
├── src/
│ ├── api/ # API 请求层
│ ├── components/ # 通用组件
│ ├── composables/ # Vue Composables
│ ├── router/ # 路由配置
│ ├── stores/ # Pinia stores
│ ├── views/ # 页面视图
│ └── utils/ # 工具函数
└── package.json
```
### key_decisions
| decision | reason | impact |
|----------|--------|--------|
| Vue 3 + Element Plus | 与 RuoYi-Vue-Plus 基座技术栈一致 | 复用基座组件与权限体系 |
| Pinia 状态管理 | Vue 3 官方推荐,替代 Vuex | 更简洁的 store 模式 |
| localStorage 持久化 | 租户切换需跨会话保持 | 无需后端 session 支持 |
### code_snippets
```typescript
// stores/tenant.ts (待实现)
export const useTenantStore = defineStore('tenant', {
state: () => ({
currentTenantId: localStorage.getItem('currentTenantId') || ''
}),
actions: {
setTenant(id: string) {
this.currentTenantId = id
localStorage.setItem('currentTenantId', id)
}
}
})
```
## session_history
- session: "Session #1 (2026-02-24)"
completed: []
changes: []
## startup_guide
1. **Step 1**: 读取本进度文档(了解当前位置与下一步)
2. **Step 2**: 读取 spec_references 中定义的模块规范(了解业务与接口约束)
3. **Step 3**: 直接执行 next_action - 初始化前端工程
---
## Phase 任务速查
| Phase | 名称 | 任务数 | 状态 |
|-------|------|--------|------|
| Phase 1 | 基础建设 | 5 | ⏳ 待开始 |
| Phase 2 | 知识库管理 | 5 | ⏳ 待开始 |
| Phase 3 | RAG 实验室 | 4 | ⏳ 待开始 |
| Phase 4 | 会话监控与详情 | 3 | ⏳ 待开始 |
**总计: 17 个任务**