feat: add playwright

This commit is contained in:
2026-09-12 18:56:00 +02:00
parent a6cb0beade
commit dfe9926c7c
4 changed files with 313 additions and 1 deletions
+4
View File
@@ -7,6 +7,7 @@ import { discover } from "./provider.js";
import { descriptions, routingGuide } from "./routing.js";
import { QuotaTracker } from "./quota.js";
import { QuotaRpc } from "./quota-rpc.js";
import { playwrightMcpCommand } from "./playwright.js";
// Permission actions use wildcards, not filesystem globs.
function matches(value: string, pattern: string) {
@@ -113,8 +114,11 @@ export default Plugin.define({
const assignments = selected.mode === "gpt" ? gptAgents : selected.agents;
let workers: (typeof workerNames)[number][] = [];
const active = new Set<string>();
const playwrightCommand = await playwrightMcpCommand(context.location.directory);
await context.mcp.transform((editor) => {
if (!editor.get("playwright"))
editor.set("playwright", { type: "local", command: playwrightCommand });
hasCodegraph = editor.get("codegraph") !== undefined;
if (hasCodegraph)
editor.update("codegraph", (server) => {