TASK-005: Replace manual Set creation with precomputed getEffectivelyEnabledItems

Co-authored-by: AstroSteveo <34114851+AstroSteveo@users.noreply.github.com>
This commit is contained in:
copilot-swe-agent[bot] 2025-09-23 23:53:39 +00:00
parent fa18a76262
commit 980fded5cd
2 changed files with 22 additions and 18 deletions

View File

@ -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

View File

@ -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) {