Merge remote-tracking branch 'origin/next' into add-complexity-score-to-task

This commit is contained in:
Ralph Khreish
2025-05-16 23:07:16 +02:00
45 changed files with 413 additions and 293 deletions

View File

@@ -16,7 +16,6 @@ import {
truncate,
isSilentMode
} from './utils.js';
import path from 'path';
import fs from 'fs';
import {
findNextTask,
@@ -24,6 +23,8 @@ import {
readComplexityReport
} from './task-manager.js';
import { getProjectName, getDefaultSubtasks } from './config-manager.js';
import { TASK_STATUS_OPTIONS } from '../../src/constants/task-status.js';
import { getTaskMasterVersion } from '../../src/utils/getVersion.js';
// Create a color gradient for the banner
const coolGradient = gradient(['#00b4d8', '#0077b6', '#03045e']);
@@ -50,17 +51,7 @@ function displayBanner() {
);
// Read version directly from package.json
let version = 'unknown'; // Initialize with a default
try {
const packageJsonPath = path.join(process.cwd(), 'package.json');
if (fs.existsSync(packageJsonPath)) {
const packageJson = JSON.parse(fs.readFileSync(packageJsonPath, 'utf8'));
version = packageJson.version;
}
} catch (error) {
// Silently fall back to default version
log('warn', 'Could not read package.json for version info.');
}
const version = getTaskMasterVersion();
console.log(
boxen(
@@ -468,7 +459,7 @@ function displayHelp() {
{
name: 'set-status',
args: '--id=<id> --status=<status>',
desc: 'Update task status (done, pending, etc.)'
desc: `Update task status (${TASK_STATUS_OPTIONS.join(', ')})`
},
{
name: 'update',
@@ -822,12 +813,7 @@ async function displayNextTask(tasksPath, complexityReportPath = null) {
'padding-bottom': 0,
compact: true
},
chars: {
mid: '',
'left-mid': '',
'mid-mid': '',
'right-mid': ''
},
chars: { mid: '', 'left-mid': '', 'mid-mid': '', 'right-mid': '' },
colWidths: [15, Math.min(75, process.stdout.columns - 20 || 60)],
wordWrap: true
});
@@ -926,12 +912,7 @@ async function displayNextTask(tasksPath, complexityReportPath = null) {
'padding-bottom': 0,
compact: true
},
chars: {
mid: '',
'left-mid': '',
'mid-mid': '',
'right-mid': ''
},
chars: { mid: '', 'left-mid': '', 'mid-mid': '', 'right-mid': '' },
wordWrap: true
});