fix: fixed next cli command handling

This commit is contained in:
Shrey Paharia
2025-04-23 21:25:42 +05:30
parent deaf4a6ff4
commit fdbb25e185
3 changed files with 23 additions and 17 deletions

View File

@@ -686,7 +686,7 @@ async function displayNextTask(tasksPath, complexityReportPath = null) {
const complexityReport = readComplexityReport(complexityReportPath);
// Find the next task
const nextTask = findNextTask(data.tasks);
const nextTask = findNextTask(data.tasks, complexityReport);
if (!nextTask) {
console.log(
@@ -759,6 +759,12 @@ async function displayNextTask(tasksPath, complexityReportPath = null) {
complexityReport
) // Pass complexityReport
],
[
chalk.cyan.bold('Complexity:'),
nextTask.complexityScore
? getComplexityWithColor(nextTask.complexityScore)
: chalk.gray('N/A')
],
[chalk.cyan.bold('Description:'), nextTask.description]
);