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:
2026-01-14 19:15:01 +08:00
parent 3d35e9c58b
commit 1b53ab9d52
386 changed files with 52096 additions and 65238 deletions

View File

@@ -1,29 +1,29 @@
# 妯″潡閰嶇疆鏇存柊鎶ュ憡
> **更新时间:** 2025-11-12
> **更新内容:** 按照平台架构文档调整模块配置
> **参考文档:** `docs/01-平台基础层/06-前端架构/01-前端总体架构设计.md`
> **鏇存柊鏃堕棿锛?* 2025-11-12
> **鏇存柊鍐呭<EFBFBD>锛?* 鎸夌収骞冲彴鏋舵瀯鏂囨。璋冩暣妯″潡閰嶇疆
> **鍙傝€冩枃妗o細** `docs/01-骞冲彴鍩虹<EFBFBD>灞?06-鍓嶇<E98D93>鏋舵瀯/01-鍓嶇<E98D93>鎬讳綋鏋舵瀯璁捐<E79281>.md`
---
## ✅ 更新内容
## 鉁?鏇存柊鍐呭<E98D90>
### 1. 模块数量和顺序调整
### 1. 妯″潡鏁伴噺鍜岄『搴忚皟鏁?
**调整前5个模块**
**璋冩暣鍓嶏紙5涓<EFBFBD>ā鍧楋級锛?*
1. AI鏅鸿兘鏂囩尞 (asl) - `/literature`
2. AI鏅鸿兘闂<E58598>瓟 (aia) - `/ai-qa`
3. 知识库 (pkb) - `/knowledge`
4. 审稿系统 (rvw) - `/review`
3. 鐭ヨ瘑搴?(pkb) - `/knowledge`
4. 瀹$ǹ绯荤粺 (rvw) - `/review` 鉂?
5. 鏁版嵁娓呮礂 (dc) - `/data-cleaning`
**调整后6个模块**
1. **AI问答** (ai-qa) - `/ai-qa`
2. **AI智能文献** (literature-platform) - `/literature`
3. **知识库** (knowledge-base) - `/knowledge-base`
4. **智能数据清洗** (data-cleaning) - `/data-cleaning`
5. **智能统计分析** (statistical-analysis) - `/intelligent-analysis` ✨ 新增
6. **统计分析工具** (statistical-tools) - `/statistical-tools` ✨ 新增
**璋冩暣鍚庯紙6涓<EFBFBD>ā鍧楋級锛?*
1. **AI<EFBFBD>** (ai-qa) - `/ai-qa` 鉁?
2. **AI鏅鸿兘鏂囩尞** (literature-platform) - `/literature` 鉁?
3. **鐭ヨ瘑搴?* (knowledge-base) - `/knowledge-base` 鉁?
4. **鏅鸿兘鏁版嵁娓呮礂** (data-cleaning) - `/data-cleaning` 鉁?
5. **鏅鸿兘缁熻<EFBFBD>鍒嗘瀽** (statistical-analysis) - `/intelligent-analysis` 鉁?鏂板<E98F82>
6. **缁熻<EFBFBD>鍒嗘瀽宸ュ叿** (statistical-tools) - `/statistical-tools` 鉁?鏂板<E98F82>
---
@@ -31,19 +31,19 @@
### 1. 妯″潡娉ㄥ唽涓<E594BD>績 (moduleRegistry.ts)
#### 修改的模块
#### <EFBFBD>敼鐨勬ā鍧?
| 项目 | 修改前 | 修改后 | 说明 |
| 椤圭洰 | 淇<>敼鍓?| 淇<>敼鍚?| 璇存槑 |
|------|--------|--------|------|
| **妯″潡1** | AI鏅鸿兘鏂囩尞锛堥<E9949B>浣嶏級 | AI闂<49>瓟锛堥<E9949B>浣嶏級 | 璋冩暣椤哄簭 |
| **妯″潡ID** | `aia` | `ai-qa` | 缁熶竴鍛藉悕瑙勮寖 |
| **妯″潡ID** | `asl` | `literature-platform` | 缁熶竴鍛藉悕瑙勮寖 |
| **妯″潡ID** | `pkb` | `knowledge-base` | 缁熶竴鍛藉悕瑙勮寖 |
| **路由路径** | `/knowledge` | `/knowledge-base` | 按文档规范 |
| **<EFBFBD>敱璺<EFBFBD>** | `/knowledge` | `/knowledge-base` | 鎸夋枃妗<EFBFBD>鑼?|
#### 新增的模块
#### 鏂板<EFBFBD>鐨勬ā鍧?
**模块5智能统计分析**
**妯″潡5锛氭櫤鑳界粺璁″垎鏋?*
```typescript
{
id: 'statistical-analysis',
@@ -58,7 +58,7 @@
}
```
**模块6统计分析工具**
**妯″潡6锛氱粺璁″垎鏋愬伐鍏?*
```typescript
{
id: 'statistical-tools',
@@ -73,9 +73,9 @@
}
```
#### 删除的模块
#### 鍒犻櫎鐨勬ā鍧?
- **审稿系统** (rvw) - 架构文档中未定义此模块
- 鉂?**瀹$ǹ绯荤粺** (rvw) - 鏋舵瀯鏂囨。涓<EFBFBD>湭瀹氫箟姝ゆā鍧?
---
@@ -91,50 +91,50 @@ isExternal?: boolean
### 3. 妯″潡鐩<E6BDA1>綍缁撴瀯
**新增目录:**
- `src/modules/ssa/index.tsx` - 智能统计分析模块
- `src/modules/st/index.tsx` - 统计分析工具模块
**鏂板<EFBFBD><EFBFBD>綍锛?*
- 鉁?`src/modules/ssa/index.tsx` - 鏅鸿兘缁熻<EFBFBD>鍒嗘瀽妯″潡
- 鉁?`src/modules/st/index.tsx` - 缁熻<EFBFBD>鍒嗘瀽宸ュ叿妯″潡
**删除目录:**
- `src/modules/rvw/index.tsx` - 审稿系统模块
**鍒犻櫎鐩<EFBFBD>綍锛?*
- 鉂?`src/modules/rvw/index.tsx` - 瀹$ǹ绯荤粺妯″潡
---
### 4. 棣栭〉 (HomePage.tsx)
**统计数据更新:**
- 业务模块数量5 → **6**
**缁熻<EFBFBD>鏁版嵁鏇存柊锛?*
- 涓氬姟妯″潡鏁伴噺锛? 鈫?**6**
**状态标签逻辑优化:**
**鐘舵€佹爣绛鹃€昏緫浼樺寲锛?*
```typescript
// AI智能文献(开发中)
// AI鏅鸿兘鏂囩尞锛堝紑鍙戜腑锛?
{!module.placeholder && module.id === 'literature-platform' && (
<span className="text-green-600 bg-green-50">Week 3 </span>
<span className="text-green-600 bg-green-50">Week 3 ?/span>
)}
// 外部模块Java团队
// 澶栭儴妯″潡锛圝ava鍥㈤槦锛?
{module.placeholder && module.isExternal && (
<span className="text-purple-600 bg-purple-50"></span>
)}
// 鍏朵粬鍗犱綅妯″潡
{module.placeholder && !module.isExternal && (
<span className="text-orange-500 bg-orange-50"></span>
<span className="text-orange-500 bg-orange-50">?/span>
)}
```
---
## 📊 模块对照表
## 馃搳 妯″潡瀵圭収琛?
| 序号 | 模块名称 | 模块ID | 路由路径 | 开发状态 | 权限要求 | 特殊标记 |
| 搴忓彿 | 妯″潡鍚嶇О | 妯″潡ID | 璺<>敱璺<E695B1>緞 | 寮€鍙戠姸鎬?| 鏉冮檺瑕佹眰 | 鐗规畩鏍囪<E98F8D> |
|------|---------|--------|---------|---------|---------|---------|
| 1 | AI问答 | `ai-qa` | `/ai-qa` | 规划中 | 基础版+ | - |
| 2 | AI智能文献 | `literature-platform` | `/literature` | Week 3开发 | 高级版+ | 支持独立运行 |
| 3 | 知识库 | `knowledge-base` | `/knowledge-base` | 规划中 | 基础版+ | - |
| 4 | 智能数据清洗 | `data-cleaning` | `/data-cleaning` | 规划中 | 高级版+ | - |
| 5 | 智能统计分析 | `statistical-analysis` | `/intelligent-analysis` | 外部集成 | 旗舰版 | Java团队开发 |
| 6 | 统计分析工具 | `statistical-tools` | `/statistical-tools` | 外部集成 | 旗舰版 | Java团队开发 |
| 1 | AI<EFBFBD> | `ai-qa` | `/ai-qa` | 瑙勫垝涓?| 鍩虹<E98DA9>鐗? | - |
| 2 | AI鏅鸿兘鏂囩尞 | `literature-platform` | `/literature` | Week 3寮€鍙?| 楂樼骇鐗? | 鏀<>寔鐙<E5AF94>珛杩愯<E69DA9> |
| 3 | 鐭ヨ瘑搴?| `knowledge-base` | `/knowledge-base` | 瑙勫垝涓?| 鍩虹<E98DA9>鐗? | - |
| 4 | 鏅鸿兘鏁版嵁娓呮礂 | `data-cleaning` | `/data-cleaning` | 瑙勫垝涓?| 楂樼骇鐗? | - |
| 5 | 鏅鸿兘缁熻<EFBFBD>鍒嗘瀽 | `statistical-analysis` | `/intelligent-analysis` | 澶栭儴闆嗘垚 | 鏃楄埌鐗?| Java鍥㈤槦寮€鍙?|
| 6 | 缁熻<EFBFBD>鍒嗘瀽宸ュ叿 | `statistical-tools` | `/statistical-tools` | 澶栭儴闆嗘垚 | 鏃楄埌鐗?| Java鍥㈤槦寮€鍙?|
---
@@ -143,25 +143,25 @@ isExternal?: boolean
### 椤堕儴瀵艰埅锛堜粠宸﹀埌鍙筹級
```
🏥 AI临床研究平台 💬AI问答(规划中) 📄AI智能文献 📁知识库(规划中)
🧹智能数据清洗(规划中) 📊智能统计分析(规划中)
📈统计分析工具(规划中) 👤研究员▼
馃彞 AI涓村簥鐮旂┒骞冲彴 馃挰AI闂<49>瓟(瑙勫垝涓? 馃搫AI鏅鸿兘鏂囩尞 馃搧鐭ヨ瘑搴?瑙勫垝涓?
馃Ч鏅鸿兘鏁版嵁娓呮礂(瑙勫垝涓? 馃搳鏅鸿兘缁熻<E7BC81>鍒嗘瀽(瑙勫垝涓?
馃搱缁熻<EFBFBD>鍒嗘瀽宸ュ叿(瑙勫垝涓? 馃懁鐮旂┒鍛樷柤
```
### 棣栭〉妯″潡鍗$墖
```
┌────────────┐ ┌────────────┐ ┌────────────┐
│ 💬 │ │ 📄 │ │ 📁
AI问答 │ │ AI智能文献 │ │ 知识库 │
│ 规划中 │ │ Week 3开发 │ │ 规划中
└────────────┘ └────────────┘ └────────────┘
鈹屸攢鈹€鈹€鈹€鈹€鈹€鈹€鈹€鈹€鈹€鈹€鈹€鈹?鈹屸攢鈹€鈹€鈹€鈹€鈹€鈹€鈹€鈹€鈹€鈹€鈹€鈹?鈹屸攢鈹€鈹€鈹€鈹€鈹€鈹€鈹€鈹€鈹€鈹€鈹€鈹?
鈹? 馃挰 鈹?鈹? 馃搫 鈹?鈹? 馃搧 鈹?
鈹? AI<EFBFBD> 鈹?鈹?AI鏅鸿兘鏂囩尞 鈹?鈹? 鐭ヨ瘑搴? 鈹?
鈹? 瑙勫垝涓? 鈹?鈹?Week 3寮€鍙? 鈹?鈹? 瑙勫垝涓? 鈹?
鈹斺攢鈹€鈹€鈹€鈹€鈹€鈹€鈹€鈹€鈹€鈹€鈹€鈹?鈹斺攢鈹€鈹€鈹€鈹€鈹€鈹€鈹€鈹€鈹€鈹€鈹€鈹?鈹斺攢鈹€鈹€鈹€鈹€鈹€鈹€鈹€鈹€鈹€鈹€鈹€鈹?
┌────────────┐ ┌────────────┐ ┌────────────┐
│ 🧹 │ │ 📊 │ │ 📈
│智能数据清洗 │ │智能统计分析 │ │统计分析工具 │
│ 规划中 │ │ 外部集成 │ │ 外部集成
└────────────┘ └────────────┘ └────────────┘
鈹屸攢鈹€鈹€鈹€鈹€鈹€鈹€鈹€鈹€鈹€鈹€鈹€鈹?鈹屸攢鈹€鈹€鈹€鈹€鈹€鈹€鈹€鈹€鈹€鈹€鈹€鈹?鈹屸攢鈹€鈹€鈹€鈹€鈹€鈹€鈹€鈹€鈹€鈹€鈹€鈹?
鈹? 馃Ч 鈹?鈹? 馃搳 鈹?鈹? 馃搱 鈹?
鈹傛櫤鑳芥暟鎹<EFBFBD>竻娲?鈹?鈹傛櫤鑳界粺璁″垎鏋?鈹?鈹傜粺璁″垎鏋愬伐鍏?鈹?
鈹? 瑙勫垝涓? 鈹?鈹? 澶栭儴闆嗘垚 鈹?鈹? 澶栭儴闆嗘垚 鈹?
鈹斺攢鈹€鈹€鈹€鈹€鈹€鈹€鈹€鈹€鈹€鈹€鈹€鈹?鈹斺攢鈹€鈹€鈹€鈹€鈹€鈹€鈹€鈹€鈹€鈹€鈹€鈹?鈹斺攢鈹€鈹€鈹€鈹€鈹€鈹€鈹€鈹€鈹€鈹€鈹€鈹?
馃搳 绯荤粺缁熻<E7BC81>
[ 6 涓氬姟妯″潡 ] [ 10 Schema ] [ 4 LLM ]
@@ -169,65 +169,65 @@ isExternal?: boolean
---
## ✅ 验收标准
## 鉁?楠屾敹鏍囧噯
- [x] 椤堕儴瀵艰埅鏄剧ず6涓<36>ā鍧楋紝椤哄簭姝
- [x] 模块命名与架构文档一致
- [x] 路由路径与架构文档一致
- [x] 首页统计数据显示"6个业务模块"
- [x] AI智能文献显示"Week 3 开发"(绿色)
- [x] 妯″潡鍛藉悕涓庢灦鏋勬枃妗d竴鑷?
- [x] <EFBFBD>敱璺<EFBFBD>緞涓庢灦鏋勬枃妗竴鑷?
- [x] 棣栭〉缁熻<EFBFBD>鏁版嵁鏄剧ず"6涓<36>笟鍔℃ā鍧?
- [x] AI鏅鸿兘鏂囩尞鏄剧ず"Week 3 寮€鍙?锛堢豢鑹诧級
- [x] Java鍥㈤槦妯″潡鏄剧ず"澶栭儴闆嗘垚"锛堢传鑹诧級
- [x] 其他模块显示"规划中"(橙色)
- [x] 鍏朵粬妯″潡鏄剧ず"瑙勫垝涓?锛堟<E9949B>鑹诧級
- [x] 鍒犻櫎浜嗘灦鏋勬枃妗腑鏈<E88591>畾涔夌殑瀹ǹ绯荤粺妯″潡
---
## 📁 修改的文件清单
## 馃搧 淇<>敼鐨勬枃浠舵竻鍗?
1. `src/framework/modules/moduleRegistry.ts` - 模块注册配置
2. `src/framework/modules/types.ts` - 类型定义
3. `src/pages/HomePage.tsx` - 首页统计和标签逻辑
4. `src/modules/ssa/index.tsx` - 新增智能统计分析模块
5. `src/modules/st/index.tsx` - 新增统计分析工具模块
6. `src/modules/rvw/index.tsx` - 删除审稿系统模块
1. 鉁?`src/framework/modules/moduleRegistry.ts` - 妯″潡娉ㄥ唽閰嶇疆
2. 鉁?`src/framework/modules/types.ts` - 绫诲瀷瀹氫箟
3. 鉁?`src/pages/HomePage.tsx` - 棣栭〉缁熻<EFBFBD>鍜屾爣绛鹃€昏緫
4. 鉁?`src/modules/ssa/index.tsx` - 鏂板<EFBFBD>鏅鸿兘缁熻<EFBFBD>鍒嗘瀽妯″潡
5. 鉁?`src/modules/st/index.tsx` - 鏂板<EFBFBD>缁熻<EFBFBD>鍒嗘瀽宸ュ叿妯″潡
6. 鉂?`src/modules/rvw/index.tsx` - 鍒犻櫎瀹$ǹ绯荤粺妯″潡
---
## 🎯 与架构文档的一致性
## 馃幆 涓庢灦鏋勬枃妗g殑涓€鑷存€?
| 项目 | 架构文档要求 | 当前实现 | 状态 |
| 椤圭洰 | 鏋舵瀯鏂囨。瑕佹眰 | 褰撳墠瀹炵幇 | 鐘舵€?|
|------|-------------|---------|------|
| 模块数量 | 6| 6个 | ✅ |
| 模块顺序 | AI问答→AI智能文献→知识库→... | 一致 | ✅ |
| 模块ID命名 | `ai-qa`, `literature-platform`等 | 一致 | ✅ |
| 路由路径 | `/ai-qa`, `/literature`等 | 一致 | ✅ |
| 权限配置 | 基础版/高级版/旗舰版 | 一致 | ✅ |
| 外部模块标记 | Java团队模块需标记 | 已标记 | ✅ |
| 妯″潡鏁伴噺 | 6涓?| 6涓?| 鉁?|
| 妯″潡椤哄簭 | AI闂<49>瓟鈫扐I鏅鸿兘鏂囩尞鈫掔煡璇嗗簱鈫?.. | 涓€鑷?| 鉁?|
| 妯″潡ID鍛藉悕 | `ai-qa`, `literature-platform`绛?| 涓€鑷?| 鉁?|
| <EFBFBD>敱璺<EFBFBD> | `/ai-qa`, `/literature`绛?| 涓€鑷?| 鉁?|
| 鏉冮檺閰嶇疆 | 鍩虹<E98DA9>鐗?楂樼骇鐗?鏃楄埌鐗?| 涓€鑷?| 鉁?|
| 澶栭儴妯″潡鏍囪<EFBFBD> | Java鍥㈤槦妯″潡闇€鏍囪<E98F8D> | 宸叉爣璁?| 鉁?|
---
## 馃殌 鍚庣画宸ヤ綔
1. **Week 3 Day 1-2** AI智能文献模块开发前准备
- 数据库设计(asl_schema
1. **Week 3 Day 1-2锛?* AI鏅鸿兘鏂囩尞妯″潡寮€鍙戝墠鍑嗗<E98D91>
- 鏁版嵁搴撹<EFBFBD>璁★紙asl_schema锛?
- API璁捐<E79281>
- 鍓嶇<E98D93>椤甸潰璁捐<E79281>
2. **未来:** 外部模块集成
- 智能统计分析Java团队
- 统计分析工具Java团队
2. **<EFBFBD>潵锛?* 澶栭儴妯″潡闆嗘垚
- 鏅鸿兘缁熻<EFBFBD>鍒嗘瀽锛圝ava鍥㈤槦锛?
- 缁熻<EFBFBD>鍒嗘瀽宸ュ叿锛圝ava鍥㈤槦锛?
- 鍓嶇<E98D93>浠呭仛瀵艰埅闆嗘垚鍜宨frame宓屽叆
3. **未来:** 其他模块开发
3. **<EFBFBD>潵锛?* 鍏朵粬妯″潡寮€鍙?
- AI闂<49>瓟妯″潡閲嶅啓
- 知识库模块重写
- 智能数据清洗模块开发
- 鐭ヨ瘑搴撴ā鍧楅噸鍐?
- 鏅鸿兘鏁版嵁娓呮礂妯″潡寮€鍙?
---
**更新完成!**
**鏇存柊瀹屾垚锛?* 鉁?
所有模块配置已与平台架构文档保持一致。
鎵€鏈夋ā鍧楅厤缃<EFBFBD>凡涓庡钩鍙版灦鏋勬枃妗繚鎸佷竴鑷淬€?