Skip to content

Commit

Permalink
task and agent name required
Browse files Browse the repository at this point in the history
  • Loading branch information
bboynton97 committed Oct 30, 2024
1 parent fbf0398 commit d09cde8
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions agentstack/cli/cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -139,9 +139,11 @@ def ask_design() -> dict:
# ]),
])

if not is_snake_case(agent['name']):
print(term_color("Error: Agent name must be snake case - Try again", 'red'))
if not agent['name'] or agent['name'] == '':
print(term_color("Error: Agent name is required - Try again", 'red'))
agent_incomplete = True
elif not is_snake_case(agent['name']):
print(term_color("Error: Agent name must be snake case - Try again", 'red'))
else:
agent_incomplete = False

Expand Down Expand Up @@ -176,9 +178,10 @@ def ask_design() -> dict:
choices=[a['name'] for a in agents], ),
])

if not is_snake_case(task['name']):
if not task['name'] or task['name'] == '':
print(term_color("Error: Task name is required - Try again", 'red'))
elif not is_snake_case(task['name']):
print(term_color("Error: Task name must be snake case - Try again", 'red'))
task_incomplete = True
else:
task_incomplete = False

Expand Down

0 comments on commit d09cde8

Please sign in to comment.