Commit Graph

4189 Commits

Author SHA1 Message Date
Magnus Müller 1f6d606fac Linter 2025-11-15 10:11:55 -08:00
Magnus Müller 51ba3422c3 disable telemetry logs for chatbrowseruse 2025-11-15 10:11:08 -08:00
Cursor Agent 487bd19e80 Refactor: Lower default max_actions_per_step to 4
Co-authored-by: mailmertunsal <mailmertunsal@gmail.com>
2025-11-15 06:31:10 +00:00
mertunsall 7dc5f5bf24 we call the judge before done callback to enable in the cloud 2025-11-14 17:25:53 -08:00
reformedot 2d433dca4b refactor: change logging level from info to debug in BrowserSession methods
Updated the logging level for session management methods in BrowserSession to debug for more granular logging. This change applies to the reset, kill, and stop methods, enhancing the clarity of log outputs during browser session operations without cluttering the info logs.
2025-11-14 13:49:20 -08:00
reformedot 6c1f772a2d Enhance SessionManager and BrowserSession with defensive checks and connection management
- Added defensive checks in SessionManager to skip target attachment and focus recovery if the browser is shutting down (i.e., _cdp_client_root is None).
- Introduced a connection lock in BrowserSession to prevent concurrent connection attempts, ensuring safe CDP client management.
- Improved logging for session reset and connection handling, providing clearer insights into the browser session state during operations.
- Enhanced error handling when stopping the CDP client and clearing session manager state on initialization failures.

These changes improve the robustness and reliability of session management in the browser environment.
2025-11-14 13:05:18 -08:00
mertunsall a64c82ef2c sanitize everything now 2025-11-14 11:13:57 -08:00
Magnus Müller c29e358b9c Merge branch 'main' into kalil0321/demo-mode 2025-11-13 22:37:38 -08:00
Magnus Müller d454a67091 Merge branch 'main' into fix-upgrade-command-syntax 2025-11-13 22:14:39 -08:00
LarsenCundric deea28b4bb InterruptedError is due to user interrupting, so should be warning 2025-11-13 21:46:52 -08:00
kalil0321 1c85a8a688 Fix lint 2025-11-13 15:49:43 +01:00
kalil0321 0988199776 Merge branch 'main' into kalil0321/demo-mode 2025-11-13 15:34:49 +01:00
Balázs Thomay dc9dbbeddd Fix upgrade command to use == instead of @ for uv compatibility 2025-11-13 12:17:56 +01:00
LarsenCundric a3e1ed7274 Skip if none 2025-11-12 22:24:56 -08:00
Magnus Müller 3505fe5d5f Merge branch 'main' into init-tui 2025-11-12 21:34:10 -08:00
mertunsall 1f758178da log too much 2025-11-12 21:20:49 -08:00
shawn pana e843be71d7 Merge branch 'main' into init-tui 2025-11-12 21:03:05 -08:00
ShawnPana bdb02ddc6a Fix lint: avoid private import usage for InquirerPy.fuzzy
- Use getattr(inquirer, 'fuzzy') to avoid pyright reportPrivateImportUsage error
- Apply ruff format to fix code formatting
2025-11-12 20:51:16 -08:00
reformedot 315995c092 Merge branch 'feat/improve-navigation' of github.com:browser-use/browser-use into feat/improve-navigation 2025-11-12 20:46:15 -08:00
reformedot bc8407ac8d refactor: refine exception propagation in create_task_with_error_handling
- Introduced a variable to hold exceptions for re-raising outside the try-except block, ensuring proper propagation to the event loop.
- Updated comments for clarity on the exception handling process in background tasks.
2025-11-12 20:46:06 -08:00
ShawnPana fe56d27424 Add fuzzy search TUI for template selection
- Replace ListPrompt with FuzzyPrompt for real-time search
- Add responsive layout based on terminal width
- Display author names for non-default templates
- Organize templates: defaults, featured, others
- Sort by last modified date within sections
- Remove default pre-selection for cleaner UX

Enhances template discovery with intuitive search and better organization.
2025-11-12 20:43:36 -08:00
Aitor c662b29b31 Merge branch 'main' into feat/improve-navigation 2025-11-13 05:37:09 +01:00
reformedot e7b8f2987c refactor: improve exception handling in create_task_with_error_handling
- Updated the logging behavior for exceptions in background tasks to log at warning level and re-raise exceptions for better propagation to the event loop's exception handler.
- Enhanced clarity in comments regarding exception retrieval and handling.
2025-11-12 20:36:47 -08:00
mertunsall a2e81f17d7 more logging 2025-11-12 20:28:23 -08:00
reformedot 13868aee9b refactor: update all_frames parameter handling in DomService
- Changed the type of the all_frames parameter to allow for None, enabling lazy fetching of cross-origin iframes only when necessary.
- Updated comments to clarify the behavior of all_frames during DOM tree construction.
2025-11-12 20:05:01 -08:00
reformedot b741c429d7 refactor: streamline event handling in BrowserSession
- Adjusted the structure of event handling for 'networkIdle' and 'load' events to improve readability and maintainability.
- Ensured that logging for page readiness is consistently executed within the event handling logic.
2025-11-12 20:02:38 -08:00
reformedot 78042d56a5 refactor: enhance error handling in DOMWatchdog tasks
- Updated the `create_task_with_error_handling` calls in `DOMWatchdog` to include the `suppress_exceptions` parameter, improving error management during DOM tree building and screenshot capturing.
- This change allows for better handling of exceptions without interrupting the flow of task execution.
2025-11-12 19:59:39 -08:00
reformedot 77d7f161fb refactor: enhance session management and error handling in BrowserSession
- Improved the `create_task_with_error_handling` function to allow for better exception logging and retrieval based on the `suppress_exceptions` parameter.
- Updated `SessionManager` to implement event-driven recovery for stale agent focus, replacing polling with efficient event handling.
- Refactored session retrieval methods to ensure focus validation and recovery are handled automatically.
- Enhanced logging for recovery processes and session management to provide clearer insights into state changes and errors.
- Adjusted various watchdogs to utilize the new session management methods, ensuring they correctly handle focus validation and session retrieval.
2025-11-12 19:42:24 -08:00
Aitor 0bc50831a9 Merge branch 'main' into feat/improve-navigation 2025-11-13 03:01:24 +01:00
reformedot 91e82ae85e chore: update cdp-use dependency version and increase max WebSocket frame size in BrowserSession
- Updated cdp-use dependency to version 1.4.4 for improved functionality.
- Increased max WebSocket frame size to 200MB in BrowserSession to accommodate large DOMs.
2025-11-12 18:00:14 -08:00
LarsenCundric d251105e64 Add http_client to Anthropic Chat 2025-11-12 17:58:38 -08:00
reformedot 060ab445a9 refactor: streamline target validation in BrowserSession 2025-11-12 16:44:07 -08:00
reformedot 9c1ce544e6 Merge branch 'feat/improve-navigation' of github.com:browser-use/browser-use into feat/improve-navigation 2025-11-12 16:12:39 -08:00
reformedot 74775cab9a refactor: update target discovery to include iframe types in session management 2025-11-12 16:12:22 -08:00
Aitor 585141afd7 Merge branch 'main' into feat/improve-navigation 2025-11-13 00:41:51 +01:00
reformedot bff596f2e7 refactor: remove target type caching and streamline target retrieval in session management
- Eliminated the caching of target types in SessionManager, simplifying the management of target information.
- Updated various components to directly access target types from the Target objects, enhancing clarity and reducing redundancy.
- Adjusted related methods in BrowserSession, CrashWatchdog, and DomService to reflect the changes in target type retrieval.
2025-11-12 15:19:34 -08:00
Mert Unsal 53af968e70 Merge branch 'main' into mert/add_ground_truth_to_judge 2025-11-12 11:36:07 -08:00
Mert Unsal 96266b6a26 Merge branch 'main' into fix/llm_readme 2025-11-12 11:32:53 -08:00
mertunsall dfbba0e062 add ground truth to judge 2025-11-12 11:16:40 -08:00
reformedot cca0ad034f refactor: streamline comments and remove unused method in session.py
- Simplified comments in session.py for clarity and conciseness.
- Removed the unused `disconnect` method from the CDPSession class.
- Updated references to session management in downloads_watchdog.py for consistency.
2025-11-12 10:48:16 -08:00
reformedot 07ec978100 refactor: simplify comment in downloads_watchdog.py for clarity 2025-11-12 10:09:56 -08:00
reformedot 352c1fdfe7 fix: correct indentation in popups_watchdog.py for improved readability 2025-11-12 10:01:34 -08:00
Cursor Agent 8f1b73335c Add 'polynomial' to excluded file extensions
Co-authored-by: mamagnus00 <mamagnus00@gmail.com>
2025-11-12 16:57:45 +00:00
Yangong cc2e4d800c fix: fix link in llm's readme 2025-11-12 11:46:23 +00:00
Yangong 84549433c9 fix: fix link in llm's readme 2025-11-12 11:40:58 +00:00
PredictiveManish 839c1412e2 Update: ClickableElementDetector.is_interactive to ignore elements marked inert or aria-hidden 2025-11-12 17:08:52 +05:30
reformedot e9656f7e0e chore: improved timing logging 2025-11-11 20:42:32 -08:00
reformedot 6859920d68 refactor: enhance timing breakdown in DOMWatchdog and DomService for improved performance insights
- Updated DOMWatchdog to provide a detailed hierarchical breakdown of timing metrics for various operations, improving clarity in performance logging.
- Enhanced DomService to calculate and log specific timing metrics for iframe scrolling, CDP calls, and snapshot processing, contributing to more accurate performance tracking.
2025-11-11 20:38:39 -08:00
reformedot 44045765b5 refactor: improve timing metrics in DOMWatchdog and DomService for enhanced performance tracking
- Updated DOMWatchdog to exclude specific sub-timings from total tracked time to avoid double-counting.
- Enhanced DomService to calculate and log overhead timings for both get_dom_tree and get_serialized_dom_tree operations, improving accuracy in performance metrics.
2025-11-11 20:12:52 -08:00
reformedot f960519d68 Merge branch 'feat/improve-navigation' of github.com:browser-use/browser-use into feat/improve-navigation 2025-11-11 19:52:06 -08:00