feat(agent): remove redundant done message from stream_chat

The `stream_chat` method was yielding a "done" message after streaming all chunks, but this is unnecessary as the streaming completion is already indicated by the end of the stream. Removing this redundant message simplifies the response handling and aligns with typical streaming patterns.
This commit is contained in:
YueGuobin 2026-03-04 13:57:03 +08:00
parent 425ce43bdd
commit 289ae0cddf

View File

@ -160,8 +160,6 @@ class AgentService:
if chunk:
yield chunk
yield {"type": "done", "session_id": session_id}
except Exception as e:
log.error("Error in stream_chat: %s", e, exc_info=True)
yield {"type": "error", "error": str(e), "session_id": session_id}