refactor: Update function signatures across multiple files to improve readability by adding context parameters and enhancing code structure

This commit is contained in:
wizardchen
2025-11-28 16:17:52 +08:00
parent 135e33eca4
commit eb8bfddfd1
89 changed files with 1453 additions and 522 deletions
+11 -2
View File
@@ -177,7 +177,12 @@ func sanitizeName(name string) string {
}
// RegisterMCPTools registers MCP tools from given services
func RegisterMCPTools(ctx context.Context, registry *ToolRegistry, services []*types.MCPService, mcpManager *mcp.MCPManager) error {
func RegisterMCPTools(
ctx context.Context,
registry *ToolRegistry,
services []*types.MCPService,
mcpManager *mcp.MCPManager,
) error {
if len(services) == 0 {
return nil
}
@@ -239,7 +244,11 @@ func RegisterMCPTools(ctx context.Context, registry *ToolRegistry, services []*t
}
// GetMCPToolsInfo returns information about available MCP tools
func GetMCPToolsInfo(ctx context.Context, services []*types.MCPService, mcpManager *mcp.MCPManager) (map[string][]string, error) {
func GetMCPToolsInfo(
ctx context.Context,
services []*types.MCPService,
mcpManager *mcp.MCPManager,
) (map[string][]string, error) {
result := make(map[string][]string)
// Use provided context with timeout