fix(setup_agent): 限制技能数量最多 5 个
- middleware 拦截阶段静默截断 skills[:5],超出不报错不中断流程 - 工具执行阶段同样截断,双重兜底 Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
1 parent
f590f672be
commit
22574d3ada
2 files changed
+6
-2
No files matched your search
+4
@@ -67,6 +67,10 @@ class SetupAgentApprovalMiddleware(AgentMiddleware[SetupAgentApprovalMiddlewareS
|
||||
|
||||
args = setup_call.get("args") or {}
|
||||
tool_call_id = setup_call.get("id") or ""
|
||||
|
||||
if isinstance(args.get("skills"), list) and len(args["skills"]) > 5:
|
||||
args = {**args, "skills": args["skills"][:5]}
|
||||
|
||||
payload = self._build_payload(args)
|
||||
logger.info("Setup agent approval requested before writing agent files")
|
||||
|
||||
|
||||
Reference in new issue
Block a user