fix(parse-prd): simplifies append and force variable names across the chain to avoid confusion. parse-prd append tested on MCP and the fix is good to go. Also adjusts e2e test to properly capture costs.

This commit is contained in:
Eyal Toledano
2025-05-17 20:10:53 -04:00
parent fcd80623b6
commit cd6e42249e
4 changed files with 122 additions and 68 deletions

View File

@@ -105,11 +105,9 @@ export async function parsePRDDirect(args, log, context = {}) {
}
}
const useForce = force === true;
const useAppend = append === true;
if (useAppend) {
if (append) {
logWrapper.info('Append mode enabled.');
if (useForce) {
if (force) {
logWrapper.warn(
'Both --force and --append flags were provided. --force takes precedence; append mode will be ignored.'
);
@@ -117,7 +115,7 @@ export async function parsePRDDirect(args, log, context = {}) {
}
logWrapper.info(
`Parsing PRD via direct function. Input: ${inputPath}, Output: ${outputPath}, NumTasks: ${numTasks}, Force: ${useForce}, Append: ${useAppend}, ProjectRoot: ${projectRoot}`
`Parsing PRD via direct function. Input: ${inputPath}, Output: ${outputPath}, NumTasks: ${numTasks}, Force: ${force}, Append: ${append}, ProjectRoot: ${projectRoot}`
);
const wasSilent = isSilentMode();
@@ -135,8 +133,8 @@ export async function parsePRDDirect(args, log, context = {}) {
session,
mcpLog: logWrapper,
projectRoot,
useForce,
useAppend,
force,
append,
commandName: 'parse-prd',
outputType: 'mcp'
},