thzxx
875d04d1e1
fix: Agent Loop 多轮迭代消息互相覆盖 — 每轮创建独立消息气泡
问题:Agent Loop 多轮迭代(thought→action→observation→循环)时,每轮
onContent 回调都通过 updateLastAssistantMessage 替换同一个 placeholder
的 innerHTML,导致前一轮的回复内容被后一轮覆盖,只有最后一轮保留。
修复:
- agent-engine.ts: AgentCallbacks 新增 onNewIteration 回调,每轮迭代
开始前通知 UI 层
- input-area.ts: sendMessageWithAgentLoop + handleRetry 添加
onNewIteration 处理——保存当前轮内容为独立消息、重置状态、创建新
placeholder。onDone 根据 agentModeIterations 判断是否需要重复保存
2026-04-20 20:07:47 +08:00
..
2026-04-20 20:07:47 +08:00
2026-04-17 12:35:42 +08:00
2026-04-18 10:08:01 +08:00
2026-04-19 20:48:56 +08:00
2026-04-19 20:48:56 +08:00
2026-04-18 10:14:33 +08:00
2026-04-19 19:36:41 +08:00
2026-04-18 12:09:27 +08:00
2026-04-18 09:25:40 +08:00
2026-04-20 18:15:57 +08:00
2026-04-16 09:27:05 +08:00
2026-04-16 09:27:05 +08:00