fix: improve error handling, test options, and model configuration

- Enhance error validation in parse-prd.js and update-tasks.js
- Fix bug where mcpLog was incorrectly passed as logWrapper
- Improve error messages and response formatting
- Add --skip-verification flag to E2E tests
- Update MCP server config that ships with init to match new API key structure
- Fix task force/append handling in parse-prd command
- Increase column width in update-tasks display
This commit is contained in:
Eyal Toledano
2025-05-02 23:11:39 -04:00
parent 2e17437da3
commit 25ca1a45a0
8 changed files with 248 additions and 195 deletions

View File

@@ -514,15 +514,19 @@ function registerCommands(programInstance) {
const outputPath = options.output;
const force = options.force || false;
const append = options.append || false;
let useForce = false;
let useAppend = false;
// Helper function to check if tasks.json exists and confirm overwrite
async function confirmOverwriteIfNeeded() {
if (fs.existsSync(outputPath) && !force && !append) {
const shouldContinue = await confirmTaskOverwrite(outputPath);
if (!shouldContinue) {
console.log(chalk.yellow('Operation cancelled by user.'));
return false;
const overwrite = await confirmTaskOverwrite(outputPath); // Calls inquirer prompt
if (!overwrite) {
log('info', 'Operation cancelled.');
return false; // Exit if user selects 'N'
}
// If user confirms 'y', we should set useForce = true for the parsePRD call
useForce = true;
}
return true;
}
@@ -536,7 +540,10 @@ function registerCommands(programInstance) {
if (!(await confirmOverwriteIfNeeded())) return;
console.log(chalk.blue(`Generating ${numTasks} tasks...`));
await parsePRD(defaultPrdPath, outputPath, numTasks, { append });
await parsePRD(defaultPrdPath, outputPath, numTasks, {
useAppend,
useForce
});
return;
}

View File

@@ -275,7 +275,7 @@ async function updateTasks(
chalk.cyan.bold('Title'),
chalk.cyan.bold('Status')
],
colWidths: [5, 60, 10]
colWidths: [5, 70, 20]
});
tasksToUpdate.forEach((task) => {