refactor(ide): delegate detection to handlers (#680)

This commit is contained in:
Alex Verkhovsky
2025-10-05 20:13:11 -07:00
committed by GitHub
parent c9ffe202d5
commit b999dd1315
4 changed files with 54 additions and 33 deletions

View File

@@ -80,6 +80,20 @@ class CodexSetup extends BaseIdeSetup {
};
}
/**
* Detect Codex installation by checking for BMAD prompt exports
*/
async detect(_projectDir) {
const destDir = this.getCodexPromptDir();
if (!(await fs.pathExists(destDir))) {
return false;
}
const entries = await fs.readdir(destDir);
return entries.some((entry) => entry.startsWith('bmad-'));
}
/**
* Collect Claude-style artifacts for Codex export.
* Returns the normalized artifact list for further processing.