Skip to content

Commit f48707f

Browse files
committed
Ellipsis comments
1 parent 0784970 commit f48707f

File tree

3 files changed

+13
-10
lines changed

3 files changed

+13
-10
lines changed

.changeset/chatty-ravens-study.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,4 @@
22
"roo-cline": minor
33
---
44

5-
Enabled Roo Cline to use pupetteer to prompt a browser and manually authenticate to site it cant by itself
5+
Enabled Roo Cline to use puppeteer and connect to a current browser which is already authenticated to multiple sites.

.github/workflows/code-qa.yml

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,9 @@ on:
77
types: [opened, reopened, ready_for_review, synchronize]
88
branches: [main]
99

10+
env:
11+
NODE_VERSION: '18'
12+
1013
jobs:
1114
code-qa:
1215
runs-on: ubuntu-latest
@@ -17,7 +20,7 @@ jobs:
1720
- name: Setup Node.js environment
1821
uses: actions/setup-node@v4
1922
with:
20-
node-version: '18'
23+
node-version: ${{ env.NODE_VERSION }}
2124

2225
- name: Cache node modules
2326
id: cache-node-modules
@@ -26,9 +29,9 @@ jobs:
2629
cache-name: cache-node-modules
2730
with:
2831
path: node_modules
29-
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('**/package-lock.json') }}
32+
key: ${{ runner.os }}-node-${{ env.NODE_VERSION }}-build-${{ env.cache-name }}-${{ hashFiles('**/package-lock.json') }}
3033
restore-keys: |
31-
${{ runner.os }}-build-${{ env.cache-name }}-
34+
${{ runner.os }}-node-${{ env.NODE_VERSION }}-build-${{ env.cache-name }}-
3235
${{ runner.os }}-build-
3336
${{ runner.os }}-
3437

src/services/browser/BrowserSession.ts

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ import pWaitFor from "p-wait-for"
66
import delay from "delay"
77
import { fileExistsAtPath } from "../../utils/fs"
88
import { BrowserActionResult } from "../../shared/ExtensionMessage"
9+
import axios from 'axios'
910

1011
export class BrowserSession {
1112
private context: vscode.ExtensionContext
@@ -34,10 +35,9 @@ export class BrowserSession {
3435

3536
if (this.isInteractive) {
3637
try {
37-
// Fetch the WebSocket endpoint from Chrome's debugging API
38-
const response = await fetch(`http://127.0.0.1:${this.browserPort}/json/version`)
39-
const data = await response.json()
40-
const browserWSEndpoint = data.webSocketDebuggerUrl
38+
// Fetch the WebSocket endpoint from Chrome's debugging API using axios
39+
const response = await axios.get(`http://127.0.0.1:${this.browserPort}/json/version`)
40+
const browserWSEndpoint = response.data.webSocketDebuggerUrl
4141

4242
if (!browserWSEndpoint) {
4343
throw new Error(`BrowserSession.ts :: launchBrowser :: Could not get webSocketDebuggerUrl from Chrome debugging API, port: ${this.browserPort}`)
@@ -47,8 +47,8 @@ export class BrowserSession {
4747
browserWSEndpoint,
4848
})
4949
} catch (error) {
50-
console.error("BrowserSession.ts :: launchBrowser :: Failed to connect to browser, make sure you have a running browser with --remote-debugging-port=7333", error)
51-
throw new Error(`BrowserSession.ts :: launchBrowser :: Failed to connect to browser: ${error.message}, make sure you have a running browser with --remote-debugging-port=7333`)
50+
console.error(`BrowserSession.ts :: launchBrowser :: Failed to connect to browser, make sure you have a running browser with --remote-debugging-port=${this.browserPort}`, error)
51+
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}`)
5252
}
5353
} else {
5454
this.browser = await launch({

0 commit comments

Comments
 (0)