fix _handle_special_tool bug
This commit is contained in:
parent
7db0b2fbf0
commit
c0c03c0bef
@ -39,5 +39,8 @@ class Manus(ToolCallAgent):
|
|||||||
)
|
)
|
||||||
|
|
||||||
async def _handle_special_tool(self, name: str, result: Any, **kwargs):
|
async def _handle_special_tool(self, name: str, result: Any, **kwargs):
|
||||||
await self.available_tools.get_tool(BrowserUseTool().name).cleanup()
|
if not self._is_special_tool(name):
|
||||||
await super()._handle_special_tool(name, result, **kwargs)
|
return
|
||||||
|
else:
|
||||||
|
await self.available_tools.get_tool(BrowserUseTool().name).cleanup()
|
||||||
|
await super()._handle_special_tool(name, result, **kwargs)
|
||||||
|
@ -106,7 +106,7 @@ class BrowserUseTool(BaseTool):
|
|||||||
async def _ensure_browser_initialized(self) -> BrowserContext:
|
async def _ensure_browser_initialized(self) -> BrowserContext:
|
||||||
"""Ensure browser and context are initialized."""
|
"""Ensure browser and context are initialized."""
|
||||||
if self.browser is None:
|
if self.browser is None:
|
||||||
browser_config_kwargs = {"headless": False}
|
browser_config_kwargs = {"headless": False, "disable_security": True}
|
||||||
|
|
||||||
if config.browser_config:
|
if config.browser_config:
|
||||||
from browser_use.browser.browser import ProxySettings
|
from browser_use.browser.browser import ProxySettings
|
||||||
|
Loading…
x
Reference in New Issue
Block a user