docs(wiki): 全量代码验证驱动更新 — 10页基于实际扫描非文档推测
Some checks failed
CI / Lint & TypeCheck (push) Has been cancelled
CI / Unit Tests (push) Has been cancelled
CI / Build Frontend (push) Has been cancelled
CI / Rust Check (push) Has been cancelled
CI / Security Scan (push) Has been cancelled
CI / E2E Tests (push) Has been cancelled

关键数字修正:
- Rust 74.5K行(原66K), Tauri命令 183(原182), SaaS路由 121
- 前端组件 104, lib/ 85文件, Store 17+4子store
- TODO/FIXME 仅 8 个(前端4+Rust4)

内容增强:
- 中间件完整14层注册清单含注册条件和优先级分类
- Store完整目录结构, Pipeline完整目录树
- Hands测试分布, Memory 16个Tauri命令列表
- 管家模式: 关键词路由→语义路由(TF-IDF)修正
- 代码健康度指标新增
This commit is contained in:
iven
2026-04-11 01:05:15 +08:00
parent 36a1c87d87
commit b3f97d6525
12 changed files with 415 additions and 132 deletions

View File

@@ -30,7 +30,7 @@ tags: [module, chat, stream]
### 发送消息流
入口: `streamStore.sendMessage(content)``streamStore.ts`
入口: `streamStore.sendMessage(content)``store/chat/streamStore.ts`
```
sendMessage(content)
@@ -51,7 +51,7 @@ sendMessage(content)
→ 5 分钟超时守护 (kernel-chat.ts:76) 防止流挂起
```
### Store 拆分 (4 Store)
### Store 拆分 (5 Store)
原来 908 行的 ChatStore 已拆分为:
@@ -61,6 +61,14 @@ sendMessage(content)
| conversationStore | `store/chat/conversationStore.ts` | 会话管理、当前模型 |
| messageStore | `store/chat/messageStore.ts` | 消息持久化 |
| chatStore | `store/chat/chatStore.ts` | 聊天通用状态 |
| artifactStore | `store/chat/artifactStore.ts` | 聊天产物/附件 |
### 前端 Tauri 命令映射
```
kernel_chat / agent_chat / agent_chat_stream → 发送消息
cancel_stream → 取消流式响应
```
### 模型切换
@@ -85,6 +93,7 @@ UI 选择模型 → conversationStore.currentModel = newModel
|------|------|
| `desktop/src/store/chat/streamStore.ts` | 流式消息编排 |
| `desktop/src/store/chat/conversationStore.ts` | 会话管理 |
| `desktop/src/store/chat/artifactStore.ts` | 聊天产物管理 |
| `desktop/src/lib/kernel-chat.ts` | Kernel ChatStream (Tauri) |
| `desktop/src/lib/saas-relay-client.ts` | SaaS Relay ChatStream |
| `desktop/src/lib/gateway-client.ts` | Gateway ChatStream (WS) |