mirror of
https://github.com/temporal-community/temporal-ai-agent.git
synced 2026-03-15 14:08:08 +01:00
Enhance Dev Experience and Code Quality (#41)
* Format codebase to satisfy linters * fixing pylance and ruff-checked files * contributing md, and type and formatting fixes * setup file capitalization * test fix
This commit is contained in:
committed by
GitHub
parent
e35181b5ad
commit
eb06cf5c8d
@@ -1,19 +1,23 @@
|
||||
import os
|
||||
|
||||
import tools.goal_registry as goals
|
||||
|
||||
def list_agents(args: dict) -> dict:
|
||||
|
||||
def list_agents(args: dict) -> dict:
|
||||
goal_categories_start = os.getenv("GOAL_CATEGORIES")
|
||||
if goal_categories_start is None:
|
||||
goal_categories = ["all"] # default to 'all' categories
|
||||
goal_categories = ["all"] # default to 'all' categories
|
||||
else:
|
||||
goal_categories_start.strip().lower() # handle extra spaces or non-lowercase
|
||||
goal_categories_start.strip().lower() # handle extra spaces or non-lowercase
|
||||
goal_categories = goal_categories_start.split(",")
|
||||
|
||||
# if multi-goal-mode, add agent_selection as a goal (defaults to True)
|
||||
if "agent_selection" not in goal_categories :
|
||||
first_goal_value = os.getenv("AGENT_GOAL")
|
||||
if first_goal_value is None or first_goal_value.lower() == "goal_choose_agent_type":
|
||||
if "agent_selection" not in goal_categories:
|
||||
first_goal_value = os.getenv("AGENT_GOAL")
|
||||
if (
|
||||
first_goal_value is None
|
||||
or first_goal_value.lower() == "goal_choose_agent_type"
|
||||
):
|
||||
goal_categories.append("agent_selection")
|
||||
|
||||
# always show goals labeled as "system," like the goal chooser
|
||||
@@ -33,7 +37,7 @@ def list_agents(args: dict) -> dict:
|
||||
"goal_id": goal.id,
|
||||
"agent_description": goal.agent_friendly_description,
|
||||
}
|
||||
)
|
||||
)
|
||||
return {
|
||||
"agents": agents,
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user