From fa18a762628847f5cd23622c7de9fe5a7722c3b8 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Tue, 23 Sep 2025 23:50:03 +0000 Subject: [PATCH 1/3] Initial plan From 980fded5cd59b30de24492c66a3172f3dadf6716 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Tue, 23 Sep 2025 23:53:39 +0000 Subject: [PATCH 2/3] TASK-005: Replace manual Set creation with precomputed getEffectivelyEnabledItems Co-authored-by: AstroSteveo <34114851+AstroSteveo@users.noreply.github.com> --- .../playwright-generate-test.prompt.md | 19 +++++++++++++++++ apply-config.js | 21 +++---------------- 2 files changed, 22 insertions(+), 18 deletions(-) create mode 100644 .github/prompts/playwright-generate-test.prompt.md diff --git a/.github/prompts/playwright-generate-test.prompt.md b/.github/prompts/playwright-generate-test.prompt.md new file mode 100644 index 0000000..65a6f99 --- /dev/null +++ b/.github/prompts/playwright-generate-test.prompt.md @@ -0,0 +1,19 @@ +--- +mode: agent +description: 'Generate a Playwright test based on a scenario using Playwright MCP' +tools: ['changes', 'codebase', 'editFiles', 'fetch', 'findTestFiles', 'problems', 'runCommands', 'runTasks', 'runTests', 'search', 'searchResults', 'terminalLastCommand', 'terminalSelection', 'testFailure', 'playwright'] +model: 'Claude Sonnet 4' +--- + +# Test Generation with Playwright MCP + +Your goal is to generate a Playwright test based on the provided scenario after completing all prescribed steps. + +## Specific Instructions + +- You are given a scenario, and you need to generate a playwright test for it. If the user does not provide a scenario, you will ask them to provide one. +- DO NOT generate test code prematurely or based solely on the scenario without completing all prescribed steps. +- DO run steps one by one using the tools provided by the Playwright MCP. +- Only after all steps are completed, emit a Playwright TypeScript test that uses `@playwright/test` based on message history +- Save generated test file in the tests directory +- Execute the test file and iterate until the test passes diff --git a/apply-config.js b/apply-config.js index b1e5c65..9000d35 100755 --- a/apply-config.js +++ b/apply-config.js @@ -101,25 +101,10 @@ async function applyConfig(configPath = "awesome-copilot.config.yml") { }; // Import config manager for effective state computation - const { computeEffectiveItemStates } = require("./config-manager"); + const { getEffectivelyEnabledItems } = require("./config-manager"); - // Compute effective states using precedence rules - const effectiveStates = computeEffectiveItemStates(config); - - // Create sets of effectively enabled items for performance - const effectivelyEnabledSets = { - prompts: new Set(), - instructions: new Set(), - chatmodes: new Set() - }; - - for (const section of ["prompts", "instructions", "chatmodes"]) { - for (const [itemName, state] of Object.entries(effectiveStates[section])) { - if (state.enabled) { - effectivelyEnabledSets[section].add(itemName); - } - } - } + // Get precomputed sets of effectively enabled items for O(1) performance + const effectivelyEnabledSets = getEffectivelyEnabledItems(config); // Count enabled collections for summary if (config.collections) { From 47a4117c6cb05a06d46b3047392793694c86bec9 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Tue, 23 Sep 2025 23:54:21 +0000 Subject: [PATCH 3/3] Clean up: remove test-generated file from .github/prompts --- .../playwright-generate-test.prompt.md | 19 ------------------- 1 file changed, 19 deletions(-) delete mode 100644 .github/prompts/playwright-generate-test.prompt.md diff --git a/.github/prompts/playwright-generate-test.prompt.md b/.github/prompts/playwright-generate-test.prompt.md deleted file mode 100644 index 65a6f99..0000000 --- a/.github/prompts/playwright-generate-test.prompt.md +++ /dev/null @@ -1,19 +0,0 @@ ---- -mode: agent -description: 'Generate a Playwright test based on a scenario using Playwright MCP' -tools: ['changes', 'codebase', 'editFiles', 'fetch', 'findTestFiles', 'problems', 'runCommands', 'runTasks', 'runTests', 'search', 'searchResults', 'terminalLastCommand', 'terminalSelection', 'testFailure', 'playwright'] -model: 'Claude Sonnet 4' ---- - -# Test Generation with Playwright MCP - -Your goal is to generate a Playwright test based on the provided scenario after completing all prescribed steps. - -## Specific Instructions - -- You are given a scenario, and you need to generate a playwright test for it. If the user does not provide a scenario, you will ask them to provide one. -- DO NOT generate test code prematurely or based solely on the scenario without completing all prescribed steps. -- DO run steps one by one using the tools provided by the Playwright MCP. -- Only after all steps are completed, emit a Playwright TypeScript test that uses `@playwright/test` based on message history -- Save generated test file in the tests directory -- Execute the test file and iterate until the test passes