重构: MessageList 拆分(提取 MessageItem+useMessageScroll, 1552->1386行)

- 提取 useMessageScroll.ts(滚动跟随/锁存/回底按钮)

- 提取 MessageItem.vue(按 role 渲染单条消息)

- 清理 MessageList.vue 中已移至子组件/ composable 的死代码
This commit is contained in:
2026-07-01 12:21:40 +08:00
parent 6771d396f0
commit 2c2b2d710e
4 changed files with 307 additions and 205 deletions

View File

@@ -374,20 +374,28 @@
---
## Batch 30 — 代码质量收尾
- **提交**: `6771d39`
- **内容**:
- 设置页搜索索引补全(新增 dataDir 项)
- 编译警告清理(df-storage OptionalExtension + df-ai join_set)
- i18n 核验(移除 zh-CN/fileExplorer.ts 未使用的 loadMore key)
- String 替 newtype(5 个 branded ID 类型:ProjectId/TaskId/ConvId/ModuleId/MessageId)
- **验证**: cargo check + vue-tsc + vite build 通过
## Batch 31 — God 文件拆分第一步(MessageList)
- **提交**: `当前待提交`
- **内容**:
- 提取 useMessageScroll.ts(滚动跟随/锁存/回底按钮,89 行)
- 提取 MessageItem.vue(单条消息按 role 渲染,171 行)
- MessageList.vue 从 1552 行降至 1386 行(-166 行)
- **验证**: vue-tsc + vite build 通过
## 后续规划批次(待推进)
### Batch 30代码质量收尾
1. 设置页搜索索引核验补全
2. 编译警告清理(df-storage / df-ai)
3. i18n 遗漏翻译核验
4. String 替 newtype(5处纯类型重构)
### Batch 31 — God 文件拆分第一步(MessageList)
1. 提取 MessageItem.vue(单条消息渲染)
2. 提取 useMessageScroll.ts(滚动控制)
3. MessageList.vue 从 1552 行降至 ~600 行
### Batch 32 — God 文件拆分第二步(ChatInput)
### Batch 32ChatInput 拆分
1. 提取 SkillMention.vue(/@ 联想浮层)
2. 提取 ImageInput.vue(图片粘贴/拖拽)
3. ChatInput.vue 从 1183 行降至 ~500 行