fix: merge plugin tools into builtin toolsets
This commit is contained in:
11
toolsets.py
11
toolsets.py
@ -521,13 +521,18 @@ def get_toolset(name: str) -> Optional[Dict[str, Any]]:
|
||||
None: If toolset not found
|
||||
"""
|
||||
toolset = TOOLSETS.get(name)
|
||||
if toolset:
|
||||
return toolset
|
||||
|
||||
try:
|
||||
from tools.registry import registry
|
||||
except Exception:
|
||||
return None
|
||||
return toolset if toolset else None
|
||||
|
||||
if toolset:
|
||||
merged_tools = sorted(
|
||||
set(toolset.get("tools", []))
|
||||
| set(registry.get_tool_names_for_toolset(name))
|
||||
)
|
||||
return {**toolset, "tools": merged_tools}
|
||||
|
||||
registry_toolset = name
|
||||
description = f"Plugin toolset: {name}"
|
||||
|
||||
Reference in New Issue
Block a user