66from typing import List , Optional
77
88from common .config .app_config import config
9- from common .models .messages_kernel import TeamConfiguration , AgentMessage , AgentType
9+ from common .models .messages_kernel import TeamConfiguration
1010from semantic_kernel .agents .orchestration .magentic import MagenticOrchestration
1111from semantic_kernel .agents .runtime import InProcessRuntime
1212from azure .core .exceptions import ResourceNotFoundError
2222from v3 .magentic_agents .magentic_agent_factory import MagenticAgentFactory
2323from v3 .models .messages import WebsocketMessageType
2424from v3 .orchestration .human_approval_manager import HumanApprovalMagenticManager
25- from common .database .database_factory import DatabaseFactory
2625
2726
2827class OrchestrationManager :
@@ -190,9 +189,7 @@ async def run_orchestration(self, user_id, input_task) -> None:
190189 if hasattr (e , "__dict__" ):
191190 self .logger .info (f"Error attributes: { e .__dict__ } " )
192191 self .logger .info ("=" * 50 )
193-
194192 error_content = "The agent is currently unavailable. Please check if it was deleted or recreated.\n \n If yes, please create a new plan from the home page."
195-
196193 self .logger .info (f"🔴 Sending error message to user { user_id } : { error_content } " )
197194
198195 await connection_config .send_status_update_async (
@@ -207,7 +204,6 @@ async def run_orchestration(self, user_id, input_task) -> None:
207204 user_id ,
208205 message_type = WebsocketMessageType .ERROR_MESSAGE ,
209206 )
210-
211207 self .logger .info (f"✅ Error message sent via WebSocket to user { user_id } " )
212208
213209 except Exception as e :
@@ -272,7 +268,7 @@ async def run_orchestration(self, user_id, input_task) -> None:
272268 self .logger .info ("=" * 50 )
273269
274270 error_content = "Something went wrong.\n \n Please try creating a new plan from the home page or try again later."
275-
271+
276272 self .logger .info (f"🔴 Sending error message to user { user_id } : { error_content } " )
277273
278274 await connection_config .send_status_update_async (
@@ -287,7 +283,7 @@ async def run_orchestration(self, user_id, input_task) -> None:
287283 user_id ,
288284 message_type = WebsocketMessageType .ERROR_MESSAGE ,
289285 )
290-
286+
291287 self .logger .info (f"✅ Error message sent via WebSocket to user { user_id } " )
292288
293289 finally :
0 commit comments