fix: expand_all now uses complexity analysis recommendations (#1287)

Co-authored-by: Claude <noreply@anthropic.com>
This commit is contained in:
Ralph Khreish
2025-10-11 11:54:31 +02:00
committed by GitHub
parent 25a00dca67
commit 90e6bdcf1c
5 changed files with 116 additions and 7 deletions

View File

@@ -10,7 +10,10 @@ import {
withNormalizedProjectRoot
} from './utils.js';
import { expandAllTasksDirect } from '../core/task-master-core.js';
import { findTasksPath } from '../core/utils/path-utils.js';
import {
findTasksPath,
resolveComplexityReportOutputPath
} from '../core/utils/path-utils.js';
import { resolveTag } from '../../../scripts/modules/utils.js';
/**
@@ -85,6 +88,14 @@ export function registerExpandAllTool(server) {
);
}
// Resolve complexity report path to use recommendations from analyze-complexity
const complexityReportPath = resolveComplexityReportOutputPath(
null,
{ projectRoot: args.projectRoot, tag: resolvedTag },
log
);
log.info(`Using complexity report path: ${complexityReportPath}`);
const result = await expandAllTasksDirect(
{
tasksJsonPath: tasksJsonPath,
@@ -93,7 +104,8 @@ export function registerExpandAllTool(server) {
prompt: args.prompt,
force: args.force,
projectRoot: args.projectRoot,
tag: resolvedTag
tag: resolvedTag,
complexityReportPath
},
log,
{ session }