fix bug of abnormal exit for BrowserUseTool
This commit is contained in:
parent
e6e31a2c13
commit
74a4c8bef0
@ -1,3 +1,5 @@
|
||||
from typing import Any
|
||||
|
||||
from pydantic import Field
|
||||
|
||||
from app.agent.toolcall import ToolCallAgent
|
||||
@ -34,3 +36,7 @@ class Manus(ToolCallAgent):
|
||||
)
|
||||
|
||||
max_steps: int = 20
|
||||
|
||||
async def _handle_special_tool(self, name: str, result: Any, **kwargs):
|
||||
await self.available_tools.get_tool(BrowserUseTool().name).cleanup()
|
||||
await super()._handle_special_tool(name, result, **kwargs)
|
||||
|
Loading…
x
Reference in New Issue
Block a user