Open-source Python library for AI browser agents, plus Browser Use Cloud: stealth browsers and a hosted agent API.
Python ai-agentsai-toolsbrowser-agentbrowser-automationbrowser-usecdpcloud-browsercomputer-useheadless-browserllmmcpplaywrightpythonremote-browserstealth-browserweb-automationweb-scraping
Improve memory msg when using ctrl
Magnus Müller05a98e98b32d
diff --git a/browser_use/tools/service.py b/browser_use/tools/service.pyindex 20948f908..9ecfb65be 100644--- a/browser_use/tools/service.py+++ b/browser_use/tools/service.py@@ -285,13 +285,13 @@ class Tools(Generic[Context]):# Wait for handler to complete and get any exception or metadataclick_metadata = await event.event_result(raise_if_any=True, raise_if_none=False)memory = f'Clicked element with index {params.index}'+ if params.while_holding_ctrl:+ memory += ' and opened in new tab'msg = f'🖱️ {memory}'logger.info(msg)# Include click coordinates in metadata if availablereturn ActionResult(- extracted_content=memory,- include_in_memory=True,long_term_memory=memory,metadata=click_metadata if isinstance(click_metadata, dict) else None,)