diff --git a/agent/protocol/agent_stream.py b/agent/protocol/agent_stream.py index 1aa18b84..79dcd2ab 100644 --- a/agent/protocol/agent_stream.py +++ b/agent/protocol/agent_stream.py @@ -472,6 +472,7 @@ class AgentStreamExecutor: raise finally: + final_response = final_response.strip() if final_response else final_response logger.info(f"[Agent] 🏁 完成 ({turn}轮)") self._emit_event("agent_end", {"final_response": final_response})