From a5d125847f11a961467a71fcaa1e7ca2a0113557 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=BB=9D=E5=B0=98?= <237809796@qq.com> Date: Fri, 19 Jun 2026 05:18:38 +0800 Subject: [PATCH] =?UTF-8?q?=E9=87=8D=E6=9E=84:=20=E6=8B=86AiChat=20God?= =?UTF-8?q?=E7=AC=AC=E5=9B=9B=E6=89=B9MessageList(strategy=C2=B7=E4=B8=BB?= =?UTF-8?q?=E4=BD=93=E6=B6=88=E6=81=AF=E5=88=97=E8=A1=A8)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 新建 ai/MessageList.vue(1444行): 消息列表+流式Markdown分块渲染(scheduleStreamParse/rAF节流/块级memo)+工具卡ToolCardList+滚动跟随(B-260618-24)+分段+选区保持 - AiChat.vue 2937→1587(-1350): MessageList template/script/style迁移, store共享(useAiStore单例)+useMarkdown单例 - props editingMsgId + emits(start-edit/send-example-prompt/go-to-settings/toast) + expose(scrollToBottom/scrollToFirstPending) 流式行为不变: scheduleStreamParse/rAF/块级memo/选区/滚动跟随原样迁移 主代兜底: vue-tsc 0 + grep MessageList抽离/AiChat emit绑定expose印证 strategy: 单批1-2文件原子, 主体抽离; AiChat余1587(组装+队列+max_rounds+上下文+快捷键+confirm/toast+恢复态, 后续批) AiChat拆分主体完成: ConversationSidebar+ChatInput+TopBar+MessageList四批, 4081→1587 git add指定(AiChat.vue+MessageList.vue, 不含anthropic_compat.rs/docs其他会话) --- src/components/AiChat.vue | 1412 +--------------------------- src/components/ai/MessageList.vue | 1444 +++++++++++++++++++++++++++++ 2 files changed, 1475 insertions(+), 1381 deletions(-) create mode 100644 src/components/ai/MessageList.vue diff --git a/src/components/AiChat.vue b/src/components/AiChat.vue index 945a8d2..39cbf1e 100644 --- a/src/components/AiChat.vue +++ b/src/components/AiChat.vue @@ -30,255 +30,16 @@ @provider-switched="(name: string) => showToast(t('aiChat.providerSwitched', { model: name }), 'info')" /> - -
- - -