(self, username: str, session_id: str)
| 988 | return stream() |
| 989 | |
| 990 | async def stop_session(self, username: str, session_id: str) -> dict: |
| 991 | session = await self.db.get_platform_session_by_id(session_id) |
| 992 | if not session: |
| 993 | raise ChatServiceError(f"Session {session_id} not found") |
| 994 | if session.creator != username: |
| 995 | raise ChatServiceError("Permission denied") |
| 996 | |
| 997 | unified_msg_origin = build_webchat_unified_msg_origin(session) |
| 998 | stopped_count = active_event_registry.request_agent_stop_all(unified_msg_origin) |
| 999 | return {"stopped_count": stopped_count} |
| 1000 | |
| 1001 | async def stop_session_from_dashboard_payload( |
| 1002 | self, |
no test coverage detected