Skip to content

Commit

Permalink
fix: allow setting default crew
Browse files Browse the repository at this point in the history
  • Loading branch information
thehapyone committed Aug 30, 2024
1 parent 1eb9fff commit c1ff7c3
Showing 1 changed file with 12 additions and 13 deletions.
25 changes: 12 additions & 13 deletions sage/sources/mode_handlers.py
Original file line number Diff line number Diff line change
Expand Up @@ -129,19 +129,18 @@ async def handle_agent_only_mode(

action_response = None

if crew_actions:
action_response = await cl.AskActionMessage(
content="To start, please choose a crew to work with. If no selection is made before the time runs out, the default is 'No Agents ⛔'",
timeout=300,
actions=[
cl.Action(
name="crew_actions",
value="none",
label="No Agents ⛔",
),
*crew_actions,
],
).send()
action_response = await cl.AskActionMessage(
content="To start, please choose a crew to work with. If no selection is made before the time runs out, the default is 'No Agents ⛔'",
timeout=300,
actions=[
cl.Action(
name="crew_actions",
value="none",
label="No Agents ⛔",
),
*crew_actions,
],
).send()

selected_crew = action_response.get("value") if action_response else "none"

Expand Down

0 comments on commit c1ff7c3

Please sign in to comment.