Repository navigation
feat(chat): fold process fragments in the message editor - #1485
Open
CATMIAOZHI wants to merge 6 commits into
Open
CATMIAOZHI wants to merge 6 commits into
CATMIAOZHI wants to merge 6 commits into
Conversation
4 of 6 tasks
CATMIAOZHI
marked this pull request as ready for review
November 10, 2026 22:12
CATMIAOZHI
commented
Nov 11, 2026
CATMIAOZHI
left a comment
Collaborator
Author
There was a problem hiding this comment.
审计结论:💬 意见
自审:本 PR 作者为 CATMIAOZHI(本人),本次为自审。
改动(本层 6 个文件,+150/−15;累计差异 242 个文件,+23531/−2281,含父层 #1484):消息编辑器默认把思考、工具与协作过程收进"过程记录"分组,最终正文直接显示;解析器改写后围栏/缩进代码中的 XML 示例不再误判为工具过程。
通过的检查:
- 本层解析与分组逻辑逐行核对无误:围栏(闭合/未闭合、引用/列表前缀)与缩进代码中的 XML 示例均保留为正文且往返字节一致;过程分组保留源片段顺序、时间戳与保存顺序,最终正文在折叠之外;新增或修改过程片段后自动展开;源码模式继续显示完整内容。
- 4 项新增测试覆盖分组顺序、围栏、1000 行缩进代码与空白往返;作者称
CollaborationMemoryEditTest19 项全部通过。 - 中英文案齐全;本层不改数据库、工具协议与权限;目标分支为
dev。
问题:
- [P1] 累计差异包含数据库 21→24 迁移(父层,
SubagentMigration21→23 与SubagentPresentationMigration23→24),按项目规则,合并顺序与版本号整理须经 @AAswordman 确认批准后才能合并;且本 PR 须等父层 #1484 合并后重放、缩小差异后才能合入。 - [question] PR 正文称"累计分支继承子代理数据库版本与 Operit2 导入器的兼容性阻塞,解决前保持 Draft",但本 PR 当前已是 ready 状态(draft=false)。该阻塞是否已解决?若未解决,建议先转回 Draft。
- [question] 正文称实际展开、编辑、保存及源码模式切换待手动验收、本轮未覆盖手机。请确认手动验收完成后再合并。
- [P3] 两遍渲染用
key(index):删除某部分后后续索引前移,光标/焦点等 Compose state 可能挂到错误的字段上;建议用稳定 key(如 sourceTimestamp + 内容)。 - [P3] 缩进代码续行遇空行会断开:缩进代码块中间出现空行时会被拆成两个编辑字段(往返字节仍保留,仅显示拆分);另,列表项内缩进 4 格的真实工具调用会被当作正文、不参与折叠,是该启发式的保守取舍。
- [P3]
processExpanded用普通remember,旋转等配置变化后折叠状态会重置(与编辑器其他 state 的写法一致,顺手可统一)。
后续可跟进(不阻塞):以上 P3 可在后续整理时顺手处理;未运行本地 Lint(作者已注明)。
由 水晴喵的muse 审计
CATMIAOZHI
force-pushed
the
feat/chat-editor-current
branch
from
November 12, 2026 03:04
f067085 to
8a1c63f
Compare
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.
feat(chat): fold process fragments in the message editor
变更说明 / Description
打开消息可视编辑器时,思考、工具和协作过程默认集中收起,最终正文直接显示。展开过程后仍可编辑原片段,保存不会重新排序。
背景与动机 / Context and motivation
长工具过程会挤占编辑区域,使用户难以找到最终正文。该层将已存在的过程折叠体验延伸到消息编辑器,堆叠在子代理界面 #1484 之上。
改动范围 / Changes
兼容性与风险 / Compatibility and risks
本层不改变数据库、工具协议或权限;分组仅改变编辑器呈现,原内容和保存顺序保留。
此补丁依赖子代理界面层的片段编辑模型,已适配最新
dev(ca968ce95)。本 PR 的目标为dev,当前差异包含父层;父层合并后将重放本层并缩小差异。累计分支继承父层数据库迁移范围与预览版兼容性限制,并同步 #1484 将外部协作文件恢复移出数据库迁移的修复;编辑器自身补丁保持不变。维护者已在协调回复中确认本次改动不受此前对话树层级问题影响。PR 已转为 Ready,仍按父层依赖顺序审阅;该回复不代替数据库升级及备份导入验证。
关联 Issue / Related issue
Refs #319(已关闭,作为折叠需求背景)。本次具体实现为编辑器过程分组;#1453 的 XML 树渲染是相邻但不同的展示功能。
验证方式 / Verification
:app:testDebugUnitTest,筛选CollaborationMemoryEditTest、SubagentOwnerRestorationTest、ChatFeatureMigrationTest,27 项全部通过。证据 / Evidence
CollaborationMemoryEditTest覆盖正文和过程分类、源顺序、闭合/未闭合围栏中的 XML 及空白往返。行为说明:
docs/TODO/message-process-editor/index.md。提交前补充展开、编辑、保存与源码模式的画面或手动记录。检查清单 / Checklist
dev/ The target branch isdevCandidate checks覆盖改动范围,并会处理技术失败项 / Candidate checks covers the change scope and technical failures will be addressed