Add files via upload

This commit is contained in:
公明
2026-01-09 18:52:38 +08:00
committed by GitHub
parent 14e9b986b0
commit 28ca7f1851
4 changed files with 138 additions and 5 deletions
+2 -1
View File
@@ -865,7 +865,8 @@ func (a *Agent) getAvailableTools() []Tool {
// 获取外部MCP工具
if a.externalMCPMgr != nil {
ctx, cancel := context.WithTimeout(context.Background(), 10*time.Second)
// 增加超时时间到30秒,因为通过代理连接远程服务器可能需要更长时间
ctx, cancel := context.WithTimeout(context.Background(), 30*time.Second)
defer cancel()
externalTools, err := a.externalMCPMgr.GetAllTools(ctx)