fix(web): keep later thinking below rectification tool steps
BUG-360: stream thinking and tool activity as an ordered trace so later CoT opens under 正在整理 instead of filling the first 思考 block. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
+14
-2
@@ -5451,6 +5451,18 @@
|
||||
- 复发自:BUG-354(关 thinking 后过程进正文)、BUG-357(用正则从正文里切两栏)
|
||||
- 修复版本:`04463e9a`
|
||||
|
||||
## BUG-360 | 生时纠正后段思考被写进第一段「思考」
|
||||
|
||||
|
||||
|
||||
- 状态:resolved
|
||||
- 首次发现:2026-08-23
|
||||
- 最近更新:2026-08-23
|
||||
- 影响面:生时纠正对话、`AgentActivityStatus`、流式 `thinking.delta` 与 `tool.activity`
|
||||
- 用户现象:界面先列出「读取校正记录」「正在整理多条事件证据…」,再给一整块「思考」。工具之后的思维链被追加进第一段思考,而不是出现在「正在整理…」下面。
|
||||
- 触发条件:纠正回合先出现 `thinking.delta`,再 `tool.activity`,之后继续 `thinking.delta`。
|
||||
- 根因:`AgentActivityStatus` 先渲染 `completedTrail` 和当前活动,再渲染整段 `thinkingText`。流式处理把所有 `thinking.delta` 拼进同一个 `thinkingRaw`,无法按事件顺序把后段思考放到工具行之后。
|
||||
- 修复:纠正流按事件维护 `activityTrace`。工具开始会结束当前思考行;工具之后的 `thinking.delta` 开新的思考行。有轨迹时不再把拼接后的 `thinkingText` 单独渲在工具列表下面。
|
||||
- 验证:`frontend/tests/agent-activity-trace.test.ts`、`frontend/tests/chat-stream-layout.test.ts`、`frontend/tests/consultation-run-timeline.test.ts`
|
||||
- 防复发:纠正流不得把全部 `thinking.delta` 拼成一块再画在活动列表下方。工具后的思考必须是新的 trace 行。咨询时间线同样不得把后段 `thinking.delta` upsert 回第一条思考。
|
||||
- 相关记录:BUG-095、BUG-357、BUG-359
|
||||
- 复发自:BUG-095(步骤轨迹只证明工具发生过,没有与思维链按时间交错)
|
||||
- 修复版本:待本次提交
|
||||
|
||||
Reference in New Issue
Block a user