Skip to content

Commit 1e50619

Browse files
committed
Fix: add dialog handling instruction in McpResponse.format
1 parent 4202513 commit 1e50619

File tree

1 file changed

+10
-7
lines changed

1 file changed

+10
-7
lines changed

src/browser.ts

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -90,13 +90,16 @@ export async function launch(options: McpLaunchOptions): Promise<Browser> {
9090
if (customDevTools) {
9191
args.push(`--custom-devtools-frontend=file://${customDevTools}`);
9292
}
93-
let puppeterChannel: ChromeReleaseChannel | undefined;
94-
if (!executablePath) {
95-
puppeterChannel =
96-
channel && channel !== 'stable'
97-
? (`chrome-${channel}` as ChromeReleaseChannel)
98-
: 'chrome';
99-
}
93+
// Prefer executablePath over channel
94+
let puppeterChannel: ChromeReleaseChannel | undefined;
95+
if (!executablePath) {
96+
puppeterChannel =
97+
channel && channel !== 'stable'
98+
? (`chrome-${channel}` as ChromeReleaseChannel)
99+
: 'chrome';
100+
} else {
101+
puppeterChannel = undefined; // <-- ensures channel is not set when executablePath is used
102+
}
100103

101104
try {
102105
const browser = await puppeteer.launch({

0 commit comments

Comments
 (0)