mirror of
https://gitea.toothfairyai.com/ToothFairyAI/tf_code.git
synced 2026-04-13 04:04:44 +00:00
feat: prompts
This commit is contained in:
Binary file not shown.
Binary file not shown.
@@ -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 = {}
|
||||
|
||||
Reference in New Issue
Block a user