fix:修复与函数同名时遗漏其他函数的问题

This commit is contained in:
3030332422
2026-07-28 17:05:18 +08:00
parent 477f85b97c
commit 7a22b61969
@@ -68,12 +68,12 @@ class ServerPluginExecutor(ToolExecutor):
expanded = [] expanded = []
for name in config_functions: for name in config_functions:
if name in all_function_registry: if name in module_func_map:
# 精确匹配函数名,直接保留
expanded.append(name)
elif name in module_func_map:
# 模块名,展开为该模块下所有注册函数名 # 模块名,展开为该模块下所有注册函数名
expanded.extend(module_func_map[name]) expanded.extend(module_func_map[name])
elif name in all_function_registry:
# 精确匹配函数名,直接保留
expanded.append(name)
else: else:
# 未知名称,保留原值(可能是 MCP 或其他工具) # 未知名称,保留原值(可能是 MCP 或其他工具)
expanded.append(name) expanded.append(name)