-
-
Notifications
You must be signed in to change notification settings - Fork 5
browser-use skill #142
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. Weβll occasionally send you account related emails.
Already on GitHub? Sign in to your account
browser-use skill #142
Conversation
Summary of ChangesHello @lvndry, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed! This pull request significantly enhances the system's capabilities by integrating a new Highlights
Changelog
Activity
Using Gemini Code AssistThe full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips. Invoking Gemini You can request assistance from Gemini at any point by creating a comment using either
Customization To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a Limitations & Feedback Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with π and π on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here. You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension. Footnotes
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Code Review
This pull request introduces a new browser-use skill with comprehensive documentation, and also includes a minor bug fix in the LLM stream processor. The documentation is well-structured, but I've identified a few examples that are inconsistent, potentially misleading, or confusing. My suggestions aim to improve the clarity and correctness of these examples to enhance user experience and prevent errors. The change to the stream processor appears to be a valid bug fix.
| # Sync additional domain to existing profile | ||
| browser-use --browser real --profile "Default" cookies export /tmp/cookies.json | ||
| browser-use --browser remote --profile <existing-id> cookies import /tmp/cookies.json |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The comment # Sync additional domain to existing profile is misleading. The provided command exports all cookies from the profile, not just those for a specific domain. This could lead to unintended data overwrites. The example should demonstrate how to correctly export cookies for a single domain, for example by using the --url flag.
| # Sync additional domain to existing profile | |
| browser-use --browser real --profile "Default" cookies export /tmp/cookies.json | |
| browser-use --browser remote --profile <existing-id> cookies import /tmp/cookies.json | |
| # Sync additional domain to existing profile | |
| browser-use --browser real --profile "Default" cookies export /tmp/cookies.json --url https://domain-to-add.com | |
| browser-use --browser remote --profile <existing-id> cookies import /tmp/cookies.json |
| browser-use cookies get # Get all cookies | ||
| browser-use cookies get --url <url> # Get cookies for specific URL | ||
| browser-use cookies set <name> <value> # Set a cookie | ||
| browser-use cookies set name val --domain .example.com --secure --http-only |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The example for cookies set is confusing because name and val are used as placeholders without the standard <> notation, making them look like literal values. Using a concrete, realistic example would be clearer for the user.
| browser-use cookies set name val --domain .example.com --secure --http-only | |
| browser-use cookies set session_id "abc123xyz" --domain .example.com --secure --http-only |
| - `browser.click(index)` - Click element | ||
| - `browser.type(text)` - Type text | ||
| - `browser.screenshot(path)` - Take screenshot | ||
| - `browser.scroll()` - Scroll page |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There is an inconsistency in the documentation for browser.scroll(). Here it is listed without arguments, but the example on line 359 uses it with a direction argument (browser.scroll('down')). To avoid confusion, the method signature should reflect that it accepts an argument.
| - `browser.scroll()` - Scroll page | |
| - `browser.scroll(direction)` - Scroll page |
| browser-use open https://example.com/products | ||
| browser-use python " | ||
| products = [] | ||
| for i in range(20): | ||
| browser.scroll('down') | ||
| browser.screenshot('products.png') | ||
| " | ||
| browser-use python "print(f'Captured {len(products)} products')" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The example under 'Data Extraction with Python' is confusing as it initializes an empty products list but never populates it. Consequently, the final print statement will always show 'Captured 0 products', which does not demonstrate data extraction. To prevent misleading users, the example should be simplified to only show the actions it actually performs: scrolling and screenshotting.
| browser-use open https://example.com/products | |
| browser-use python " | |
| products = [] | |
| for i in range(20): | |
| browser.scroll('down') | |
| browser.screenshot('products.png') | |
| " | |
| browser-use python "print(f'Captured {len(products)} products')" | |
| browser-use open https://example.com/products | |
| browser-use python " | |
| for i in range(20): | |
| browser.scroll('down') | |
| browser.screenshot('products.png') | |
| " |
Description
Type of Change
Checklist