Add files via upload

This commit is contained in:
公明
2026-03-23 21:56:05 +08:00
committed by GitHub
parent c59fcbf5f2
commit fdc36a041e
3 changed files with 77 additions and 2 deletions
+5 -1
View File
@@ -252,7 +252,11 @@ func RunDeepAgent(
WithoutGeneralSubAgent: ma.WithoutGeneralSubAgent,
WithoutWriteTodos: ma.WithoutWriteTodos,
MaxIteration: deepMaxIter,
Handlers: []adk.ChatModelAgentMiddleware{mainSumMw},
// 防止 sub-agent 再调用 task(再委派 sub-agent),形成无限委派链。
Handlers: []adk.ChatModelAgentMiddleware{
newNoNestedTaskMiddleware(),
mainSumMw,
},
ToolsConfig: adk.ToolsConfig{
ToolsNodeConfig: compose.ToolsNodeConfig{
Tools: mainTools,