feat: add strategy selection workbench

This commit is contained in:
Administrator committed 2026-09-09 01:08:11 +08:00
1 parent 60e2c72514
commit 5fd2e8302c
34 files changed
+3188 -9

No files matched your search

@@ -1081,12 +1081,27 @@ async def lifespan(app: FastAPI) -> AsyncGenerator[None, None]:
)
ensure_ai_writing_functional_agents()
except Exception:
logger.exception(
"AI-writing functional agent seeding failed at startup (non-fatal)"
)
# 内置「模板数据转换器」agent(JSON → HTML 模板填充)。同样必须在
except Exception:
logger.exception(
"AI-writing functional agent seeding failed at startup (non-fatal)"
)
# Strategy-selection functional agents (intent, six independent
# analysis angles, judge, and solution editor). Seed them before
# _sync_legacy_agents so they are immediately visible and editable in
# the existing agent-management UI on a fresh deployment.
try:
from app.gateway.routers._strategy_selection_seed import (
ensure_strategy_selection_agents,
)
ensure_strategy_selection_agents()
except Exception:
logger.exception(
"Strategy-selection functional agent seeding failed at startup (non-fatal)"
)
# 内置「模板数据转换器」agent(JSON → HTML 模板填充)。同样必须在
# _sync_legacy_agents **之前**补建目录,后者把它 upsert 进 agents 表,
# 第一次启动 /api/agents 与定时任务下拉框里就有它。
try: