From 289ae0cddf8aca0f6c487d55feb7f7a1f3c0a03c Mon Sep 17 00:00:00 2001 From: YueGuobin Date: Wed, 4 Mar 2026 13:57:03 +0800 Subject: [PATCH] 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. --- gns3server/agent/gns3_copilot/agent_service.py | 2 -- 1 file changed, 2 deletions(-) diff --git a/gns3server/agent/gns3_copilot/agent_service.py b/gns3server/agent/gns3_copilot/agent_service.py index 3710ae5b0..7234872c5 100644 --- a/gns3server/agent/gns3_copilot/agent_service.py +++ b/gns3server/agent/gns3_copilot/agent_service.py @@ -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}