Skip to content

Chrome DevTools for coding agents

fix: refresh context based on the browser instance (#44)

Alex Rudenko93f4579dd9ac
diff --git a/src/index.ts b/src/index.ts
index 6895cb05..0585f858 100644
--- a/src/index.ts
+++ b/src/index.ts
@@ -156,7 +156,7 @@ async function getContext(): Promise<McpContext> {
channel: args.channel as Channel,
isolated: args.isolated,
});
- if (!context) {
+ if (context?.browser !== browser) {
context = await McpContext.from(browser, logger);
}
return context;