simplify(compat): tools/browser_tool — repoint run_agent cleanup_browser + chat_completion_helpers _is_headed_mode to the defining browser_tool_* siblings
This commit is contained in:
@@ -2335,7 +2335,7 @@ def cleanup_task_resources(agent, task_id: str) -> None:
|
||||
and ``cleanup_browser`` in headed mode (the inactivity reaper handles idle sessions)."""
|
||||
def _headed() -> bool:
|
||||
try:
|
||||
from tools.browser_tool import _is_headed_mode
|
||||
from tools.browser_tool_cloud import _is_headed_mode
|
||||
return _is_headed_mode()
|
||||
except Exception:
|
||||
return bool(os.environ.get("AGENT_BROWSER_HEADED"))
|
||||
|
||||
@@ -102,7 +102,7 @@ if not _loaded_env_paths:
|
||||
from model_tools import get_toolset_for_tool
|
||||
from tools.terminal_tool_lifecycle import cleanup_vm, get_active_env
|
||||
from tools.interrupt import set_interrupt as _set_interrupt
|
||||
from tools.browser_tool import cleanup_browser
|
||||
from tools.browser_tool_lifecycle import cleanup_browser
|
||||
|
||||
from agent.memory_provider import is_trivial_prompt
|
||||
from agent.client_lifecycle import ClientLifecycleMixin
|
||||
|
||||
Reference in New Issue
Block a user