hotfix: 调用工具时bug

This commit is contained in:
Junyan Qin
2024-11-23 00:23:08 +08:00
parent 0094056def
commit a3ca7e82c7

View File

@@ -118,10 +118,9 @@ class ToolManager:
traceback.print_exc()
return f"error occurred when executing function {name}: {e}"
finally:
plugin = None
for p in self.ap.plugin_mgr.plugins:
for p in self.ap.plugin_mgr.plugins():
if function in p.content_functions:
plugin = p
break