feat: Add .taskmaster directory (#619)

This commit is contained in:
Ralph Khreish
2025-05-31 16:21:03 +02:00
committed by Eyal Toledano
parent 78397fe0be
commit 518f73eefa
148 changed files with 3523 additions and 7642 deletions

View File

@@ -11,8 +11,8 @@ import {
} from './utils.js';
import { listTasksDirect } from '../core/task-master-core.js';
import {
findTasksJsonPath,
findComplexityReportPath
resolveTasksPath,
resolveComplexityReportPath
} from '../core/utils/path-utils.js';
/**
@@ -55,13 +55,10 @@ export function registerListTasksTool(server) {
try {
log.info(`Getting tasks with filters: ${JSON.stringify(args)}`);
// Use args.projectRoot directly (guaranteed by withNormalizedProjectRoot)
// Resolve the path to tasks.json using new path utilities
let tasksJsonPath;
try {
tasksJsonPath = findTasksJsonPath(
{ projectRoot: args.projectRoot, file: args.file },
log
);
tasksJsonPath = resolveTasksPath(args, session);
} catch (error) {
log.error(`Error finding tasks.json: ${error.message}`);
return createErrorResponse(
@@ -72,14 +69,13 @@ export function registerListTasksTool(server) {
// Resolve the path to complexity report
let complexityReportPath;
try {
complexityReportPath = findComplexityReportPath(
args.projectRoot,
args.complexityReport,
log
);
complexityReportPath = resolveComplexityReportPath(args, session);
} catch (error) {
log.error(`Error finding complexity report: ${error.message}`);
// This is optional, so we don't fail the operation
complexityReportPath = null;
}
const result = await listTasksDirect(
{
tasksJsonPath: tasksJsonPath,