JiuwenSwarm is an intelligent AI Agent built on openJiuwen. It extends the powerful capabilities of large language models directly to your fingertips through various communication apps you use daily.
Python
fix(team): team.error is map to chat.error
guozirui19dec6457c64e
diff --git a/jiuwenswarm/server/runtime/agent_adapter/team_helpers.py b/jiuwenswarm/server/runtime/agent_adapter/team_helpers.pyindex cf516483bf..3aa1a8d571 100644--- a/jiuwenswarm/server/runtime/agent_adapter/team_helpers.py+++ b/jiuwenswarm/server/runtime/agent_adapter/team_helpers.py@@ -1046,6 +1046,8 @@ def _broadcast_event() -> None:"""Broadcast an event to all request queues waiting on the same session."""tm = get_team_manager(channel_id)+ if event and event.get("event_type") == 'team.error':+ event.update({"event_type": "chat.error"})tm.broadcast_event(session_id, event)# Track team-building events so chat.final can be gated correctly.if (not tm.has_seen_team_events(session_id)) and event.get("event_type") in _TEAM_BUILDING_EVENT_TYPES:@@ -2933,7 +2935,7 @@ async def _consume_stream_with_query(channel_id,session_id,{- "event_type": "team.error",+ "event_type": "chat.error","error": "Team stream ended with no output (possible pool/DB inconsistency or internal error)","session_id": session_id,},@@ -2966,7 +2968,7 @@ async def _consume_stream_with_query(channel_id,session_id,{- "event_type": "team.error",+ "event_type": "chat.error","error": str(exc),"session_id": session_id,},