You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
fix(web): restore tool folding in converted Codex history - #1209
This change restores tool folding for legacy converted Codex history in the Web UI. It affects display only, and no concrete merge-blocking risk was identified.
Included review availability: This review used your included allowance. Your plan provides up to 8 included reviews per hour; 5 remain after this review.
Applicability reference: AGENTS.md: # Repository Guidelines `npm start` / `npm start web` rebuild and relaunch the user's Desktop / Web and may restart the shared Host; `npm stop` stops all local codexhost services across worktrees.
感谢修复!改动严格限定在旧版导入的原生 Codex 回合,恢复工具卡片折叠且真实 ChThreadView 单测覆盖完整;已核实 Windows CI 失败为无关 local-shared-host 超时抖动,现已合并。
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
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.
Summary
旧版外部会话导入原生 Codex 时,历史回合使用
external-import-turn-*ID,并将工具调用、工具输出、会话导入标记以及 Host 注入的委托指令一并扁平化为无阶段标记的普通消息。Web 打开这类已完成回合时会把原始标记文本全部平铺渲染,缺失finalAssistantStep也导致过程消息无法自动折叠。packages/web-server/src/ch-external-import-history.ts,在ChThreadView为codex构建展示条目时恢复已完成的external-import-turn-*历史回合。连续多个无法唯一配对的工具调用或结果保留原文展示,避免错配输出。view.thread.turns与消息编辑入口直接读取原生回合记录。docs/architecture/turn-activity-folding.md中独立 Web 对旧版转换会话的折叠说明。Related issues
无。
UI Demo
以下基于隔离 Web 环境与脱敏历史会话样例录制,对比修复前后同一转换回合的展示与展开效果。
Test plan
npx tsc -b packages/web-server通过。node --import tsx --test packages/web-server/test/ch-tool-items.test.ts packages/web-server/test/ch-history-rebuild.test.ts packages/web-server/test/ch-session-import.test.ts packages/web-server/test/ch-edit-message.test.ts通过,共 25 项测试,覆盖转换回合的委托指令清理、命令与工具卡片还原、finalAssistantStep阶段恢复、重复更新幂等性、编辑入口读取原生输入及普通回合原样透传。npx prettier --check检查本次修改的 4 个文件通过。