-
Notifications
You must be signed in to change notification settings - Fork 2.7k
Enable Chrome Browser Takeover Mode with Remote Debugging Integration #12
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
Conversation
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.
👍 Looks good to me! Reviewed everything up to a0654dd in 37 seconds
More details
- Looked at
288lines of code in5files - Skipped
1files when reviewing. - Skipped posting
5drafted comments based on config settings.
1. src/services/browser/BrowserSession.ts:27
- Draft comment:
Switching frompuppeteer-corewithpuppeteer-chromium-resolvertopuppeteermeans the default Chromium bundled with Puppeteer will be used. Ensure this is the intended behavior, as it might affect the browser version used. - Reason this comment was not posted:
Confidence changes required:50%
The PR removes the use of puppeteer-chromium-resolver and directly uses puppeteer. This change simplifies the code by removing the need to ensure Chromium exists separately. However, it also means that the default Chromium bundled with Puppeteer will be used, which might not be the desired behavior if a specific Chromium version is needed.
2. src/services/browser/UrlContentFetcher.ts:21
- Draft comment:
Switching frompuppeteer-corewithpuppeteer-chromium-resolvertopuppeteermeans the default Chromium bundled with Puppeteer will be used. Ensure this is the intended behavior, as it might affect the browser version used. - Reason this comment was not posted:
Confidence changes required:50%
The PR removes the use of puppeteer-chromium-resolver and directly uses puppeteer. This change simplifies the code by removing the need to ensure Chromium exists separately. However, it also means that the default Chromium bundled with Puppeteer will be used, which might not be the desired behavior if a specific Chromium version is needed.
3. src/services/browser/BrowserSession.ts:20
- Draft comment:
Ensure to handle errors properly in asynchronous functions using try/catch blocks. This is required by our Development Standards: https://www.notion.so/Development-Standards-59febcf8ead647fd9c2ec3f60c22f3df?pvs=4#11869ad2d58180bc982fd2d560354e47 - Reason this comment was not posted:
Decided after close inspection that this draft comment was likely wrong and/or not actionable:
The comment is about error handling in asynchronous functions, which is a valid concern. However, the main asynchronous function, doAction, already has error handling. The other functions, launchBrowser and closeBrowser, are simpler and may not need additional error handling. The comment might be unnecessary given the current code structure.
I might be underestimating the need for error handling in the launchBrowser and closeBrowser methods. They could potentially throw errors that should be caught.
While it's possible that launchBrowser and closeBrowser could benefit from error handling, the current implementation of doAction already covers the main asynchronous operations. The comment may not be necessary unless specific issues are identified in those methods.
The comment about adding try/catch blocks for error handling in asynchronous functions should be deleted, as the main asynchronous function already has error handling, and the other functions are simpler and may not require it.
4. src/services/browser/UrlContentFetcher.ts:17
- Draft comment:
Ensure to handle errors properly in asynchronous functions using try/catch blocks. This is required by our Development Standards: https://www.notion.so/Development-Standards-59febcf8ead647fd9c2ec3f60c22f3df?pvs=4#11869ad2d58180bc982fd2d560354e47 - Reason this comment was not posted:
Marked as duplicate.
5. README.md:2
- Draft comment:
The PR description should be more comprehensive, including what is being changed, why it is being changed, how it has been tested, any related tickets/issues, and any visual/UI changes with before & after screenshots. This is required by our Development Standards: https://www.notion.so/Development-Standards-59febcf8ead647fd9c2ec3f60c22f3df?pvs=4#11869ad2d58180429648e12f7977d646 - Reason this comment was not posted:
Comment did not seem useful.
Workflow ID: wflow_BNGOOpIFSJHSJUJ2
You can customize Ellipsis with 👍 / 👎 feedback, review rules, user-specific overrides, quiet mode, and more.
|
Can you build a new executable as part of this PR? |
I think i'll even add |
@a8trejo We shouldn't need to, once these changes are ready, just bump the version number as part of the PR; once my small PR is merged, we will be able to get the latest version of Roo-Cline installed from AWS CodeArtifact |
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.
Skipped PR review on 3630fe3 because no changed files had a supported extension. If you think this was in error, please contact us and we'll fix it right away.
@ColemanRoo could you give it another review? I think these |
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.
❌ Changes requested. Incremental review on ffd3562 in 57 seconds
More details
- Looked at
194lines of code in5files - Skipped
2files when reviewing. - Skipped posting
1drafted comments based on config settings.
1. .github/workflows/release.yml:1
- Draft comment:
The PR description should be more comprehensive. It should include details on what is being changed, why it is being changed, how it has been tested, any related tickets/issues, and any visual/UI changes with before & after screenshots. This is from our Development Standards: https://www.notion.so/Development-Standards-59febcf8ead647fd9c2ec3f60c22f3df?pvs=4#11869ad2d58180429648e12f7977d646 - Reason this comment was not posted:
Comment did not seem useful.
Workflow ID: wflow_2bIH36qNSP33vwoR
Want Ellipsis to fix these issues? Tag @ellipsis-dev in a comment. You can customize Ellipsis with 👍 / 👎 feedback, review rules, user-specific overrides, quiet mode, and more.
@a8trejo Can you bump the version number in the package.json file where it is used? Or will that be handled by the GitHub Actions? |
…ature/pupeteer-updates
… prompting interactive mode text
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.
❌ Changes requested. Incremental review on fe1d823 in 1 minute and 12 seconds
More details
- Looked at
609lines of code in5files - Skipped
1files when reviewing. - Skipped posting
4drafted comments based on config settings.
1. src/services/browser/BrowserSession.ts:45
- Draft comment:
Consider providing more context in the error message when failing to connect to the browser. This can help with debugging issues related to browser connection. - Reason this comment was not posted:
Confidence changes required:70%
The error handling in thelaunchBrowsermethod should be improved to provide more context about the failure.
2. src/services/browser/BrowserSession.ts:142
- Draft comment:
Ensure that actions are not performed when the browser is in interactive mode, as users have manual control in this mode. - Reason this comment was not posted:
Marked as duplicate.
3. src/services/browser/BrowserSession.ts:112
- Draft comment:
Ensure that actions are not performed when the browser is in interactive mode, as users have manual control in this mode. This comment also applies to other action methods likeclick,scrollDown, andscrollUp. - Reason this comment was not posted:
Comment did not seem useful.
4. src/services/browser/BrowserSession.ts:44
- Draft comment:
Using async/await makes asynchronous code more readable and easier to maintain than chaining .then() calls. Please refactor this to use async/await. This is from our Development Standards: Development Standards. - Reason this comment was not posted:
Comment looked like it was already resolved.
Workflow ID: wflow_R0aY9OKvGHK2dOjt
Want Ellipsis to fix these issues? Tag @ellipsis-dev in a comment. You can customize Ellipsis with 👍 / 👎 feedback, review rules, user-specific overrides, quiet mode, and more.
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.
❌ Changes requested. Incremental review on b0e48c5 in 49 seconds
More details
- Looked at
171lines of code in3files - Skipped
0files when reviewing. - Skipped posting
2drafted comments based on config settings.
1. src/services/browser/BrowserSession.ts:51
- Draft comment:
The error message should dynamically reflect thebrowserPortbeing used instead of hardcoding port 7333.
throw new Error(`BrowserSession.ts :: launchBrowser :: Failed to connect to browser: ${error.message}, make sure you have a running browser with --remote-debugging-port=${this.browserPort}`)
- Reason this comment was not posted:
Marked as duplicate.
2. src/core/Cline.ts:722
- Draft comment:
Consider replacing the .then() with async/await for consistency and readability, as per our Development Standards: https://www.notion.so/Development-Standards-59febcf8ead647fd9c2ec3f60c22f3df?pvs=4#11869ad2d581809f9af3fdba09412ef6 - Reason this comment was not posted:
Comment was not on a valid diff hunk.
Workflow ID: wflow_IgXYB7qXRW1NQjqC
Want Ellipsis to fix these issues? Tag @ellipsis-dev in a comment. You can customize Ellipsis with 👍 / 👎 feedback, review rules, user-specific overrides, quiet mode, and more.
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.
👍 Looks good to me! Incremental review on 3ad3bdc in 21 seconds
More details
- Looked at
26lines of code in2files - Skipped
1files when reviewing. - Skipped posting
2drafted comments based on config settings.
1. package.json:137
- Draft comment:
Theinstall:allscript was updated to removeco:install, but this change is not mentioned in the PR description. Consider updating the description for clarity. - Reason this comment was not posted:
Confidence changes required:50%
Theinstall:allscript in package.json was updated, but the change was not reflected in the PR description.
2. .npmrc:1
- Draft comment:
The PR description should be more comprehensive and follow the required format from our Development Standards: https://www.notion.so/Development-Standards-59febcf8ead647fd9c2ec3f60c22f3df?pvs=4#11869ad2d58180429648e12f7977d646. It should include what is being changed, why it is being changed, how it has been tested, any related tickets/issues, and any visual/UI changes with before & after screenshots if applicable. - Reason this comment was not posted:
Comment did not seem useful.
Workflow ID: wflow_AytEytIoajhijQX9
You can customize Ellipsis with 👍 / 👎 feedback, review rules, user-specific overrides, quiet mode, and more.
| # If quiet mode is enabled, Ellipsis will only leave reviews when it has comments, so “Looks good to me” reviews | ||
| # will be skipped. This can reduce clutter. | ||
| quiet: false | ||
| quiet: true |
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.
let me know if anyone has strong objections against this, but I find it to be too much spam every time I get a "Looks good to me" email, not to mention how long it makes a PR conversation
|
@ellipsis-dev can you remove all your "Looks good to me" comments? |
|
I can't remove comments from the pull request. Please let me know if there's anything else I can assist with. |
src/core/Cline.ts
Outdated
| const wasInteractiveBrowser = (lastRelevantMessageIndex > 0) ? modifiedClineMessages[lastRelevantMessageIndex - 1].text?.includes("interactive mode") : false | ||
| let hadBrowserPort = ''; | ||
| if ( wasInteractiveBrowser ) { | ||
| const match = modifiedClineMessages[lastRelevantMessageIndex - 1].text?.match(/\(browserPort\s*=\s*(\d+)\)/) |
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.
Parsing the string doesn't feel that with the grain of how the rest of this code works. Could we make it a checkbox or an option on the settings page instead?
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.
I tried having Cline find a better solution and spent like $30 and its solutions never worked, this was the only way I got this to work
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.
Did you try the settings 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.
I'm not sure I follow
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.
Can we think of this as an option on the settings screen where you choose to either use the built in browser or your own that’s accessible on a specific port? And then we just have conditional logic in the implementation of the browser tool based on your settings.
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.
I agree with the suggestion to add this feature to the settings page. A text input to accept the port your browser is listening seems ideal. Also probably need so error handling in case it can't connect (and/or maybe a fallback to the built-in browser).
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.
…ature/pupeteer-updates
…ature/pupeteer-updates
…ature/pupeteer-updates
… of parsing the prompt
…ature/pupeteer-updates
| }) | ||
| } | ||
| } catch (error) { | ||
| console.log(`BrowserSession.ts :: launchBrowser :: Failed to connect to browser, falling back to regular launch mode. Error: ${error.message}`) |
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.
Use structured logging and proper error handling instead of console.log for errors. Implement try/catch blocks and use appropriate logging levels (info, warn, error) for better debugging. This is from our Development Standards: https://www.notion.so/Development-Standards-59febcf8ead647fd9c2ec3f60c22f3df?pvs=4#11869ad2d58180bc982fd2d560354e47
…ature/pupeteer-updates
🦋 Changeset detectedLatest commit: 4e0cc31 The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
…mode to chat while cline analyses the browser
…ature/pupeteer-updates
…ature/pupeteer-updates
|
Closing since MCP servers can do this |

Added changes to allow Cline to take over a chrome browser opened with the
remote-debugging-portflag, this way it can help with tasks on the same browser we're using, it also makes it easier for it to get past authentication since in our browser we'll already be authenticated to the systems we normally use. Ex: cypress cloud, posthog, etc.You'll need to specify on the extension settings the following

In order for it to work it requires a browser instance running on the specified port, ex:
/Applications/Google\ Chrome\ Canary.app/Contents/MacOS/Google\ Chrome\ Canary --remote-debugging-port=7333, otherwise it'll just prompt a newpuppeteerbrowserExample prompt:
Other changes
changesetto manage versions inpackage.jsondocsfolder to share useful promptsbrowser_actionsnapshotto allow cline to connect to your current URL instead of having to launch a new oneDemo video:
https://www.loom.com/share/cda6fbbe93454265abf79731e139fb82
Important
Adds interactive mode for Puppeteer to connect to existing Chrome instances, updates setup, release workflows, and UI for new settings.
Cline.tsandBrowserSession.tsfor Puppeteer to connect to existing Chrome instances viaremote-debugging-port.interactive modeandbrowserPortin prompts.changesetfor version management inpackage.json.README.mdwith new setup and packaging instructions.install:allscript inpackage.json.release.ymlfor automated versioning and publishing.code-qa.ymlto cache node modules.puppeteer-corewithpuppeteerinBrowserSession.tsandUrlContentFetcher.ts.ensureChromiumExists()method fromBrowserSessionandUrlContentFetcher.SettingsView.tsxto include interactive mode settings.ExtensionStateContext.tsxto manage new state properties.This description was created by
for 59e976a. It will automatically update as commits are pushed.