Conversation
RoxyAsahi
marked this pull request as ready for review
August 22, 2026 05:05
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
说明
涉及的范围比较大,感觉有点小危险,辛苦莱恩哥审一下!!
这是一次面向上游的 Chat Kernel、renderer 生命周期和统一 UI 工程化拆分与治理。
为什么需要这次改造
原有主聊天 renderer 同时承担流式传输与 terminal 协调、durable history 读写、DOM 投影、话题/助手 selection、设置主题通知 desktop push、TTS 附件 Flowlock forward、辅助窗口 preload subscription 以及多个兼容性全局对象。
这使得局部修改可能影响 IPC 顺序、持久化次数、terminal 路由、DOM/焦点/ARIA、listener 数量,以及 Classic 页面和插件协议。
整体实现
Chat Kernel 与状态边界
Surface 与 renderer 生命周期
流式切题恢复
针对“流式输出等待 VCP 工具回执时切换话题,再切回后消息消失”的问题:
Ambient/facade 与 UI
行为等价契约
以下行为默认保持不变:主聊天发送、流式、工具等待、取消和重试;历史加载、助手/话题切换;附件;设置、主题和 presentation;通知与 desktop push;VoiceChat、Rust Assistant 和辅助窗口;Classic 页面;插件命令协议。
未登记的 IPC、terminal、持久化、DOM、焦点、ARIA、listener 或资源差异按回归处理。
验证结果
关键新增回归覆盖:工具回执等待中切换话题、清空 projection、切回并继续接收 chunk;history read 与 terminal completion 并发;internal test Surface 不出现在普通 Launchpad;internal app 仍可通过 ID 被测试和开发入口使用。
当前证据边界
本 PR 不宣称数学意义上的绝对零回归、renderer 崩溃/进程重启后恢复未终结工具流、所有 Windows 版本/打包方式/GPU/DPI 配置均已覆盖、30–60 分钟人工 soak 已完成,或 D7 已最终闭合。
D5/D6 在当前声明范围内完成;D7 仍需要声明支持环境矩阵、真实 packaged Electron、辅助窗口 crash/reload 和人工 soak 证据。
审查入口