feat(aia): Complete AIA V2.0 with universal streaming capabilities
Major Changes: - Add StreamingService with OpenAI Compatible format - Upgrade Chat component V2 with Ant Design X integration - Implement AIA module with 12 intelligent agents - Update API routes to unified /api/v1 prefix - Update system documentation Backend (~1300 lines): - common/streaming: OpenAI Compatible adapter - modules/aia: 12 agents, conversation service, streaming integration - Update route versions (RVW, PKB to v1) Frontend (~3500 lines): - modules/aia: AgentHub + ChatWorkspace (100% prototype restoration) - shared/Chat: AIStreamChat, ThinkingBlock, useAIStream Hook - Update API endpoints to v1 Documentation: - AIA module status guide - Universal capabilities catalog - System overview updates - All module documentation sync Tested: Stream response verified, authentication working Status: AIA V2.0 core completed (85%)
This commit is contained in:
@@ -1,161 +1,161 @@
|
||||
# AIA 模块 V2.1 开发计划
|
||||
# AIA 妯″潡 V2.1 寮€鍙戣<EFBFBD>鍒?
|
||||
|
||||
> **鐗堟湰**锛歏2.1
|
||||
> **创建日期**:2026-01-11
|
||||
> **计划周期**:约 8-11 天
|
||||
> **策略**:重写后端 + 复用数据库 + 新开发前端
|
||||
> **关联PRD**:`01-需求分析/AIA模块PRD.md`
|
||||
> **关联原型**:`01-需求分析/AI智能问答V2.html`
|
||||
> **鍒涘缓鏃ユ湡**锛?026-01-11
|
||||
> **璁″垝鍛ㄦ湡**锛氱害 8-11 澶?
|
||||
> **绛栫暐**锛氶噸鍐欏悗绔?+ 澶嶇敤鏁版嵁搴?+ 鏂板紑鍙戝墠绔?
|
||||
> **鍏宠仈PRD**锛歚01-闇€姹傚垎鏋?AIA妯″潡PRD.md`
|
||||
> **鍏宠仈鍘熷瀷**锛歚01-闇€姹傚垎鏋?AI鏅鸿兘闂<E58598>瓟V2.html`
|
||||
|
||||
---
|
||||
|
||||
## 📋 开发策略概述
|
||||
## 馃搵 寮€鍙戠瓥鐣ユ<E990A3>杩?
|
||||
|
||||
### 鏍稿績鍐崇瓥
|
||||
|
||||
| 缁勪欢 | 绛栫暐 | 鐞嗙敱 |
|
||||
|------|------|------|
|
||||
| **后端** | 🔴 **重写** | 旧版不符合云原生规范(console.log、未使用平台能力) |
|
||||
| **数据库** | ✅ **复用** | aia_schema 已完善,字段满足需求 |
|
||||
| **前端** | 🔴 **新开发** | 复用 shared/components/Chat 通用组件,全新UI |
|
||||
| **鍚庣<EFBFBD>** | 馃敶 **閲嶅啓** | 鏃х増涓嶇<EFBFBD>鍚堜簯鍘熺敓瑙勮寖锛坈onsole.log銆佹湭浣跨敤骞冲彴鑳藉姏锛?|
|
||||
| **鏁版嵁搴?* | 鉁?**澶嶇敤** | aia_schema 宸插畬鍠勶紝瀛楁<EFBFBD>婊¤冻闇€姹?|
|
||||
| **鍓嶇<EFBFBD>** | 馃敶 **鏂板紑鍙?* | 澶嶇敤 shared/components/Chat 閫氱敤缁勪欢锛屽叏鏂癠I |
|
||||
|
||||
### 技术规范
|
||||
### 鎶€鏈<EFBFBD><EFBFBD>鑼?
|
||||
|
||||
| 瑙勮寖 | 瑕佹眰 |
|
||||
|------|------|
|
||||
| **日志** | 使用 `logger` from `@/common/logging`(禁止 console.log) |
|
||||
| **鏃ュ織** | 浣跨敤 `logger` from `@/common/logging`锛堢<EFBFBD>姝?console.log锛?|
|
||||
| **瀛樺偍** | 浣跨敤 `storage` from `@/common/storage` |
|
||||
| **缂撳瓨** | 浣跨敤 `cache` from `@/common/cache` |
|
||||
| **闃熷垪** | 浣跨敤 `jobQueue` from `@/common/jobs` |
|
||||
| **Prompt** | 浣跨敤 `promptService.get()` from `@/common/prompts` |
|
||||
| **浠g爜浣嶇疆** | `backend/src/modules/aia/` |
|
||||
| **API路由** | `/api/v2/aia/*` |
|
||||
| **API璺<EFBFBD>敱** | `/api/v1/aia/*` |
|
||||
|
||||
---
|
||||
|
||||
## 📊 数据库状态(✅ 已完成)
|
||||
## 馃搳 鏁版嵁搴撶姸鎬侊紙鉁?宸插畬鎴愶級
|
||||
|
||||
### 表结构(3个表)
|
||||
### 琛ㄧ粨鏋勶紙3涓<EFBFBD>〃锛?
|
||||
|
||||
```
|
||||
aia_schema.projects ✅ 保留
|
||||
aia_schema.conversations ✅ 保留
|
||||
aia_schema.messages ✅ 保留 + 新增字段
|
||||
aia_schema.projects 鉁?淇濈暀
|
||||
aia_schema.conversations 鉁?淇濈暀
|
||||
aia_schema.messages 鉁?淇濈暀 + 鏂板<E98F82>瀛楁<E7809B>
|
||||
```
|
||||
|
||||
### 新增字段(2026-01-11 已迁移)
|
||||
### 鏂板<EFBFBD>瀛楁<EFBFBD>锛?026-01-11 宸茶縼绉伙級
|
||||
|
||||
| 表 | 字段 | 类型 | 说明 |
|
||||
| 琛?| 瀛楁<E7809B> | 绫诲瀷 | 璇存槑 |
|
||||
|----|------|------|------|
|
||||
| messages | `thinking_content` | TEXT | 深度思考内容 `<think>...</think>` |
|
||||
| messages | `attachments` | JSONB | 附件数组(上限5个,单个≤20MB,文本≤30K tokens) |
|
||||
| messages | `thinking_content` | TEXT | 娣卞害鎬濊€冨唴瀹?`<think>...</think>` |
|
||||
| messages | `attachments` | JSONB | 闄勪欢鏁扮粍锛堜笂闄?涓<>紝鍗曚釜鈮?0MB锛屾枃鏈<E69E83>墹30K tokens锛?|
|
||||
|
||||
### 宸插垹闄よ〃
|
||||
|
||||
| 表 | 原因 |
|
||||
| 琛?| 鍘熷洜 |
|
||||
|----|------|
|
||||
| `general_conversations` | 功能重叠,使用 conversations.project_id = NULL |
|
||||
| `general_conversations` | 鍔熻兘閲嶅彔锛屼娇鐢?conversations.project_id = NULL |
|
||||
| `general_messages` | 鍔熻兘閲嶅彔 |
|
||||
|
||||
---
|
||||
|
||||
## 🗓️ 开发阶段
|
||||
## 馃棑锔?寮€鍙戦樁娈?
|
||||
|
||||
### Phase 1: 后端重写(3-4天)
|
||||
### Phase 1: 鍚庣<EFBFBD>閲嶅啓锛?-4澶╋級
|
||||
|
||||
#### Day 1: 妯″潡楠ㄦ灦 + 鏍稿績鏈嶅姟
|
||||
|
||||
**鐩<>爣**锛氭惌寤烘ā鍧楃粨鏋勶紝杩佺Щ鏍稿績瀵硅瘽鏈嶅姟
|
||||
|
||||
**任务清单**:
|
||||
**浠诲姟娓呭崟**锛?
|
||||
|
||||
- [ ] **1.1 鍒涘缓妯″潡鐩<E6BDA1>綍缁撴瀯**
|
||||
```
|
||||
backend/src/modules/aia/
|
||||
鈹溾攢鈹€ controllers/
|
||||
│ ├── conversationController.ts
|
||||
│ ├── agentController.ts
|
||||
│ └── projectController.ts
|
||||
鈹? 鈹溾攢鈹€ conversationController.ts
|
||||
鈹? 鈹溾攢鈹€ agentController.ts
|
||||
鈹? 鈹斺攢鈹€ projectController.ts
|
||||
鈹溾攢鈹€ services/
|
||||
│ ├── conversationService.ts
|
||||
│ ├── agentService.ts
|
||||
│ └── projectService.ts
|
||||
鈹? 鈹溾攢鈹€ conversationService.ts
|
||||
鈹? 鈹溾攢鈹€ agentService.ts
|
||||
鈹? 鈹斺攢鈹€ projectService.ts
|
||||
鈹溾攢鈹€ routes/
|
||||
│ └── index.ts
|
||||
鈹? 鈹斺攢鈹€ index.ts
|
||||
鈹溾攢鈹€ types/
|
||||
│ └── index.ts
|
||||
鈹? 鈹斺攢鈹€ index.ts
|
||||
鈹斺攢鈹€ index.ts
|
||||
```
|
||||
|
||||
- [ ] **1.2 閲嶅啓 conversationService**
|
||||
- 从 legacy 复制核心逻辑
|
||||
- 替换 `console.log` → `logger`
|
||||
- 使用 `prisma.message`(已在 aia_schema)
|
||||
- 浠?legacy 澶嶅埗鏍稿績閫昏緫
|
||||
- 鏇挎崲 `console.log` 鈫?`logger`
|
||||
- 浣跨敤 `prisma.message`锛堝凡鍦?aia_schema锛?
|
||||
- 娣诲姞 `thinkingContent` 澶勭悊閫昏緫
|
||||
- 淇濇寔娴佸紡杈撳嚭鑳藉姏
|
||||
|
||||
- [ ] **1.3 閲嶅啓 agentService**
|
||||
- 鏀圭敤 `promptService.get()` 鑾峰彇 Prompt
|
||||
- 缓存智能体配置(使用 `cache`)
|
||||
- 缂撳瓨鏅鸿兘浣撻厤缃<EFBFBD>紙浣跨敤 `cache`锛?
|
||||
|
||||
- [ ] **1.4 娉ㄥ唽 v2 璺<>敱**
|
||||
- 注册到 `/api/v2/aia/*`
|
||||
- 保持 legacy 路由兼容(逐步迁移)
|
||||
- 娉ㄥ唽鍒?`/api/v1/aia/*`
|
||||
- 淇濇寔 legacy 璺<EFBFBD>敱鍏煎<EFBFBD>锛堥€愭<EFBFBD>杩佺Щ锛?
|
||||
|
||||
**验收标准**:
|
||||
**楠屾敹鏍囧噯**锛?
|
||||
- [ ] 鍩虹<E98DA9>瀵硅瘽鍔熻兘鍙<E58598>敤
|
||||
- [ ] 娴佸紡杈撳嚭姝e父
|
||||
- [ ] 日志输出到 logger
|
||||
- [ ] 鏃ュ織杈撳嚭鍒?logger
|
||||
|
||||
---
|
||||
|
||||
#### Day 2: 深度思考 + 附件上传
|
||||
#### Day 2: 娣卞害鎬濊€?+ 闄勪欢涓婁紶
|
||||
|
||||
**目标**:实现 V2.1 新增功能
|
||||
**鐩<EFBFBD>爣**锛氬疄鐜?V2.1 鏂板<E98F82>鍔熻兘
|
||||
|
||||
**任务清单**:
|
||||
**浠诲姟娓呭崟**锛?
|
||||
|
||||
- [ ] **2.1 深度思考模式**
|
||||
- 检测 LLM 输出中的 `<think>...</think>` 标签
|
||||
- [ ] **2.1 娣卞害鎬濊€冩ā寮?*
|
||||
- 妫€娴?LLM 杈撳嚭涓<E59AAD>殑 `<think>...</think>` 鏍囩<EFBFBD>
|
||||
- 鎻愬彇骞跺瓨鍌ㄥ埌 `messages.thinking_content`
|
||||
- 从 `content` 中移除 think 标签
|
||||
- 流式输出时分离 thinking 和 content
|
||||
- 浠?`content` 涓<EFBFBD>Щ闄?think 鏍囩<EFBFBD>
|
||||
- 娴佸紡杈撳嚭鏃跺垎绂?thinking 鍜?content
|
||||
|
||||
- [ ] **2.2 闄勪欢涓婁紶鏈嶅姟**
|
||||
- 使用 `storage.upload()` 上传到 OSS
|
||||
- 调用 Python 微服务提取文本
|
||||
- Token 计数(使用 tiktoken)
|
||||
- 截断处理(超过 30K tokens)
|
||||
- 存储附件信息到 `messages.attachments`
|
||||
- 浣跨敤 `storage.upload()` 涓婁紶鍒?OSS
|
||||
- 璋冪敤 Python 寰<EFBFBD>湇鍔℃彁鍙栨枃鏈?
|
||||
- Token 璁℃暟锛堜娇鐢?tiktoken锛?
|
||||
- 鎴<EFBFBD>柇澶勭悊锛堣秴杩?30K tokens锛?
|
||||
- 瀛樺偍闄勪欢淇℃伅鍒?`messages.attachments`
|
||||
|
||||
- [ ] **2.3 附件注入 LLM 上下文**
|
||||
- 组装附件文本到 User Prompt
|
||||
- 控制总 Token 长度
|
||||
- [ ] **2.3 闄勪欢娉ㄥ叆 LLM 涓婁笅鏂?*
|
||||
- 缁勮<EFBFBD>闄勪欢鏂囨湰鍒?User Prompt
|
||||
- 鎺у埗鎬?Token 闀垮害
|
||||
|
||||
**技术规格**:
|
||||
**鎶€鏈<EFBFBD><EFBFBD>鏍?*锛?
|
||||
|
||||
```typescript
|
||||
// 闄勪欢澶勭悊閰嶇疆
|
||||
const ATTACHMENT_CONFIG = {
|
||||
maxCount: 5, // 每条消息最多5个附件
|
||||
maxCount: 5, // 姣忔潯娑堟伅鏈€澶?涓<>檮浠?
|
||||
maxSizePerFile: 20 * 1024 * 1024, // 鍗曚釜鏂囦欢20MB
|
||||
maxTokens: 30000, // 提取文本最多30K tokens
|
||||
maxTokens: 30000, // 鎻愬彇鏂囨湰鏈€澶?0K tokens
|
||||
supportedTypes: ['pdf', 'docx', 'txt', 'xlsx'],
|
||||
};
|
||||
```
|
||||
|
||||
**验收标准**:
|
||||
- [ ] 深度思考内容正确分离存储
|
||||
**楠屾敹鏍囧噯**锛?
|
||||
- [ ] 娣卞害鎬濊€冨唴瀹规<EFBFBD>纭<EFBFBD>垎绂诲瓨鍌?
|
||||
- [ ] 闄勪欢涓婁紶鎴愬姛
|
||||
- [ ] 闄勪欢鏂囨湰姝g‘娉ㄥ叆 LLM
|
||||
|
||||
---
|
||||
|
||||
#### Day 3: 意图路由 + 知识库集成
|
||||
#### Day 3: 鎰忓浘璺<EFBFBD>敱 + 鐭ヨ瘑搴撻泦鎴?
|
||||
|
||||
**鐩<>爣**锛氬疄鐜板叏灞€鎰忓浘璺<E6B598>敱锛屽畬鍠勭煡璇嗗簱寮曠敤
|
||||
|
||||
**任务清单**:
|
||||
**浠诲姟娓呭崟**锛?
|
||||
|
||||
- [ ] **3.1 鎰忓浘璺<E6B598>敱鏈嶅姟**
|
||||
- 鏂板缓 `intentRouterService.ts`
|
||||
@@ -163,27 +163,27 @@ const ATTACHMENT_CONFIG = {
|
||||
- 杩斿洖鐩<E6B496>爣 Agent ID + 棰勫~ Prompt
|
||||
- 娣诲姞 500ms 闃叉姈锛堝墠绔<E5A2A0>疄鐜帮級
|
||||
|
||||
- [ ] **3.2 完善知识库集成**
|
||||
- 复用 PKB 模块的 RAG 检索
|
||||
- 智能引用系统([来源N])
|
||||
- 引用清单格式化
|
||||
- [ ] **3.2 瀹屽杽鐭ヨ瘑搴撻泦鎴?*
|
||||
- 澶嶇敤 PKB 妯″潡鐨?RAG 妫€绱?
|
||||
- 鏅鸿兘寮曠敤绯荤粺锛圼鏉ユ簮N]锛?
|
||||
- 寮曠敤娓呭崟鏍煎紡鍖?
|
||||
|
||||
- [ ] **3.3 API 绔<>偣瀹屽杽**
|
||||
```
|
||||
POST /api/v2/aia/intent/route # 意图路由
|
||||
POST /api/v2/aia/conversations # 创建对话
|
||||
GET /api/v2/aia/conversations # 对话列表
|
||||
GET /api/v2/aia/conversations/:id # 对话详情
|
||||
POST /api/v2/aia/conversations/:id/messages/stream # 发送消息(流式)
|
||||
POST /api/v2/aia/conversations/:id/attachments # 上传附件
|
||||
GET /api/v2/aia/agents # 智能体列表
|
||||
GET /api/v2/aia/agents/:id # 智能体详情
|
||||
POST /api/v1/aia/intent/route # 鎰忓浘璺<EFBFBD>敱
|
||||
POST /api/v1/aia/conversations # 鍒涘缓瀵硅瘽
|
||||
GET /api/v1/aia/conversations # 瀵硅瘽鍒楄〃
|
||||
GET /api/v1/aia/conversations/:id # 瀵硅瘽璇︽儏
|
||||
POST /api/v1/aia/conversations/:id/messages/stream # 鍙戦€佹秷鎭<EFBFBD>紙娴佸紡锛?
|
||||
POST /api/v1/aia/conversations/:id/attachments # 涓婁紶闄勪欢
|
||||
GET /api/v1/aia/agents # 鏅鸿兘浣撳垪琛?
|
||||
GET /api/v1/aia/agents/:id # 鏅鸿兘浣撹<EFBFBD>鎯?
|
||||
```
|
||||
|
||||
**验收标准**:
|
||||
- [ ] 意图路由正确识别并跳转
|
||||
- [ ] 知识库引用正确显示
|
||||
- [ ] 所有 API 端点可用
|
||||
**楠屾敹鏍囧噯**锛?
|
||||
- [ ] 鎰忓浘璺<EFBFBD>敱姝g‘璇嗗埆骞惰烦杞?
|
||||
- [ ] 鐭ヨ瘑搴撳紩鐢ㄦ<EFBFBD>纭<EFBFBD>樉绀?
|
||||
- [ ] 鎵€鏈?API 绔<>偣鍙<E581A3>敤
|
||||
|
||||
---
|
||||
|
||||
@@ -191,23 +191,23 @@ const ATTACHMENT_CONFIG = {
|
||||
|
||||
**鐩<>爣**锛氬畬鎴愬悗绔<E68297>祴璇曞拰鏂囨。
|
||||
|
||||
**任务清单**:
|
||||
**浠诲姟娓呭崟**锛?
|
||||
|
||||
- [ ] **4.1 鍗曞厓娴嬭瘯**
|
||||
- conversationService 娴嬭瘯
|
||||
- 深度思考解析测试
|
||||
- 娣卞害鎬濊€冭В鏋愭祴璇?
|
||||
- 闄勪欢澶勭悊娴嬭瘯
|
||||
|
||||
- [ ] **4.2 闆嗘垚娴嬭瘯**
|
||||
- 瀹屾暣瀵硅瘽娴佺▼
|
||||
- 闄勪欢涓婁紶娴佺▼
|
||||
- 知识库检索流程
|
||||
- 鐭ヨ瘑搴撴<EFBFBD>绱㈡祦绋?
|
||||
|
||||
- [ ] **4.3 API 鏂囨。**
|
||||
- 鏇存柊 REST Client 娴嬭瘯鏂囦欢
|
||||
- 缂栧啓 API 浣跨敤绀轰緥
|
||||
|
||||
**验收标准**:
|
||||
**楠屾敹鏍囧噯**锛?
|
||||
- [ ] 娴嬭瘯瑕嗙洊鏍稿績鍔熻兘
|
||||
- [ ] API 鏂囨。瀹屾暣
|
||||
|
||||
@@ -215,66 +215,66 @@ const ATTACHMENT_CONFIG = {
|
||||
|
||||
### Phase 2: 鍓嶇<E98D93>寮€鍙戯紙5-7澶╋級
|
||||
|
||||
#### Day 5-6: 智能体大厅(Dashboard)
|
||||
#### Day 5-6: 鏅鸿兘浣撳ぇ鍘咃紙Dashboard锛?
|
||||
|
||||
**鐩<>爣**锛氬疄鐜伴<E9909C>椤垫櫤鑳戒綋澶у巺
|
||||
|
||||
**任务清单**:
|
||||
**浠诲姟娓呭崟**锛?
|
||||
|
||||
- [ ] **5.1 鍒涘缓妯″潡鐩<E6BDA1>綍缁撴瀯**
|
||||
```
|
||||
frontend-v2/src/modules/aia/
|
||||
鈹溾攢鈹€ pages/
|
||||
│ ├── Dashboard.tsx # 智能体大厅
|
||||
│ └── Workspace.tsx # 对话工作台
|
||||
鈹? 鈹溾攢鈹€ Dashboard.tsx # 鏅鸿兘浣撳ぇ鍘?
|
||||
鈹? 鈹斺攢鈹€ Workspace.tsx # 瀵硅瘽宸ヤ綔鍙?
|
||||
鈹溾攢鈹€ components/
|
||||
│ ├── AgentPipeline.tsx # 5阶段流水线
|
||||
│ ├── AgentCard.tsx # 智能体卡片
|
||||
│ ├── IntentSearch.tsx # 意图搜索框
|
||||
│ ├── ConversationList.tsx # 历史会话列表
|
||||
│ ├── ThinkingBlock.tsx # 深度思考折叠块
|
||||
│ ├── AttachmentUpload.tsx # 附件上传
|
||||
│ ├── AttachmentCard.tsx # 附件卡片
|
||||
│ └── SlashCommands.tsx # 快捷指令
|
||||
鈹? 鈹溾攢鈹€ AgentPipeline.tsx # 5闃舵<EFBFBD>娴佹按绾?
|
||||
鈹? 鈹溾攢鈹€ AgentCard.tsx # 鏅鸿兘浣撳崱鐗?
|
||||
鈹? 鈹溾攢鈹€ IntentSearch.tsx # 鎰忓浘鎼滅储妗?
|
||||
鈹? 鈹溾攢鈹€ ConversationList.tsx # 鍘嗗彶浼氳瘽鍒楄〃
|
||||
鈹? 鈹溾攢鈹€ ThinkingBlock.tsx # 娣卞害鎬濊€冩姌鍙犲潡
|
||||
鈹? 鈹溾攢鈹€ AttachmentUpload.tsx # 闄勪欢涓婁紶
|
||||
鈹? 鈹溾攢鈹€ AttachmentCard.tsx # 闄勪欢鍗$墖
|
||||
鈹? 鈹斺攢鈹€ SlashCommands.tsx # 蹇<EFBFBD>嵎鎸囦护
|
||||
鈹溾攢鈹€ hooks/
|
||||
│ ├── useConversation.ts
|
||||
│ ├── useAgents.ts
|
||||
│ └── useIntentRouter.ts
|
||||
鈹? 鈹溾攢鈹€ useConversation.ts
|
||||
鈹? 鈹溾攢鈹€ useAgents.ts
|
||||
鈹? 鈹斺攢鈹€ useIntentRouter.ts
|
||||
鈹溾攢鈹€ api/
|
||||
│ └── index.ts
|
||||
鈹? 鈹斺攢鈹€ index.ts
|
||||
鈹溾攢鈹€ types/
|
||||
│ └── index.ts
|
||||
鈹? 鈹斺攢鈹€ index.ts
|
||||
鈹斺攢鈹€ index.tsx
|
||||
```
|
||||
|
||||
- [ ] **5.2 智能体流水线(AgentPipeline)**
|
||||
- 5阶段布局(严格还原 V11 原型)
|
||||
- 3色视觉体系
|
||||
- [ ] **5.2 鏅鸿兘浣撴祦姘寸嚎锛圓gentPipeline锛?*
|
||||
- 5闃舵<EFBFBD>甯冨眬锛堜弗鏍艰繕鍘?V11 鍘熷瀷锛?
|
||||
- 3鑹茶<EFBFBD>瑙変綋绯?
|
||||
- 鍗$墖鐐瑰嚮璺宠浆 Workspace
|
||||
- 工具卡片跳转外部模块(DC/ST)
|
||||
- 宸ュ叿鍗$墖璺宠浆澶栭儴妯″潡锛圖C/ST锛?
|
||||
|
||||
- [ ] **5.3 意图搜索框(IntentSearch)**
|
||||
- [ ] **5.3 鎰忓浘鎼滅储妗嗭紙IntentSearch锛?*
|
||||
- 椤堕儴澶ф悳绱㈡<E7BBB1>
|
||||
- 500ms 闃叉姈
|
||||
- 璋冪敤鎰忓浘璺<E6B598>敱 API
|
||||
- 鑷<>姩璺宠浆鐩<E6B586>爣 Agent
|
||||
|
||||
**验收标准**:
|
||||
- [ ] 5阶段流水线正确展示
|
||||
**楠屾敹鏍囧噯**锛?
|
||||
- [ ] 5闃舵<EFBFBD>娴佹按绾挎<EFBFBD>纭<EFBFBD>睍绀?
|
||||
- [ ] 鎰忓浘鎼滅储鍔熻兘鍙<E58598>敤
|
||||
- [ ] 与原型图一致
|
||||
- [ ] 涓庡師鍨嬪浘涓€鑷?
|
||||
|
||||
---
|
||||
|
||||
#### Day 7-8: 对话工作台(Workspace)
|
||||
#### Day 7-8: 瀵硅瘽宸ヤ綔鍙帮紙Workspace锛?
|
||||
|
||||
**鐩<>爣**锛氬疄鐜版矇娴稿紡瀵硅瘽鐣岄潰
|
||||
|
||||
**任务清单**:
|
||||
**浠诲姟娓呭崟**锛?
|
||||
|
||||
- [ ] **7.1 宸ヤ綔鍙板竷灞€**
|
||||
- Gemini 椋庢牸锛堝ぇ鐣欑櫧銆佸皯鍒嗗壊绾匡級
|
||||
- 左侧侧边栏(历史会话,可折叠)
|
||||
- 宸︿晶渚ц竟鏍忥紙鍘嗗彶浼氳瘽锛屽彲鎶樺彔锛?
|
||||
- 涓诲<E6B693>璇濆尯锛圚eader + 娑堟伅鍒楄〃 + 杈撳叆妗嗭級
|
||||
|
||||
- [ ] **7.2 澶嶇敤 Chat 閫氱敤缁勪欢**
|
||||
@@ -283,17 +283,17 @@ const ATTACHMENT_CONFIG = {
|
||||
|
||||
<ChatContainer
|
||||
providerConfig={{
|
||||
apiEndpoint: '/api/v2/aia/conversations/:id/messages/stream',
|
||||
apiEndpoint: '/api/v1/aia/conversations/:id/messages/stream',
|
||||
requestFn: sendMessageWithStream,
|
||||
}}
|
||||
customMessageRenderer={renderAIAMessage}
|
||||
/>
|
||||
```
|
||||
|
||||
- [ ] **7.3 深度思考折叠块(ThinkingBlock)**
|
||||
- [ ] **7.3 娣卞害鎬濊€冩姌鍙犲潡锛圱hinkingBlock锛?*
|
||||
- 鍙<>姌鍙犵伆鑹插紩鐢ㄥ潡
|
||||
- 鐢熸垚涓<E59E9A>睍寮€锛屽畬鎴愬悗鑷<E68297>姩鏀惰捣
|
||||
- 显示"已深度思考 (耗时 Xs)"
|
||||
- 鏄剧ず"宸叉繁搴︽€濊€?(鑰楁椂 Xs)"
|
||||
|
||||
- [ ] **7.4 闄勪欢涓婁紶缁勪欢**
|
||||
- 鏀<>寔鎷栨嫿涓婁紶
|
||||
@@ -302,13 +302,13 @@ const ATTACHMENT_CONFIG = {
|
||||
- 娑堟伅姘旀场涓嬫柟闄勪欢鍗$墖
|
||||
|
||||
- [ ] **7.5 鍘嗗彶浼氳瘽鍒楄〃**
|
||||
- 按时间分组(今天、昨天、7天前)
|
||||
- 桌面端固定显示
|
||||
- 移动端抽屉滑出
|
||||
- 鎸夋椂闂村垎缁勶紙浠婂ぉ銆佹槰澶┿€?澶╁墠锛?
|
||||
- 妗岄潰绔<EFBFBD>浐瀹氭樉绀?
|
||||
- 绉诲姩绔<EFBFBD>娊灞夋粦鍑?
|
||||
|
||||
**验收标准**:
|
||||
**楠屾敹鏍囧噯**锛?
|
||||
- [ ] Gemini 椋庢牸 UI
|
||||
- [ ] 深度思考正确展示
|
||||
- [ ] 娣卞害鎬濊€冩<EFBFBD>纭<EFBFBD>睍绀?
|
||||
- [ ] 闄勪欢涓婁紶瀹屾暣娴佺▼
|
||||
- [ ] 鍘嗗彶浼氳瘽鍒囨崲
|
||||
|
||||
@@ -316,30 +316,30 @@ const ATTACHMENT_CONFIG = {
|
||||
|
||||
#### Day 9: Markdown 澧炲己 + 蹇<>嵎鎸囦护
|
||||
|
||||
**目标**:增强对话体验
|
||||
**鐩<EFBFBD>爣**锛氬<E9949B>寮哄<E5AFAE>璇濅綋楠?
|
||||
|
||||
**任务清单**:
|
||||
**浠诲姟娓呭崟**锛?
|
||||
|
||||
- [ ] **9.1 Markdown 娓叉煋澧炲己**
|
||||
- KaTeX 鍏<>紡娓叉煋锛堝尰瀛﹀叕寮忥級
|
||||
- 琛ㄦ牸妯<E789B8>悜婊氬姩
|
||||
- 代码块语法高亮 + 一键复制
|
||||
- 浠g爜鍧楄<EFBFBD>娉曢珮浜?+ 涓€閿<E282AC><E996BF>鍒?
|
||||
|
||||
- [ ] **9.2 快捷指令(SlashCommands)**
|
||||
- [ ] **9.2 蹇<EFBFBD>嵎鎸囦护锛圫lashCommands锛?*
|
||||
- 杈撳叆 `/` 寮瑰嚭鑿滃崟
|
||||
- 支持:/润色, /扩写, /翻译, /导出Word
|
||||
- 鏀<EFBFBD>寔锛?娑﹁壊, /鎵╁啓, /缈昏瘧, /瀵煎嚭Word
|
||||
- 閿<>洏瀵艰埅
|
||||
|
||||
- [ ] **9.3 结果操作栏**
|
||||
- Hover 显示工具栏
|
||||
- 复制(Markdown 源码)
|
||||
- [ ] **9.3 缁撴灉鎿嶄綔鏍?*
|
||||
- Hover 鏄剧ず宸ュ叿鏍?
|
||||
- 澶嶅埗锛圡arkdown 婧愮爜锛?
|
||||
- 閲嶆柊鐢熸垚
|
||||
- 导出 Word(调用 RVW 导出服务)
|
||||
- 瀵煎嚭 Word锛堣皟鐢?RVW 瀵煎嚭鏈嶅姟锛?
|
||||
|
||||
**验收标准**:
|
||||
**楠屾敹鏍囧噯**锛?
|
||||
- [ ] 鍏<>紡姝g‘娓叉煋
|
||||
- [ ] 蹇<>嵎鎸囦护鍙<E68AA4>敤
|
||||
- [ ] 操作栏功能完整
|
||||
- [ ] 鎿嶄綔鏍忓姛鑳藉畬鏁?
|
||||
|
||||
---
|
||||
|
||||
@@ -347,25 +347,25 @@ const ATTACHMENT_CONFIG = {
|
||||
|
||||
**鐩<>爣**锛氬搷搴斿紡甯冨眬閫傞厤
|
||||
|
||||
**任务清单**:
|
||||
**浠诲姟娓呭崟**锛?
|
||||
|
||||
- [ ] **10.1 Dashboard 移动端**
|
||||
- [ ] **10.1 Dashboard 绉诲姩绔?*
|
||||
- 闅愯棌澶嶆潅瀵艰埅
|
||||
- 鍗$墖鍗曞垪娴佸紡甯冨眬
|
||||
- 时间轴样式调整
|
||||
- 鏃堕棿杞存牱寮忚皟鏁?
|
||||
|
||||
- [ ] **10.2 Workspace 移动端**
|
||||
- 侧边栏改为抽屉
|
||||
- 输入框键盘适配(scrollIntoView)
|
||||
- 发送按钮始终可见
|
||||
- [ ] **10.2 Workspace 绉诲姩绔?*
|
||||
- 渚ц竟鏍忔敼涓烘娊灞?
|
||||
- 杈撳叆妗嗛敭鐩橀€傞厤锛坰crollIntoView锛?
|
||||
- 鍙戦€佹寜閽<EFBFBD><EFBFBD>缁堝彲瑙?
|
||||
|
||||
- [ ] **10.3 瑙︽帶浼樺寲**
|
||||
- 按钮 active 态
|
||||
- 鎸夐挳 active 鎬?
|
||||
- 瑙︽帶鍖哄煙浼樺寲
|
||||
|
||||
**验收标准**:
|
||||
**楠屾敹鏍囧噯**锛?
|
||||
- [ ] md (768px) 鏂<>偣鍝嶅簲姝g‘
|
||||
- [ ] 移动端交互流畅
|
||||
- [ ] 绉诲姩绔<EFBFBD>氦浜掓祦鐣?
|
||||
|
||||
---
|
||||
|
||||
@@ -373,27 +373,27 @@ const ATTACHMENT_CONFIG = {
|
||||
|
||||
**鐩<>爣**锛氬畬鎴愭暣浣撴祴璇曞拰浼樺寲
|
||||
|
||||
**任务清单**:
|
||||
**浠诲姟娓呭崟**锛?
|
||||
|
||||
- [ ] **11.1 端到端测试**
|
||||
- [ ] **11.1 绔<EFBFBD>埌绔<EFBFBD>祴璇?*
|
||||
- 瀹屾暣瀵硅瘽娴佺▼
|
||||
- 闄勪欢涓婁紶娴佺▼
|
||||
- 深度思考流程
|
||||
- 知识库引用流程
|
||||
- 娣卞害鎬濊€冩祦绋?
|
||||
- 鐭ヨ瘑搴撳紩鐢ㄦ祦绋?
|
||||
|
||||
- [ ] **11.2 鎬ц兘浼樺寲**
|
||||
- TTFB < 1.5s
|
||||
- 移动端 LCP < 1s
|
||||
- 绉诲姩绔?LCP < 1s
|
||||
- 鎰忓浘鎼滅储闃叉姈
|
||||
|
||||
- [ ] **11.3 Bug 淇<><E6B787>**
|
||||
|
||||
- [ ] **11.4 鏂囨。鏇存柊**
|
||||
- 更新模块状态文档
|
||||
- 更新系统当前状态
|
||||
- 鏇存柊妯″潡鐘舵€佹枃妗?
|
||||
- 鏇存柊绯荤粺褰撳墠鐘舵€?
|
||||
|
||||
**验收标准**:
|
||||
- [ ] 所有功能正常
|
||||
**楠屾敹鏍囧噯**锛?
|
||||
- [ ] 鎵€鏈夊姛鑳芥<EFBFBD>甯?
|
||||
- [ ] 鎬ц兘杈炬爣
|
||||
- [ ] 鏂囨。瀹屾暣
|
||||
|
||||
@@ -406,22 +406,22 @@ const ATTACHMENT_CONFIG = {
|
||||
```
|
||||
backend/src/modules/aia/
|
||||
鈹溾攢鈹€ controllers/
|
||||
│ ├── conversationController.ts # ~300行
|
||||
│ ├── agentController.ts # ~150行
|
||||
│ └── projectController.ts # ~200行
|
||||
鈹? 鈹溾攢鈹€ conversationController.ts # ~300琛?
|
||||
鈹? 鈹溾攢鈹€ agentController.ts # ~150琛?
|
||||
鈹? 鈹斺攢鈹€ projectController.ts # ~200琛?
|
||||
鈹溾攢鈹€ services/
|
||||
│ ├── conversationService.ts # ~500行(核心)
|
||||
│ ├── agentService.ts # ~200行
|
||||
│ ├── projectService.ts # ~150行
|
||||
│ ├── intentRouterService.ts # ~100行(新)
|
||||
│ └── attachmentService.ts # ~200行(新)
|
||||
鈹? 鈹溾攢鈹€ conversationService.ts # ~500琛岋紙鏍稿績锛?
|
||||
鈹? 鈹溾攢鈹€ agentService.ts # ~200琛?
|
||||
鈹? 鈹溾攢鈹€ projectService.ts # ~150琛?
|
||||
鈹? 鈹溾攢鈹€ intentRouterService.ts # ~100琛岋紙鏂帮級
|
||||
鈹? 鈹斺攢鈹€ attachmentService.ts # ~200琛岋紙鏂帮級
|
||||
鈹溾攢鈹€ routes/
|
||||
│ └── index.ts # ~100行
|
||||
鈹? 鈹斺攢鈹€ index.ts # ~100琛?
|
||||
鈹溾攢鈹€ types/
|
||||
│ └── index.ts # ~100行
|
||||
└── index.ts # ~20行
|
||||
鈹? 鈹斺攢鈹€ index.ts # ~100琛?
|
||||
鈹斺攢鈹€ index.ts # ~20琛?
|
||||
|
||||
预计总计:~2000行
|
||||
棰勮<EFBFBD>鎬昏<EFBFBD>锛殈2000琛?
|
||||
```
|
||||
|
||||
### 鍓嶇<E98D93>鏂板<E98F82>鏂囦欢
|
||||
@@ -429,28 +429,28 @@ backend/src/modules/aia/
|
||||
```
|
||||
frontend-v2/src/modules/aia/
|
||||
鈹溾攢鈹€ pages/
|
||||
│ ├── Dashboard.tsx # ~400行
|
||||
│ └── Workspace.tsx # ~500行
|
||||
鈹? 鈹溾攢鈹€ Dashboard.tsx # ~400琛?
|
||||
鈹? 鈹斺攢鈹€ Workspace.tsx # ~500琛?
|
||||
鈹溾攢鈹€ components/
|
||||
│ ├── AgentPipeline.tsx # ~300行
|
||||
│ ├── AgentCard.tsx # ~100行
|
||||
│ ├── IntentSearch.tsx # ~150行
|
||||
│ ├── ConversationList.tsx # ~200行
|
||||
│ ├── ThinkingBlock.tsx # ~100行
|
||||
│ ├── AttachmentUpload.tsx # ~200行
|
||||
│ ├── AttachmentCard.tsx # ~80行
|
||||
│ └── SlashCommands.tsx # ~150行
|
||||
鈹? 鈹溾攢鈹€ AgentPipeline.tsx # ~300琛?
|
||||
鈹? 鈹溾攢鈹€ AgentCard.tsx # ~100琛?
|
||||
鈹? 鈹溾攢鈹€ IntentSearch.tsx # ~150琛?
|
||||
鈹? 鈹溾攢鈹€ ConversationList.tsx # ~200琛?
|
||||
鈹? 鈹溾攢鈹€ ThinkingBlock.tsx # ~100琛?
|
||||
鈹? 鈹溾攢鈹€ AttachmentUpload.tsx # ~200琛?
|
||||
鈹? 鈹溾攢鈹€ AttachmentCard.tsx # ~80琛?
|
||||
鈹? 鈹斺攢鈹€ SlashCommands.tsx # ~150琛?
|
||||
鈹溾攢鈹€ hooks/
|
||||
│ ├── useConversation.ts # ~150行
|
||||
│ ├── useAgents.ts # ~100行
|
||||
│ └── useIntentRouter.ts # ~80行
|
||||
鈹? 鈹溾攢鈹€ useConversation.ts # ~150琛?
|
||||
鈹? 鈹溾攢鈹€ useAgents.ts # ~100琛?
|
||||
鈹? 鈹斺攢鈹€ useIntentRouter.ts # ~80琛?
|
||||
鈹溾攢鈹€ api/
|
||||
│ └── index.ts # ~200行
|
||||
鈹? 鈹斺攢鈹€ index.ts # ~200琛?
|
||||
鈹溾攢鈹€ types/
|
||||
│ └── index.ts # ~100行
|
||||
└── index.tsx # ~50行
|
||||
鈹? 鈹斺攢鈹€ index.ts # ~100琛?
|
||||
鈹斺攢鈹€ index.tsx # ~50琛?
|
||||
|
||||
预计总计:~2900行
|
||||
棰勮<EFBFBD>鎬昏<EFBFBD>锛殈2900琛?
|
||||
```
|
||||
|
||||
---
|
||||
@@ -466,8 +466,8 @@ frontend-v2/src/modules/aia/
|
||||
| `cache` | `@/common/cache` | Redis/PG缂撳瓨 |
|
||||
| `jobQueue` | `@/common/jobs` | 寮傛<E5AFAE>浠诲姟 |
|
||||
| `promptService` | `@/common/prompts` | Prompt绠$悊 |
|
||||
| `LLMFactory` | `@/common/llm` | LLM适配器 |
|
||||
| `prisma` | `@/config/database` | 数据库 |
|
||||
| `LLMFactory` | `@/common/llm` | LLM閫傞厤鍣?|
|
||||
| `prisma` | `@/config/database` | 鏁版嵁搴?|
|
||||
| `ExtractionClient` | `@/clients` | 鏂囨。鎻愬彇 |
|
||||
| `TokenService` | `@/services` | Token璁℃暟 |
|
||||
|
||||
@@ -476,7 +476,7 @@ frontend-v2/src/modules/aia/
|
||||
| 渚濊禆 | 鏉ユ簮 | 璇存槑 |
|
||||
|------|------|------|
|
||||
| `ChatContainer` | `@/shared/components/Chat` | 閫氱敤瀵硅瘽缁勪欢 |
|
||||
| `Ant Design` | `antd` | UI组件库 |
|
||||
| `Ant Design` | `antd` | UI缁勪欢搴?|
|
||||
| `Ant Design X` | `@ant-design/x` | AI瀵硅瘽缁勪欢 |
|
||||
| `KaTeX` | `katex` | 鍏<>紡娓叉煋 |
|
||||
| `react-markdown` | `react-markdown` | Markdown娓叉煋 |
|
||||
@@ -487,37 +487,37 @@ frontend-v2/src/modules/aia/
|
||||
|
||||
| 椋庨櫓 | 姒傜巼 | 褰卞搷 | 缂撹В鎺<D092>柦 |
|
||||
|------|------|------|---------|
|
||||
| 流式输出兼容性 | 中 | 高 | 复用已验证的 SSE 代码 |
|
||||
| 附件提取超时 | 中 | 中 | 使用 jobQueue 异步处理 |
|
||||
| 移动端适配问题 | 低 | 中 | 提前规划断点和布局 |
|
||||
| Prompt管理服务未就绪 | 低 | 中 | 可临时回退到文件读取 |
|
||||
| 娴佸紡杈撳嚭鍏煎<EFBFBD>鎬?| 涓?| 楂?| 澶嶇敤宸查獙璇佺殑 SSE 浠g爜 |
|
||||
| 闄勪欢鎻愬彇瓒呮椂 | 涓?| 涓?| 浣跨敤 jobQueue 寮傛<EFBFBD>澶勭悊 |
|
||||
| 绉诲姩绔<EFBFBD>€傞厤闂<EFBFBD><EFBFBD> | 浣?| 涓?| 鎻愬墠瑙勫垝鏂<E59E9D>偣鍜屽竷灞€ |
|
||||
| Prompt绠$悊鏈嶅姟鏈<EFBFBD>氨缁?| 浣?| 涓?| 鍙<>复鏃跺洖閫€鍒版枃浠惰<E6B5A0>鍙?|
|
||||
|
||||
---
|
||||
|
||||
## ✅ 验收标准
|
||||
## 鉁?楠屾敹鏍囧噯
|
||||
|
||||
### 鍔熻兘楠屾敹
|
||||
|
||||
- [ ] 智能体大厅完整展示
|
||||
- [ ] 鏅鸿兘浣撳ぇ鍘呭畬鏁村睍绀?
|
||||
- [ ] 鎰忓浘鎼滅储姝g‘璺<E28098>敱
|
||||
- [ ] 澶氳疆瀵硅瘽姝e父
|
||||
- [ ] 娴佸紡杈撳嚭娴佺晠
|
||||
- [ ] 深度思考正确折叠
|
||||
- [ ] 娣卞害鎬濊€冩<EFBFBD>纭<EFBFBD>姌鍙?
|
||||
- [ ] 闄勪欢涓婁紶瀹屾暣
|
||||
- [ ] 知识库引用正确
|
||||
- [ ] 鐭ヨ瘑搴撳紩鐢ㄦ<EFBFBD>纭?
|
||||
- [ ] 蹇<>嵎鎸囦护鍙<E68AA4>敤
|
||||
- [ ] 绉诲姩绔<E5A7A9>€傞厤姝e父
|
||||
|
||||
### 鎬ц兘楠屾敹
|
||||
|
||||
- [ ] TTFB < 1.5s
|
||||
- [ ] 移动端 LCP < 1s
|
||||
- [ ] 绉诲姩绔?LCP < 1s
|
||||
- [ ] 鎰忓浘鎼滅储鍝嶅簲 < 500ms
|
||||
|
||||
### 璐ㄩ噺楠屾敹
|
||||
|
||||
- [ ] 无 console.log(使用 logger)
|
||||
- [ ] 代码符合云原生规范
|
||||
- [ ] 鏃?console.log锛堜娇鐢?logger锛?
|
||||
- [ ] 浠g爜绗﹀悎浜戝師鐢熻<EFBFBD>鑼?
|
||||
- [ ] API 鏂囨。瀹屾暣
|
||||
- [ ] 鍗曞厓娴嬭瘯瑕嗙洊鏍稿績鍔熻兘
|
||||
|
||||
@@ -527,13 +527,14 @@ frontend-v2/src/modules/aia/
|
||||
|
||||
| 鏃ユ湡 | 鐗堟湰 | 鍐呭<E98D90> |
|
||||
|------|------|------|
|
||||
| 2026-01-11 | V1.0 | 创建开发计划 |
|
||||
| 2026-01-11 | V1.0 | 鍒涘缓寮€鍙戣<EFBFBD>鍒?|
|
||||
|
||||
---
|
||||
|
||||
**计划制定人**:AI Assistant
|
||||
**审核人**:待定
|
||||
**批准人**:待定
|
||||
**璁″垝鍒跺畾浜?*锛欰I Assistant
|
||||
**瀹℃牳浜?*锛氬緟瀹?
|
||||
**鎵瑰噯浜?*锛氬緟瀹?
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
# AIA V2.1 <20>𡒊垢 API 霈曇恣
|
||||
|
||||
> **<2A><>𧋦**嚗间2.1
|
||||
> **创建日期**:2026-01-11
|
||||
> **基础路径**:`/api/v2/aia`
|
||||
> **<EFBFBD>𥕦遣<EFBFBD>交<EFBFBD>**嚗?026-01-11
|
||||
> **<EFBFBD>箇<EFBFBD>頝臬<EFBFBD>**嚗䫤/api/v1/aia`
|
||||
|
||||
---
|
||||
|
||||
@@ -10,23 +10,23 @@
|
||||
|
||||
| <20>寞<EFBFBD> | 頝臬<E9A09D> | <20>讛膩 | 霈方<E99C88> |
|
||||
|------|------|------|------|
|
||||
| GET | `/agents` | 获取智能体列表 | ✅ |
|
||||
| GET | `/agents/:id` | 获取智能体详情 | ✅ |
|
||||
| POST | `/intent/route` | 意图路由 | ✅ |
|
||||
| GET | `/conversations` | 获取对话列表 | ✅ |
|
||||
| POST | `/conversations` | 创建对话 | ✅ |
|
||||
| GET | `/conversations/:id` | 获取对话详情 | ✅ |
|
||||
| DELETE | `/conversations/:id` | 删除对话 | ✅ |
|
||||
| POST | `/conversations/:id/messages/stream` | 发送消息(流式) | ✅ |
|
||||
| POST | `/conversations/:id/attachments` | 上传附件 | ✅ |
|
||||
| GET | `/projects` | 获取项目列表 | ✅ |
|
||||
| GET | `/projects/:id` | 获取项目详情 | ✅ |
|
||||
| GET | `/agents` | <EFBFBD>瑕<EFBFBD><EFBFBD>箄<EFBFBD>雿枏<EFBFBD>銵?| <20>?|
|
||||
| GET | `/agents/:id` | <EFBFBD>瑕<EFBFBD><EFBFBD>箄<EFBFBD>雿栞祕<EFBFBD>?| <20>?|
|
||||
| POST | `/intent/route` | <EFBFBD>誩㦛頝舐眏 | <EFBFBD>?|
|
||||
| GET | `/conversations` | <EFBFBD>瑕<EFBFBD>撖寡<EFBFBD><EFBFBD>𡑒” | <EFBFBD>?|
|
||||
| POST | `/conversations` | <EFBFBD>𥕦遣撖寡<EFBFBD> | <EFBFBD>?|
|
||||
| GET | `/conversations/:id` | <EFBFBD>瑕<EFBFBD>撖寡<EFBFBD>霂行<EFBFBD> | <EFBFBD>?|
|
||||
| DELETE | `/conversations/:id` | <EFBFBD>𣳇膄撖寡<EFBFBD> | <EFBFBD>?|
|
||||
| POST | `/conversations/:id/messages/stream` | <EFBFBD>煾<EFBFBD><EFBFBD><EFBFBD><EFBFBD>荔<EFBFBD>瘚<EFBFBD><EFBFBD>嚗?| <20>?|
|
||||
| POST | `/conversations/:id/attachments` | 銝𠹺<EFBFBD><EFBFBD><EFBFBD>辣 | <EFBFBD>?|
|
||||
| GET | `/projects` | <EFBFBD>瑕<EFBFBD>憿寧𤌍<EFBFBD>𡑒” | <EFBFBD>?|
|
||||
| GET | `/projects/:id` | <EFBFBD>瑕<EFBFBD>憿寧𤌍霂行<EFBFBD> | <EFBFBD>?|
|
||||
|
||||
---
|
||||
|
||||
## <20><> 霈方<E99C88>
|
||||
|
||||
所有 API 需要在请求头中携带 JWT Token:
|
||||
<EFBFBD><EFBFBD><EFBFBD>?API <20><>閬<EFBFBD>銁霂瑟<E99C82>憭港葉<E6B8AF>箏蒂 JWT Token嚗?
|
||||
|
||||
```
|
||||
Authorization: Bearer <token>
|
||||
@@ -36,21 +36,21 @@ Authorization: Bearer <token>
|
||||
|
||||
## <20><> API 霂衣<E99C82>摰帋<E691B0>
|
||||
|
||||
### 1. 智能体相关
|
||||
### 1. <EFBFBD>箄<EFBFBD>雿梶㮾<EFBFBD>?
|
||||
|
||||
#### 1.1 获取智能体列表
|
||||
#### 1.1 <EFBFBD>瑕<EFBFBD><EFBFBD>箄<EFBFBD>雿枏<EFBFBD>銵?
|
||||
|
||||
```http
|
||||
GET /api/v2/aia/agents
|
||||
GET /api/v1/aia/agents
|
||||
```
|
||||
|
||||
**查询参数**:
|
||||
**<EFBFBD>亥砭<EFBFBD><EFBFBD>㺭**嚗?
|
||||
|
||||
| <20><>㺭 | 蝐餃<E89D90> | 敹<>‵ | <20>讛膩 |
|
||||
|------|------|------|------|
|
||||
| stage | string | 否 | 筛选阶段:`design`, `data`, `analysis`, `write`, `publish` |
|
||||
| stage | string | <EFBFBD>?| 蝑偦<E89D91>厰𧫴畾蛛<E795BE>`design`, `data`, `analysis`, `write`, `publish` |
|
||||
|
||||
**响应**:
|
||||
**<EFBFBD>滚<EFBFBD>**嚗?
|
||||
|
||||
```json
|
||||
{
|
||||
@@ -59,7 +59,7 @@ GET /api/v2/aia/agents
|
||||
"agents": [
|
||||
{
|
||||
"id": "research-design",
|
||||
"name": "科研设计小助手",
|
||||
"name": "蝘𤑳<EFBFBD>霈曇恣撠誩𨭌<EFBFBD>?,
|
||||
"description": "撣桀𨭌<EFBFBD>典<EFBFBD><EFBFBD>鞟<EFBFBD>蝛嗆䲮獢<EFBFBD>挽霈~<EFBFBD><EFBFBD><EFBFBD><EFBFBD>格<EFBFBD>蝝U<EFBFBD><EFBFBD>䲮瘜訫郎<EFBFBD><EFBFBD>紡",
|
||||
"icon": "<EFBFBD>𥈡",
|
||||
"stage": "design",
|
||||
@@ -70,7 +70,7 @@ GET /api/v2/aia/agents
|
||||
{
|
||||
"id": "dc-tool",
|
||||
"name": "<EFBFBD>唳旿<EFBFBD><EFBFBD><EFBFBD>撌亙<EFBFBD>",
|
||||
"description": "跳转到数据采集模块",
|
||||
"description": "頝唾蓮<EFBFBD>唳㺭<EFBFBD>桅<EFBFBD><EFBFBD><EFBFBD>芋<EFBFBD>?,
|
||||
"icon": "<22><>",
|
||||
"stage": "data",
|
||||
"color": "#8B5CF6",
|
||||
@@ -82,20 +82,20 @@ GET /api/v2/aia/agents
|
||||
}
|
||||
```
|
||||
|
||||
#### 1.2 获取智能体详情
|
||||
#### 1.2 <EFBFBD>瑕<EFBFBD><EFBFBD>箄<EFBFBD>雿栞祕<EFBFBD>?
|
||||
|
||||
```http
|
||||
GET /api/v2/aia/agents/:id
|
||||
GET /api/v1/aia/agents/:id
|
||||
```
|
||||
|
||||
**响应**:
|
||||
**<EFBFBD>滚<EFBFBD>**嚗?
|
||||
|
||||
```json
|
||||
{
|
||||
"code": 0,
|
||||
"data": {
|
||||
"id": "research-design",
|
||||
"name": "科研设计小助手",
|
||||
"name": "蝘𤑳<EFBFBD>霈曇恣撠誩𨭌<EFBFBD>?,
|
||||
"description": "撣桀𨭌<EFBFBD>典<EFBFBD><EFBFBD>鞟<EFBFBD>蝛嗆䲮獢<EFBFBD>挽霈~<EFBFBD><EFBFBD><EFBFBD><EFBFBD>格<EFBFBD>蝝U<EFBFBD><EFBFBD>䲮瘜訫郎<EFBFBD><EFBFBD>紡",
|
||||
"icon": "<EFBFBD>𥈡",
|
||||
"stage": "design",
|
||||
@@ -104,7 +104,7 @@ GET /api/v2/aia/agents/:id
|
||||
"systemPrompt": "雿䭾糓銝<EFBFBD>銝芯<EFBFBD>銝𡁶<EFBFBD><EFBFBD>餃郎蝘𤑳<EFBFBD>霈曇恣銝枏振...",
|
||||
"welcomeMessage": "<EFBFBD>典末嚗<EFBFBD><EFBFBD><EFBFBD>舐<EFBFBD><EFBFBD>磰挽霈∪<EFBFBD><EFBFBD>拇<EFBFBD>嚗峕<EFBFBD><EFBFBD>臭誑撣格<EFBFBD>嚗䨵n- 霈曇恣<EFBFBD>𠉛弦<EFBFBD>寞<EFBFBD>\n- 璉<EFBFBD>蝝Y㮾<EFBFBD>單<EFBFBD><EFBFBD>娉n- <EFBFBD><EFBFBD>紡<EFBFBD>𠉛弦<EFBFBD>寞<EFBFBD>",
|
||||
"suggestedQuestions": [
|
||||
"如何设计一个RCT研究?",
|
||||
"憒<EFBFBD><EFBFBD>霈曇恣銝<EFBFBD>銝析CT<EFBFBD>𠉛弦嚗?,
|
||||
"撣格<E692A3>璉<EFBFBD>蝝Z<E89D9D>5撟渡<E6929F>撠輻<E692A0><E8BCBB>𠉛弦<F0A0899B><E5BCA6>讃",
|
||||
"隞<>銋<EFBFBD><E98A8B><EFBFBD>萎<EFBFBD>雿輻鍂<E8BCBB>曉<EFBFBD><E69B89>扯<EFBFBD><E689AF><EFBFBD>龪<EFBFBD>㵪<EFBFBD>"
|
||||
]
|
||||
@@ -119,27 +119,27 @@ GET /api/v2/aia/agents/:id
|
||||
#### 2.1 <20>箄<EFBFBD><E7AE84>誩㦛霂<E3A69B><E99C82>
|
||||
|
||||
```http
|
||||
POST /api/v2/aia/intent/route
|
||||
POST /api/v1/aia/intent/route
|
||||
```
|
||||
|
||||
**请求体**:
|
||||
**霂瑟<EFBFBD>雿?*嚗?
|
||||
|
||||
```json
|
||||
{
|
||||
"query": "帮我分析一下这份数据"
|
||||
"query": "撣格<EFBFBD><EFBFBD><EFBFBD><EFBFBD>銝<EFBFBD>銝贝<EFBFBD>隞賣㺭<EFBFBD>?
|
||||
}
|
||||
```
|
||||
|
||||
**响应**:
|
||||
**<EFBFBD>滚<EFBFBD>**嚗?
|
||||
|
||||
```json
|
||||
{
|
||||
"code": 0,
|
||||
"data": {
|
||||
"agentId": "data-analysis",
|
||||
"agentName": "统计分析小助手",
|
||||
"agentName": "蝏蠘恣<EFBFBD><EFBFBD><EFBFBD>撠誩𨭌<EFBFBD>?,
|
||||
"confidence": 0.92,
|
||||
"prefillPrompt": "请帮我分析这份数据,包括描述性统计和相关性分析"
|
||||
"prefillPrompt": "霂瑕葬<EFBFBD>穃<EFBFBD><EFBFBD>鞱<EFBFBD>隞賣㺭<EFBFBD>殷<EFBFBD><EFBFBD><EFBFBD>𡠺<EFBFBD>讛膩<EFBFBD>抒<EFBFBD>霈∪<EFBFBD><EFBFBD>詨<EFBFBD><EFBFBD>批<EFBFBD><EFBFBD>?
|
||||
}
|
||||
}
|
||||
```
|
||||
@@ -151,19 +151,19 @@ POST /api/v2/aia/intent/route
|
||||
#### 3.1 <20>瑕<EFBFBD>撖寡<E69296><E5AFA1>𡑒”
|
||||
|
||||
```http
|
||||
GET /api/v2/aia/conversations
|
||||
GET /api/v1/aia/conversations
|
||||
```
|
||||
|
||||
**查询参数**:
|
||||
**<EFBFBD>亥砭<EFBFBD><EFBFBD>㺭**嚗?
|
||||
|
||||
| <20><>㺭 | 蝐餃<E89D90> | 敹<>‵ | <20>讛膩 |
|
||||
|------|------|------|------|
|
||||
| agentId | string | 否 | 按智能体筛选 |
|
||||
| projectId | string | 否 | 按项目筛选(NULL 表示通用对话) |
|
||||
| page | number | 否 | 页码,默认 1 |
|
||||
| pageSize | number | 否 | 每页数量,默认 20 |
|
||||
| agentId | string | <EFBFBD>?| <20>㗇惣<E39787>賭<EFBFBD>蝑偦<E89D91>?|
|
||||
| projectId | string | <EFBFBD>?| <20>厰★<E58EB0>桃<EFBFBD><E6A183>㚁<EFBFBD>NULL 銵函內<E587BD>𡁶鍂撖寡<E69296>嚗?|
|
||||
| page | number | <EFBFBD>?| 憿萇<E686BF>嚗屸<E59A97>霈?1 |
|
||||
| pageSize | number | <EFBFBD>?| 瘥誯△<E8AAAF>圈<EFBFBD>嚗屸<E59A97>霈?20 |
|
||||
|
||||
**响应**:
|
||||
**<EFBFBD>滚<EFBFBD>**嚗?
|
||||
|
||||
```json
|
||||
{
|
||||
@@ -174,10 +174,10 @@ GET /api/v2/aia/conversations
|
||||
"id": "conv-001",
|
||||
"title": "RCT<43>𠉛弦霈曇恣<E69B87>刻砭",
|
||||
"agentId": "research-design",
|
||||
"agentName": "科研设计小助手",
|
||||
"agentName": "蝘𤑳<EFBFBD>霈曇恣撠誩𨭌<EFBFBD>?,
|
||||
"projectId": null,
|
||||
"messageCount": 12,
|
||||
"lastMessage": "好的,我来帮您设计研究方案...",
|
||||
"lastMessage": "憟賜<EFBFBD>嚗峕<EFBFBD><EFBFBD>亙葬<EFBFBD>刻挽霈∠<EFBFBD>蝛嗆䲮獢?..",
|
||||
"createdAt": "2026-01-11T10:00:00Z",
|
||||
"updatedAt": "2026-01-11T12:30:00Z"
|
||||
}
|
||||
@@ -195,27 +195,27 @@ GET /api/v2/aia/conversations
|
||||
#### 3.2 <20>𥕦遣撖寡<E69296>
|
||||
|
||||
```http
|
||||
POST /api/v2/aia/conversations
|
||||
POST /api/v1/aia/conversations
|
||||
```
|
||||
|
||||
**请求体**:
|
||||
**霂瑟<EFBFBD>雿?*嚗?
|
||||
|
||||
```json
|
||||
{
|
||||
"agentId": "research-design",
|
||||
"projectId": null,
|
||||
"title": "新对话"
|
||||
"title": "<EFBFBD>啣笆霂?
|
||||
}
|
||||
```
|
||||
|
||||
**响应**:
|
||||
**<EFBFBD>滚<EFBFBD>**嚗?
|
||||
|
||||
```json
|
||||
{
|
||||
"code": 0,
|
||||
"data": {
|
||||
"id": "conv-002",
|
||||
"title": "新对话",
|
||||
"title": "<EFBFBD>啣笆霂?,
|
||||
"agentId": "research-design",
|
||||
"projectId": null,
|
||||
"createdAt": "2026-01-11T14:00:00Z"
|
||||
@@ -223,19 +223,19 @@ POST /api/v2/aia/conversations
|
||||
}
|
||||
```
|
||||
|
||||
#### 3.3 获取对话详情(含历史消息)
|
||||
#### 3.3 <EFBFBD>瑕<EFBFBD>撖寡<EFBFBD>霂行<EFBFBD>嚗<EFBFBD>鉄<EFBFBD><EFBFBD>蟮瘨<EFBFBD><EFBFBD>嚗?
|
||||
|
||||
```http
|
||||
GET /api/v2/aia/conversations/:id
|
||||
GET /api/v1/aia/conversations/:id
|
||||
```
|
||||
|
||||
**查询参数**:
|
||||
**<EFBFBD>亥砭<EFBFBD><EFBFBD>㺭**嚗?
|
||||
|
||||
| <20><>㺭 | 蝐餃<E89D90> | 敹<>‵ | <20>讛膩 |
|
||||
|------|------|------|------|
|
||||
| limit | number | 否 | 获取最近N条消息,默认 50 |
|
||||
| limit | number | <EFBFBD>?| <20>瑕<EFBFBD><E79195><EFBFBD>餈𤨩<E9A488>⊥<EFBFBD><E28AA5>荔<EFBFBD>暺䁅恕 50 |
|
||||
|
||||
**响应**:
|
||||
**<EFBFBD>滚<EFBFBD>**嚗?
|
||||
|
||||
```json
|
||||
{
|
||||
@@ -244,7 +244,7 @@ GET /api/v2/aia/conversations/:id
|
||||
"id": "conv-001",
|
||||
"title": "RCT<43>𠉛弦霈曇恣<E69B87>刻砭",
|
||||
"agentId": "research-design",
|
||||
"agentName": "科研设计小助手",
|
||||
"agentName": "蝘𤑳<EFBFBD>霈曇恣撠誩𨭌<EFBFBD>?,
|
||||
"projectId": null,
|
||||
"createdAt": "2026-01-11T10:00:00Z",
|
||||
"updatedAt": "2026-01-11T12:30:00Z",
|
||||
@@ -260,7 +260,7 @@ GET /api/v2/aia/conversations/:id
|
||||
"id": "msg-002",
|
||||
"role": "assistant",
|
||||
"content": "憟賜<EFBFBD>嚗峕<EFBFBD><EFBFBD>亙葬<EFBFBD>刻挽霈∩<EFBFBD>銝芰<EFBFBD>撠輻<EFBFBD>RCT<EFBFBD>𠉛弦<EFBFBD>寞<EFBFBD>...",
|
||||
"thinkingContent": "用户想设计RCT研究,需要考虑:1)研究目的 2)入排标准 3)样本量 4)随机化方法 5)盲法 6)结局指标...",
|
||||
"thinkingContent": "<EFBFBD>冽<EFBFBD><EFBFBD>唾挽霈﹕CT<EFBFBD>𠉛弦嚗屸<EFBFBD>閬<EFBFBD><EFBFBD><EFBFBD><EFBFBD>嚗?嚗厩<EFBFBD>蝛嗥𤌍<EFBFBD>?2嚗匧<EFBFBD><EFBFBD>埝<EFBFBD><EFBFBD>?3嚗㗇甅<EFBFBD>祇<EFBFBD> 4嚗厰<EFBFBD><EFBFBD>箏<EFBFBD><EFBFBD>寞<EFBFBD> 5嚗厩𤩅瘜?6嚗厩<EFBFBD>撅<EFBFBD><EFBFBD><EFBFBD><EFBFBD>...",
|
||||
"model": "deepseek-v3",
|
||||
"tokens": 1250,
|
||||
"createdAt": "2026-01-11T10:00:30Z"
|
||||
@@ -273,10 +273,10 @@ GET /api/v2/aia/conversations/:id
|
||||
#### 3.4 <20>𣳇膄撖寡<E69296>
|
||||
|
||||
```http
|
||||
DELETE /api/v2/aia/conversations/:id
|
||||
DELETE /api/v1/aia/conversations/:id
|
||||
```
|
||||
|
||||
**响应**:
|
||||
**<EFBFBD>滚<EFBFBD>**嚗?
|
||||
|
||||
```json
|
||||
{
|
||||
@@ -289,22 +289,22 @@ DELETE /api/v2/aia/conversations/:id
|
||||
|
||||
---
|
||||
|
||||
### 4. 消息发送(流式)
|
||||
### 4. 瘨<EFBFBD><EFBFBD><EFBFBD>煾<EFBFBD><EFBFBD><EFBFBD>瘚<EFBFBD><EFBFBD>嚗?
|
||||
|
||||
#### 4.1 <20>煾<EFBFBD><E785BE><EFBFBD><EFBFBD>臬僎<E887AC>瑕<EFBFBD>瘚<EFBFBD><E7989A><EFBFBD>滚<EFBFBD>
|
||||
|
||||
```http
|
||||
POST /api/v2/aia/conversations/:id/messages/stream
|
||||
POST /api/v1/aia/conversations/:id/messages/stream
|
||||
```
|
||||
|
||||
**请求头**:
|
||||
**霂瑟<EFBFBD>憭?*嚗?
|
||||
|
||||
```
|
||||
Content-Type: application/json
|
||||
Accept: text/event-stream
|
||||
```
|
||||
|
||||
**请求体**:
|
||||
**霂瑟<EFBFBD>雿?*嚗?
|
||||
|
||||
```json
|
||||
{
|
||||
@@ -314,17 +314,17 @@ Accept: text/event-stream
|
||||
}
|
||||
```
|
||||
|
||||
**响应(SSE 格式)**:
|
||||
**<EFBFBD>滚<EFBFBD>嚗𠄎SE <20>澆<EFBFBD>嚗?*嚗?
|
||||
|
||||
```
|
||||
event: thinking_start
|
||||
data: {}
|
||||
|
||||
event: thinking_delta
|
||||
data: {"content": "用户上传了数据文件,需要"}
|
||||
data: {"content": "<EFBFBD>冽<EFBFBD>銝𠹺<EFBFBD>鈭<EFBFBD>㺭<EFBFBD>格<EFBFBD>隞塚<EFBFBD><EFBFBD><EFBFBD>閬?}
|
||||
|
||||
event: thinking_delta
|
||||
data: {"content": "进行描述性统计分析..."}
|
||||
data: {"content": "餈𥡝<EFBFBD><EFBFBD>讛膩<EFBFBD>抒<EFBFBD>霈∪<EFBFBD><EFBFBD>?.."}
|
||||
|
||||
event: thinking_end
|
||||
data: {"duration": 3200}
|
||||
@@ -333,7 +333,7 @@ event: message_start
|
||||
data: {"id": "msg-003"}
|
||||
|
||||
event: delta
|
||||
data: {"content": "根据您上传的数据,"}
|
||||
data: {"content": "<EFBFBD>寞旿<EFBFBD>其<EFBFBD>隡删<EFBFBD><EFBFBD>唳旿嚗?}
|
||||
|
||||
event: delta
|
||||
data: {"content": "<22>烐䔉銝箸<E98A9D>餈𥡝<E9A488><F0A5A19D><EFBFBD><EFBFBD>..."}
|
||||
@@ -345,18 +345,18 @@ event: done
|
||||
data: {}
|
||||
```
|
||||
|
||||
**SSE 事件类型**:
|
||||
**SSE 鈭衤辣蝐餃<EFBFBD>**嚗?
|
||||
|
||||
| 鈭衤辣 | <20>讛膩 | <20>唳旿<E594B3>澆<EFBFBD> |
|
||||
|------|------|---------|
|
||||
| `thinking_start` | 开始深度思考 | `{}` |
|
||||
| `thinking_delta` | 思考内容片段 | `{"content": "..."}` |
|
||||
| `thinking_end` | 思考结束 | `{"duration": number}` |
|
||||
| `message_start` | 开始生成回复 | `{"id": "..."}` |
|
||||
| `thinking_start` | 撘<EFBFBD>憪𧢲楛摨行<EFBFBD>肽<EFBFBD>?| `{}` |
|
||||
| `thinking_delta` | <EFBFBD>肽<EFBFBD><EFBFBD><EFBFBD>摰寧<EFBFBD>畾?| `{"content": "..."}` |
|
||||
| `thinking_end` | <EFBFBD>肽<EFBFBD><EFBFBD><EFBFBD><EFBFBD>?| `{"duration": number}` |
|
||||
| `message_start` | 撘<EFBFBD>憪讠<EFBFBD><EFBFBD>𣂼<EFBFBD>憭?| `{"id": "..."}` |
|
||||
| `delta` | <20>𧼮<EFBFBD><F0A7BCAE><EFBFBD>捆<EFBFBD><E68D86>挾 | `{"content": "..."}` |
|
||||
| `message_end` | <20>𧼮<EFBFBD>蝏𤘪<E89D8F> | `{"id": "...", "tokens": number, "model": "..."}` |
|
||||
| `error` | <20>𤑳<EFBFBD><F0A491B3>躰秤 | `{"code": "...", "message": "..."}` |
|
||||
| `done` | 流结束 | `{}` |
|
||||
| `done` | 瘚<EFBFBD><EFBFBD><EFBFBD>?| `{}` |
|
||||
|
||||
---
|
||||
|
||||
@@ -365,22 +365,22 @@ data: {}
|
||||
#### 5.1 銝𠹺<E98A9D><F0A0B9BA><EFBFBD>辣
|
||||
|
||||
```http
|
||||
POST /api/v2/aia/conversations/:id/attachments
|
||||
POST /api/v1/aia/conversations/:id/attachments
|
||||
```
|
||||
|
||||
**请求头**:
|
||||
**霂瑟<EFBFBD>憭?*嚗?
|
||||
|
||||
```
|
||||
Content-Type: multipart/form-data
|
||||
```
|
||||
|
||||
**请求体(FormData)**:
|
||||
**霂瑟<EFBFBD>雿橒<EFBFBD>FormData嚗?*嚗?
|
||||
|
||||
| 摮埈挾 | 蝐餃<E89D90> | 敹<>‵ | <20>讛膩 |
|
||||
|------|------|------|------|
|
||||
| file | File | 是 | 文件(PDF/Word/TXT/Excel,最大20MB) |
|
||||
| file | File | <EFBFBD>?| <20><>辣嚗㇊DF/Word/TXT/Excel嚗峕<EFBFBD>憭?0MB嚗?|
|
||||
|
||||
**响应**:
|
||||
**<EFBFBD>滚<EFBFBD>**嚗?
|
||||
|
||||
```json
|
||||
{
|
||||
@@ -399,13 +399,13 @@ Content-Type: multipart/form-data
|
||||
}
|
||||
```
|
||||
|
||||
**错误码**:
|
||||
**<EFBFBD>躰秤<EFBFBD>?*嚗?
|
||||
|
||||
| 错误码 | 描述 |
|
||||
| <EFBFBD>躰秤<EFBFBD>?| <20>讛膩 |
|
||||
|--------|------|
|
||||
| `ATTACHMENT_TOO_LARGE` | <20><>辣頞<E8BEA3><E9A09E> 20MB |
|
||||
| `ATTACHMENT_TYPE_NOT_SUPPORTED` | 銝齿𣈲<E9BDBF><F0A388B2><EFBFBD><EFBFBD><EFBFBD>辣蝐餃<E89D90> |
|
||||
| `ATTACHMENT_LIMIT_EXCEEDED` | 附件数量超过上限(5个) |
|
||||
| `ATTACHMENT_LIMIT_EXCEEDED` | <EFBFBD><EFBFBD>辣<EFBFBD>圈<EFBFBD>頞<EFBFBD><EFBFBD>銝𢠃<EFBFBD>嚗?銝迎<E98A9D> |
|
||||
| `TEXT_EXTRACTION_FAILED` | <20><>𧋦<EFBFBD>𣂼<EFBFBD>憭梯揖 |
|
||||
|
||||
---
|
||||
@@ -415,10 +415,10 @@ Content-Type: multipart/form-data
|
||||
#### 6.1 <20>瑕<EFBFBD>憿寧𤌍<E5AFA7>𡑒”
|
||||
|
||||
```http
|
||||
GET /api/v2/aia/projects
|
||||
GET /api/v1/aia/projects
|
||||
```
|
||||
|
||||
**响应**:
|
||||
**<EFBFBD>滚<EFBFBD>**嚗?
|
||||
|
||||
```json
|
||||
{
|
||||
@@ -427,8 +427,8 @@ GET /api/v2/aia/projects
|
||||
"projects": [
|
||||
{
|
||||
"id": "proj-001",
|
||||
"name": "糖尿病研究项目",
|
||||
"description": "2型糖尿病患者生活方式干预研究",
|
||||
"name": "蝟硋倏<EFBFBD><EFBFBD><EFBFBD>蝛園★<EFBFBD>?,
|
||||
"description": "2<EFBFBD>讠<EFBFBD>撠輻<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>瘣餅䲮撘誩僕憸<EFBFBD><EFBFBD>蝛?,
|
||||
"conversationCount": 5,
|
||||
"createdAt": "2026-01-01T10:00:00Z",
|
||||
"updatedAt": "2026-01-11T12:00:00Z"
|
||||
@@ -449,20 +449,20 @@ GET /api/v2/aia/projects
|
||||
"code": -1,
|
||||
"error": {
|
||||
"code": "CONVERSATION_NOT_FOUND",
|
||||
"message": "对话不存在"
|
||||
"message": "撖寡<EFBFBD>銝滚<EFBFBD><EFBFBD>?
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
### 通用错误码
|
||||
### <EFBFBD>𡁶鍂<EFBFBD>躰秤<EFBFBD>?
|
||||
|
||||
| 错误码 | HTTP 状态码 | 描述 |
|
||||
| <EFBFBD>躰秤<EFBFBD>?| HTTP <EFBFBD>嗆<EFBFBD><EFBFBD><EFBFBD> | <20>讛膩 |
|
||||
|--------|------------|------|
|
||||
| `UNAUTHORIZED` | 401 | 未授权 |
|
||||
| `FORBIDDEN` | 403 | 无权限 |
|
||||
| `NOT_FOUND` | 404 | 资源不存在 |
|
||||
| `UNAUTHORIZED` | 401 | <EFBFBD>芣<EFBFBD><EFBFBD>?|
|
||||
| `FORBIDDEN` | 403 | <EFBFBD>䭾<EFBFBD><EFBFBD>?|
|
||||
| `NOT_FOUND` | 404 | 韏<EFBFBD><EFBFBD>銝滚<EFBFBD><EFBFBD>?|
|
||||
| `VALIDATION_ERROR` | 400 | <20><>㺭撉諹<E69289>憭梯揖 |
|
||||
| `INTERNAL_ERROR` | 500 | 服务器内部错误 |
|
||||
| `INTERNAL_ERROR` | 500 | <EFBFBD>滚𦛚<EFBFBD>典<EFBFBD><EFBFBD>券<EFBFBD>霂?|
|
||||
| `LLM_ERROR` | 500 | LLM 靚<>鍂憭梯揖 |
|
||||
| `RATE_LIMITED` | 429 | 霂瑟<E99C82>餈<EFBFBD><E9A488>憸𤑳<E686B8> |
|
||||
|
||||
@@ -475,13 +475,13 @@ GET /api/v2/aia/projects
|
||||
```typescript
|
||||
interface Attachment {
|
||||
id: string; // <20><>辣ID
|
||||
filename: string; // 原始文件名
|
||||
filename: string; // <EFBFBD>笔<EFBFBD><EFBFBD><EFBFBD>辣<EFBFBD>?
|
||||
mimeType: string; // MIME 蝐餃<E89D90>
|
||||
size: number; // <20><>辣憭批<E686AD>嚗<EFBFBD><E59A97><EFBFBD><EFBFBD><EFBFBD>
|
||||
ossUrl: string; // OSS 摮睃<E691AE><E79D83>啣<EFBFBD>
|
||||
textContent?: string; // <20>𣂼<EFBFBD><F0A382BC><EFBFBD><EFBFBD><EFBFBD>砍<EFBFBD>摰對<E691B0>摮睃<E691AE><E79D83>嗆⏛<E59786>哨<EFBFBD>
|
||||
tokenCount: number; // 文本 Token 数
|
||||
truncated: boolean; // 是否被截断(超过30K tokens)
|
||||
tokenCount: number; // <EFBFBD><EFBFBD>𧋦 Token <EFBFBD>?
|
||||
truncated: boolean; // <EFBFBD>臬炏鋡急⏛<EFBFBD>哨<EFBFBD>頞<EFBFBD><EFBFBD>30K tokens嚗?
|
||||
createdAt: string; // <20>𥕦遣<F0A595A6>園𡢿
|
||||
}
|
||||
```
|
||||
@@ -494,7 +494,7 @@ interface Message {
|
||||
conversationId: string;
|
||||
role: 'user' | 'assistant';
|
||||
content: string;
|
||||
thinkingContent?: string; // 深度思考内容
|
||||
thinkingContent?: string; // 瘛勗漲<EFBFBD>肽<EFBFBD><EFBFBD><EFBFBD>摰?
|
||||
attachments?: Attachment[];
|
||||
model?: string;
|
||||
tokens?: number;
|
||||
@@ -505,15 +505,15 @@ interface Message {
|
||||
|
||||
---
|
||||
|
||||
## 🧪 测试示例(REST Client)
|
||||
## <EFBFBD>妒 瘚贝<E7989A>蝷箔<E89DB7>嚗㇌EST Client嚗?
|
||||
|
||||
```http
|
||||
### 获取智能体列表
|
||||
GET {{baseUrl}}/api/v2/aia/agents
|
||||
### <EFBFBD>瑕<EFBFBD><EFBFBD>箄<EFBFBD>雿枏<EFBFBD>銵?
|
||||
GET {{baseUrl}}/api/v1/aia/agents
|
||||
Authorization: Bearer {{token}}
|
||||
|
||||
### <EFBFBD>誩㦛頝舐眏
|
||||
POST {{baseUrl}}/api/v2/aia/intent/route
|
||||
POST {{baseUrl}}/api/v1/aia/intent/route
|
||||
Authorization: Bearer {{token}}
|
||||
Content-Type: application/json
|
||||
|
||||
@@ -522,7 +522,7 @@ Content-Type: application/json
|
||||
}
|
||||
|
||||
### <EFBFBD>𥕦遣撖寡<EFBFBD>
|
||||
POST {{baseUrl}}/api/v2/aia/conversations
|
||||
POST {{baseUrl}}/api/v1/aia/conversations
|
||||
Authorization: Bearer {{token}}
|
||||
Content-Type: application/json
|
||||
|
||||
@@ -531,8 +531,8 @@ Content-Type: application/json
|
||||
"title": "瘚贝<EFBFBD>撖寡<EFBFBD>"
|
||||
}
|
||||
|
||||
### 发送消息(流式)
|
||||
POST {{baseUrl}}/api/v2/aia/conversations/{{conversationId}}/messages/stream
|
||||
### <EFBFBD>煾<EFBFBD><EFBFBD><EFBFBD><EFBFBD>荔<EFBFBD>瘚<EFBFBD><EFBFBD>嚗?
|
||||
POST {{baseUrl}}/api/v1/aia/conversations/{{conversationId}}/messages/stream
|
||||
Authorization: Bearer {{token}}
|
||||
Content-Type: application/json
|
||||
Accept: text/event-stream
|
||||
@@ -543,7 +543,7 @@ Accept: text/event-stream
|
||||
}
|
||||
|
||||
### 銝𠹺<EFBFBD><EFBFBD><EFBFBD>辣
|
||||
POST {{baseUrl}}/api/v2/aia/conversations/{{conversationId}}/attachments
|
||||
POST {{baseUrl}}/api/v1/aia/conversations/{{conversationId}}/attachments
|
||||
Authorization: Bearer {{token}}
|
||||
Content-Type: multipart/form-data; boundary=----WebKitFormBoundary
|
||||
|
||||
@@ -568,3 +568,4 @@ Content-Type: application/vnd.openxmlformats-officedocument.spreadsheetml.sheet
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
# AIA V2.1 å‰<C3A5>端组件设计
|
||||
|
||||
> **版本**:V2.1
|
||||
> **创建日期**:2026-01-11
|
||||
> **创建日期**�026-01-11
|
||||
> **æŠ€æœ¯æ ˆ**:React 19 + TypeScript 5 + Ant Design 6 + Ant Design X 2.1
|
||||
|
||||
---
|
||||
@@ -11,45 +11,45 @@
|
||||
```
|
||||
frontend-v2/src/modules/aia/
|
||||
├── pages/
|
||||
│ ├── Dashboard.tsx # 智能体大厅(首页)
|
||||
│ └── Workspace.tsx # 对话工作台
|
||||
� ├── Dashboard.tsx # 智能体大厅(首页�
|
||||
â”? └── Workspace.tsx # 对è¯<EFBFBD>工作å<EFBFBD>?
|
||||
├── components/
|
||||
│ ├── AgentPipeline/
|
||||
│ │ ├── index.tsx # 5阶段流水线容器
|
||||
│ │ ├── StageColumn.tsx # 单阶段列
|
||||
│ │ └── AgentCard.tsx # 智能体卡片
|
||||
│ ├── IntentSearch/
|
||||
│ │ ├── index.tsx # 意图搜索框
|
||||
│ │ └── SuggestionDropdown.tsx # 建议下拉框
|
||||
│ ├── ConversationList/
|
||||
│ │ ├── index.tsx # 历史会话列表
|
||||
│ │ └── ConversationItem.tsx # 会话项
|
||||
│ ├── MessageList/
|
||||
│ │ ├── index.tsx # 消息列表
|
||||
│ │ ├── UserMessage.tsx # 用户消息
|
||||
│ │ ├── AssistantMessage.tsx # AI回复
|
||||
│ │ └── ThinkingBlock.tsx # 深度思考折叠块
|
||||
│ ├── Attachment/
|
||||
│ │ ├── AttachmentUpload.tsx # 附件上传
|
||||
│ │ ├── AttachmentCard.tsx # 附件卡片
|
||||
│ │ └── AttachmentPreview.tsx # 附件预览
|
||||
│ ├── SlashCommands/
|
||||
│ │ └── index.tsx # 快捷指令菜单
|
||||
│ └── ActionBar/
|
||||
│ └── index.tsx # 结果操作栏
|
||||
� ├── AgentPipeline/
|
||||
â”? â”? ├── index.tsx # 5阶段æµ<EFBFBD>水线容å™?
|
||||
â”? â”? ├── StageColumn.tsx # å<EFBFBD>•阶段列
|
||||
â”? â”? └── AgentCard.tsx # 智能体å<EFBFBD>¡ç‰?
|
||||
� ├── IntentSearch/
|
||||
â”? â”? ├── index.tsx # æ„<EFBFBD>图æ<EFBFBD>œç´¢æ¡?
|
||||
� � └── SuggestionDropdown.tsx # 建议下拉�
|
||||
� ├── ConversationList/
|
||||
â”? â”? ├── index.tsx # 历å<EFBFBD>²ä¼šè¯<EFBFBD>列表
|
||||
â”? â”? └── ConversationItem.tsx # 会è¯<EFBFBD>é¡?
|
||||
� ├── MessageList/
|
||||
â”? â”? ├── index.tsx # 消æ<EFBFBD>¯åˆ—表
|
||||
â”? â”? ├── UserMessage.tsx # 用户消æ<EFBFBD>¯
|
||||
â”? â”? ├── AssistantMessage.tsx # AI回å¤<EFBFBD>
|
||||
â”? â”? └── ThinkingBlock.tsx # 深度æ€<EFBFBD>考折å<EFBFBD> å<EFBFBD>—
|
||||
� ├── Attachment/
|
||||
â”? â”? ├── AttachmentUpload.tsx # 附件上ä¼
|
||||
â”? â”? ├── AttachmentCard.tsx # 附件å<EFBFBD>¡ç‰‡
|
||||
� � └── AttachmentPreview.tsx # 附件预览
|
||||
� ├── SlashCommands/
|
||||
â”? â”? └── index.tsx # å¿«æ<EFBFBD>·æŒ‡ä»¤è<EFBFBD>œå<EFBFBD>•
|
||||
� └── ActionBar/
|
||||
â”? └── index.tsx # 结果æ“<EFBFBD>作æ ?
|
||||
├── hooks/
|
||||
│ ├── useConversation.ts # 对话管理
|
||||
│ ├── useAgents.ts # 智能体数据
|
||||
│ ├── useIntentRouter.ts # 意图路由
|
||||
│ ├── useStreamMessage.ts # 流式消息
|
||||
│ └── useAttachment.ts # 附件上传
|
||||
â”? ├── useConversation.ts # 对è¯<EFBFBD>管ç<EFBFBD>†
|
||||
â”? ├── useAgents.ts # 智能体数æ<EFBFBD>?
|
||||
â”? ├── useIntentRouter.ts # æ„<EFBFBD>图路由
|
||||
â”? ├── useStreamMessage.ts # æµ<EFBFBD>å¼<EFBFBD>消æ<EFBFBD>¯
|
||||
â”? └── useAttachment.ts # 附件上ä¼
|
||||
├── api/
|
||||
│ └── index.ts # API 封装
|
||||
â”? └── index.ts # API å°<EFBFBD>装
|
||||
├── types/
|
||||
│ └── index.ts # TypeScript 类型
|
||||
� └── index.ts # TypeScript 类型
|
||||
├── styles/
|
||||
│ ├── dashboard.module.css # Dashboard 样式
|
||||
│ └── workspace.module.css # Workspace 样式
|
||||
â”? ├── dashboard.module.css # Dashboard æ ·å¼<EFBFBD>
|
||||
â”? └── workspace.module.css # Workspace æ ·å¼<EFBFBD>
|
||||
└── index.tsx # 模å<C2A1>—å…¥å<C2A5>£ + 路由
|
||||
```
|
||||
|
||||
@@ -68,7 +68,7 @@ frontend-v2/src/modules/aia/
|
||||
--stage-write: #F59E0B; /* 橙色 - 论文撰写 */
|
||||
--stage-publish: #EF4444; /* 红色 - æˆ<C3A6>æžœå<C593>‘布 */
|
||||
|
||||
/* 功能色 */
|
||||
/* 功能�*/
|
||||
--ai-assistant: #6366F1; /* AI助手主色 */
|
||||
--thinking-bg: #F3F4F6; /* æ€<C3A6>考å<C692>—背景 */
|
||||
--thinking-border: #E5E7EB; /* æ€<C3A6>考å<C692>—边框 */
|
||||
@@ -108,7 +108,7 @@ frontend-v2/src/modules/aia/
|
||||
|
||||
## 📄 页é<C2B5>¢è®¾è®¡
|
||||
|
||||
### 1. Dashboard(智能体大厅)
|
||||
### 1. Dashboard(智能体大厅�
|
||||
|
||||
```tsx
|
||||
// pages/Dashboard.tsx
|
||||
@@ -119,7 +119,7 @@ import { AgentPipeline } from '../components/AgentPipeline';
|
||||
export const Dashboard: React.FC = () => {
|
||||
return (
|
||||
<div className={styles.dashboard}>
|
||||
{/* 顶部意图搜索框 */}
|
||||
{/* 顶部æ„<EFBFBD>图æ<EFBFBD>œç´¢æ¡?*/}
|
||||
<header className={styles.header}>
|
||||
<h1>AI 智能助手</h1>
|
||||
<p>有什么å<EFBFBD>¯ä»¥å¸®åŠ©æ‚¨çš„ï¼Ÿ</p>
|
||||
@@ -135,14 +135,14 @@ export const Dashboard: React.FC = () => {
|
||||
};
|
||||
```
|
||||
|
||||
**布局特点**:
|
||||
**布局特点**�
|
||||
- 顶部居ä¸å¤§æ<C2A7>œç´¢æ¡†
|
||||
- 5阶段流水线横向平铺(桌面)/ 纵向滚动(移动)
|
||||
- Gemini 风格大留白
|
||||
- 5阶段æµ<EFBFBD>水线横å<EFBFBD>‘平铺(桌é<EFBFBD>¢ï¼? 纵å<C2B5>‘滚动(移动)
|
||||
- Gemini é£Žæ ¼å¤§ç•™ç™?
|
||||
|
||||
---
|
||||
|
||||
### 2. Workspace(对话工作台)
|
||||
### 2. Workspace(对è¯<EFBFBD>工作å<EFBFBD>°ï¼?
|
||||
|
||||
```tsx
|
||||
// pages/Workspace.tsx
|
||||
@@ -201,7 +201,7 @@ export const Workspace: React.FC = () => {
|
||||
|
||||
## 🧩 组件详细设计
|
||||
|
||||
### 1. AgentPipeline(5阶段流水线)
|
||||
### 1. AgentPipelineï¼?阶段æµ<C3A6>水线)
|
||||
|
||||
```tsx
|
||||
// components/AgentPipeline/index.tsx
|
||||
@@ -238,7 +238,7 @@ export const AgentPipeline: React.FC<AgentPipelineProps> = ({ onAgentClick }) =>
|
||||
};
|
||||
```
|
||||
|
||||
**样式特点**:
|
||||
**æ ·å¼<EFBFBD>特点**ï¼?
|
||||
```css
|
||||
.pipeline {
|
||||
display: flex;
|
||||
@@ -258,7 +258,7 @@ export const AgentPipeline: React.FC<AgentPipelineProps> = ({ onAgentClick }) =>
|
||||
|
||||
---
|
||||
|
||||
### 2. IntentSearch(意图搜索框)
|
||||
### 2. IntentSearch(æ„<EFBFBD>图æ<EFBFBD>œç´¢æ¡†ï¼?
|
||||
|
||||
```tsx
|
||||
// components/IntentSearch/index.tsx
|
||||
@@ -307,14 +307,14 @@ export const IntentSearch: React.FC = () => {
|
||||
|
||||
---
|
||||
|
||||
### 3. ThinkingBlock(深度思考折叠块)
|
||||
### 3. ThinkingBlock(深度æ€<EFBFBD>考折å<EFBFBD> å<EFBFBD>—ï¼?
|
||||
|
||||
```tsx
|
||||
// components/MessageList/ThinkingBlock.tsx
|
||||
|
||||
interface ThinkingBlockProps {
|
||||
content: string;
|
||||
duration?: number; // 思考耗时(秒)
|
||||
duration?: number; // æ€<EFBFBD>考耗时(秒ï¼?
|
||||
isStreaming?: boolean; // 是å<C2AF>¦æ£åœ¨ç”Ÿæˆ<C3A6>
|
||||
}
|
||||
|
||||
@@ -328,7 +328,7 @@ export const ThinkingBlock: React.FC<ThinkingBlockProps> = ({
|
||||
|
||||
useEffect(() => {
|
||||
if (!isStreaming && expanded) {
|
||||
// 完成后 1.5s 自动收起
|
||||
// 完æˆ<EFBFBD>å<EFBFBD>?1.5s 自动收起
|
||||
const timer = setTimeout(() => setExpanded(false), 1500);
|
||||
return () => clearTimeout(timer);
|
||||
}
|
||||
@@ -344,7 +344,7 @@ export const ThinkingBlock: React.FC<ThinkingBlockProps> = ({
|
||||
{isStreaming ? <LoadingOutlined spin /> : <BulbOutlined />}
|
||||
</span>
|
||||
<span className={styles.title}>
|
||||
{isStreaming ? '正在深度思考...' : `已深度思考 (耗时 ${duration?.toFixed(1)}s)`}
|
||||
{isStreaming ? 'æ£åœ¨æ·±åº¦æ€<EFBFBD>è€?..' : `已深度æ€<EFBFBD>è€?(耗时 ${duration?.toFixed(1)}s)`}
|
||||
</span>
|
||||
<span className={styles.expandIcon}>
|
||||
{expanded ? <UpOutlined /> : <DownOutlined />}
|
||||
@@ -363,7 +363,7 @@ export const ThinkingBlock: React.FC<ThinkingBlockProps> = ({
|
||||
};
|
||||
```
|
||||
|
||||
**样式**:
|
||||
**æ ·å¼<EFBFBD>**ï¼?
|
||||
```css
|
||||
.thinkingBlock {
|
||||
background: var(--thinking-bg);
|
||||
@@ -412,18 +412,18 @@ export const AttachmentUpload: React.FC<AttachmentUploadProps> = ({
|
||||
|
||||
const handleUpload = async (file: File) => {
|
||||
if (attachments.length >= maxCount) {
|
||||
message.error(`最多上传 ${maxCount} 个附件`);
|
||||
message.error(`最多上�${maxCount} 个附件`);
|
||||
return false;
|
||||
}
|
||||
|
||||
// æ–‡ä»¶ç±»åž‹æ ¡éªŒ
|
||||
const allowedTypes = ['application/pdf', 'application/vnd.openxmlformats-officedocument.wordprocessingml.document', 'text/plain', 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet'];
|
||||
if (!allowedTypes.includes(file.type)) {
|
||||
message.error('仅支持 PDF、Word、TXT、Excel 文件');
|
||||
message.error('仅支æŒ?PDFã€<C3A3>Wordã€<C3A3>TXTã€<C3A3>Excel 文件');
|
||||
return false;
|
||||
}
|
||||
|
||||
// 文件大小校验(20MB)
|
||||
// 文件大å°<EFBFBD>æ ¡éªŒï¼?0MBï¼?
|
||||
if (file.size > 20 * 1024 * 1024) {
|
||||
message.error('文件大å°<C3A5>ä¸<C3A4>能超过 20MB');
|
||||
return false;
|
||||
@@ -448,7 +448,7 @@ export const AttachmentUpload: React.FC<AttachmentUploadProps> = ({
|
||||
</Button>
|
||||
</Upload>
|
||||
|
||||
{/* 已上传附件列表 */}
|
||||
{/* å·²ä¸Šä¼ é™„ä»¶åˆ—è¡?*/}
|
||||
<div className={styles.attachmentList}>
|
||||
{attachments.map(att => (
|
||||
<AttachmentCard
|
||||
@@ -483,10 +483,10 @@ interface SlashCommandsProps {
|
||||
}
|
||||
|
||||
const commands: SlashCommand[] = [
|
||||
{ key: 'polish', icon: '✨', label: '润色', description: '优化文本表达' },
|
||||
{ key: 'polish', icon: '�, label: '润色', description: '优化文本表达' },
|
||||
{ key: 'expand', icon: 'ðŸ“<EFBFBD>', label: '扩写', description: '扩展内容细节' },
|
||||
{ key: 'translate', icon: 'ðŸŒ<EFBFBD>', label: '翻译', description: 'ä¸è‹±äº’译' },
|
||||
{ key: 'export', icon: '📄', label: '导出Word', description: '导出为 Word 文档' },
|
||||
{ key: 'export', icon: '📄', label: '导出Word', description: '导出�Word 文档' },
|
||||
];
|
||||
|
||||
export const SlashCommands: React.FC<SlashCommandsProps> = ({
|
||||
@@ -544,7 +544,7 @@ export const SlashCommands: React.FC<SlashCommandsProps> = ({
|
||||
|
||||
---
|
||||
|
||||
### 6. ActionBar(结果操作栏)
|
||||
### 6. ActionBar(结果æ“<EFBFBD>作æ <EFBFBD>ï¼?
|
||||
|
||||
```tsx
|
||||
// components/ActionBar/index.tsx
|
||||
@@ -623,7 +623,7 @@ export function useConversation(conversationId?: string): UseConversationReturn
|
||||
}
|
||||
}, [conversationId]);
|
||||
|
||||
// 发送消息(流式)
|
||||
// å<EFBFBD>‘é€<EFBFBD>消æ<EFBFBD>¯ï¼ˆæµ<EFBFBD>å¼<EFBFBD>ï¼?
|
||||
const sendMessage = async (content: string, attachmentIds?: string[]) => {
|
||||
setIsLoading(true);
|
||||
|
||||
@@ -637,7 +637,7 @@ export function useConversation(conversationId?: string): UseConversationReturn
|
||||
};
|
||||
setMessages(prev => [...prev, userMessage]);
|
||||
|
||||
// 初始化 AI 消息
|
||||
// åˆ<EFBFBD>å§‹åŒ?AI 消æ<CB86>¯
|
||||
const aiMessage: Message = {
|
||||
id: `temp-ai-${Date.now()}`,
|
||||
role: 'assistant',
|
||||
@@ -769,7 +769,7 @@ export function useStreamMessage() {
|
||||
|
||||
---
|
||||
|
||||
## 📱 响应式设计
|
||||
## 📱 å“<C3A5>应å¼<C3A5>设è®?
|
||||
|
||||
### æ–点ç–ç•¥
|
||||
|
||||
@@ -783,19 +783,19 @@ const breakpoints = {
|
||||
};
|
||||
```
|
||||
|
||||
### Dashboard 响应式
|
||||
### Dashboard å“<EFBFBD>应å¼?
|
||||
|
||||
| æ–点 | 布局 |
|
||||
|------|------|
|
||||
| `< 768px` | æµ<C3A6>水线纵å<C2B5>‘滚动,å<C592>¡ç‰‡å<E280A1>•列 |
|
||||
| `≥ 768px` | 流水线横向 5 列 |
|
||||
| `â‰?768px` | æµ<EFBFBD>水线横å<EFBFBD>?5 åˆ?|
|
||||
|
||||
### Workspace 响应式
|
||||
### Workspace å“<EFBFBD>应å¼?
|
||||
|
||||
| æ–点 | 布局 |
|
||||
|------|------|
|
||||
| `< 768px` | ä¾§è¾¹æ <C3A6>éš<C3A9>è—<C3A8>(抽屉滑出),输入框键盘适é…<C3A9> |
|
||||
| `≥ 768px` | 侧边栏固定显示 240px |
|
||||
| `â‰?768px` | ä¾§è¾¹æ <EFBFBD>固定显ç¤?240px |
|
||||
|
||||
---
|
||||
|
||||
@@ -883,3 +883,4 @@ export interface SlashCommand {
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user