feat: prompts

This commit is contained in:
Gab
2026-03-28 16:48:01 +11:00
parent 3cc0f7401a
commit 5b9cc6c0de
17 changed files with 237 additions and 69 deletions

View File

@@ -201,25 +201,25 @@ def sync_tools(config: TFConfig) -> ToolSyncResult:
try:
client = config.get_client()
# Sync agent functions (includes API Functions and Agent Skills)
# Sync agent functions (API auto-paginates up to 5000)
func_result = client.agent_functions.list()
tools = [parse_function(f) for f in func_result.items]
# Sync coder agents
# Sync coder agents (API auto-paginates up to 5000)
try:
agents_result = client.agents.list()
for agent in agents_result.items:
if getattr(agent, 'mode', None) == 'coder':
tools.append(parse_agent(agent))
except Exception as e:
except Exception:
pass
# Sync prompts
# Sync prompts (API auto-paginates up to 5000)
prompts = []
try:
prompts_result = client.prompts.list()
prompts = [parse_prompt(p) for p in prompts_result.items]
except Exception as e:
except Exception:
pass
by_type = {}