tech-envision commited on
Commit
6f99b67
·
unverified ·
2 Parent(s): 3f62e47 598a53d

Merge pull request #61 from EnvisionMindCa/codex/fix-runtimeerror--no-running-event-loop

Browse files
Files changed (1) hide show
  1. src/team.py +7 -3
src/team.py CHANGED
@@ -23,15 +23,19 @@ def set_team(team: "TeamChatSession" | None) -> None:
23
  _TEAM = team
24
 
25
 
26
- def send_to_junior(message: str) -> str:
 
 
27
  if _TEAM is None:
28
  return "No active team"
 
29
  _TEAM.queue_message_to_junior(message)
30
  return "Message sent to junior"
31
 
32
 
33
- async def send_to_junior_async(message: str) -> str:
34
- return send_to_junior(message)
 
35
 
36
 
37
  class TeamChatSession:
 
23
  _TEAM = team
24
 
25
 
26
+ async def send_to_junior(message: str) -> str:
27
+ """Forward ``message`` to the junior agent and return a status string."""
28
+
29
  if _TEAM is None:
30
  return "No active team"
31
+
32
  _TEAM.queue_message_to_junior(message)
33
  return "Message sent to junior"
34
 
35
 
36
+ # Backwards compatibility ---------------------------------------------------
37
+
38
+ send_to_junior_async = send_to_junior
39
 
40
 
41
  class TeamChatSession: