chore: last round of touchups and bug fixes
This commit is contained in:
7
.changeset/loose-poems-tickle.md
Normal file
7
.changeset/loose-poems-tickle.md
Normal file
@@ -0,0 +1,7 @@
|
|||||||
|
---
|
||||||
|
"task-master-ai": patch
|
||||||
|
---
|
||||||
|
|
||||||
|
Fix Zed MCP configuration by adding required "source" property
|
||||||
|
|
||||||
|
- Add "source": "custom" property to task-master-ai server in Zed settings.json
|
||||||
@@ -16,8 +16,6 @@
|
|||||||
import fs from 'fs';
|
import fs from 'fs';
|
||||||
import path from 'path';
|
import path from 'path';
|
||||||
import readline from 'readline';
|
import readline from 'readline';
|
||||||
import { fileURLToPath } from 'url';
|
|
||||||
import { dirname } from 'path';
|
|
||||||
import chalk from 'chalk';
|
import chalk from 'chalk';
|
||||||
import figlet from 'figlet';
|
import figlet from 'figlet';
|
||||||
import boxen from 'boxen';
|
import boxen from 'boxen';
|
||||||
@@ -49,9 +47,6 @@ import {
|
|||||||
GITIGNORE_FILE
|
GITIGNORE_FILE
|
||||||
} from '../src/constants/paths.js';
|
} from '../src/constants/paths.js';
|
||||||
|
|
||||||
const __filename = fileURLToPath(import.meta.url);
|
|
||||||
const __dirname = dirname(__filename);
|
|
||||||
|
|
||||||
// Define log levels
|
// Define log levels
|
||||||
const LOG_LEVELS = {
|
const LOG_LEVELS = {
|
||||||
debug: 0,
|
debug: 0,
|
||||||
@@ -619,13 +614,7 @@ function createProjectStructure(
|
|||||||
|
|
||||||
// Copy .gitignore with GitTasks preference
|
// Copy .gitignore with GitTasks preference
|
||||||
try {
|
try {
|
||||||
const gitignoreTemplatePath = path.join(
|
const templateContent = readAsset('gitignore', 'utf8');
|
||||||
__dirname,
|
|
||||||
'..',
|
|
||||||
'assets',
|
|
||||||
'gitignore'
|
|
||||||
);
|
|
||||||
const templateContent = fs.readFileSync(gitignoreTemplatePath, 'utf8');
|
|
||||||
manageGitignoreFile(
|
manageGitignoreFile(
|
||||||
path.join(targetDir, GITIGNORE_FILE),
|
path.join(targetDir, GITIGNORE_FILE),
|
||||||
templateContent,
|
templateContent,
|
||||||
|
|||||||
@@ -5077,7 +5077,7 @@ Examples:
|
|||||||
function setupCLI() {
|
function setupCLI() {
|
||||||
// Create a new program instance
|
// Create a new program instance
|
||||||
const programInstance = new Command()
|
const programInstance = new Command()
|
||||||
.name('dev')
|
.name('task-master')
|
||||||
.description('AI-driven development task management')
|
.description('AI-driven development task management')
|
||||||
.version(process.env.TM_PUBLIC_VERSION || 'unknown')
|
.version(process.env.TM_PUBLIC_VERSION || 'unknown')
|
||||||
.helpOption('-h, --help', 'Display help')
|
.helpOption('-h, --help', 'Display help')
|
||||||
@@ -5108,8 +5108,9 @@ function setupCLI() {
|
|||||||
*/
|
*/
|
||||||
async function runCLI(argv = process.argv) {
|
async function runCLI(argv = process.argv) {
|
||||||
try {
|
try {
|
||||||
// Display banner if not in a pipe
|
// Display banner if not in a pipe (except for init command which has its own banner)
|
||||||
if (process.stdout.isTTY) {
|
const isInitCommand = argv.includes('init');
|
||||||
|
if (process.stdout.isTTY && !isInitCommand) {
|
||||||
displayBanner();
|
displayBanner();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -142,6 +142,11 @@ function onPostConvertRulesProfile(targetDir, assetsDir) {
|
|||||||
// Transform to Zed format
|
// Transform to Zed format
|
||||||
const zedConfig = transformToZedFormat(mcpConfig);
|
const zedConfig = transformToZedFormat(mcpConfig);
|
||||||
|
|
||||||
|
// Add "source": "custom" to task-master-ai server for Zed
|
||||||
|
if (zedConfig['context_servers'] && zedConfig['context_servers']['task-master-ai']) {
|
||||||
|
zedConfig['context_servers']['task-master-ai'].source = 'custom';
|
||||||
|
}
|
||||||
|
|
||||||
// Write back the transformed config with proper formatting
|
// Write back the transformed config with proper formatting
|
||||||
fs.writeFileSync(
|
fs.writeFileSync(
|
||||||
mcpConfigPath,
|
mcpConfigPath,
|
||||||
|
|||||||
@@ -463,6 +463,17 @@ export function findConfigPath(explicitPath = null, args = null, log = null) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
logger.warn?.(`No configuration file found in project: ${projectRoot}`);
|
// Only warn once per command execution to prevent spam during init
|
||||||
|
const warningKey = `config_warning_${projectRoot}`;
|
||||||
|
|
||||||
|
if (!global._tmConfigWarningsThisRun) {
|
||||||
|
global._tmConfigWarningsThisRun = new Set();
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!global._tmConfigWarningsThisRun.has(warningKey)) {
|
||||||
|
global._tmConfigWarningsThisRun.add(warningKey);
|
||||||
|
logger.warn?.(`No configuration file found in project: ${projectRoot}`);
|
||||||
|
}
|
||||||
|
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user