chore(extension): exit gracefully when waiting for extension connection (#754)

This commit is contained in:
Yury Semikhatsky
2025-07-24 16:02:02 -07:00
committed by GitHub
parent e0fb748ccc
commit e153ac3b7c
4 changed files with 21 additions and 16 deletions

View File

@@ -20,8 +20,8 @@ import * as mcpTransport from '../mcp/transport.js';
import type { FullConfig } from '../config.js';
export async function runWithExtension(config: FullConfig) {
const contextFactory = await startCDPRelayServer(config.browser.launchOptions.channel || 'chrome');
export async function runWithExtension(config: FullConfig, abortController: AbortController) {
const contextFactory = await startCDPRelayServer(config.browser.launchOptions.channel || 'chrome', abortController);
const serverBackendFactory = () => new BrowserServerBackend(config, contextFactory);
await mcpTransport.start(serverBackendFactory, config.server);
}