Files
metona-ollama-desktop/src/renderer/services
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
..