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 path from 'path';
|
||||
import readline from 'readline';
|
||||
import { fileURLToPath } from 'url';
|
||||
import { dirname } from 'path';
|
||||
import chalk from 'chalk';
|
||||
import figlet from 'figlet';
|
||||
import boxen from 'boxen';
|
||||
@@ -49,9 +47,6 @@ import {
|
||||
GITIGNORE_FILE
|
||||
} from '../src/constants/paths.js';
|
||||
|
||||
const __filename = fileURLToPath(import.meta.url);
|
||||
const __dirname = dirname(__filename);
|
||||
|
||||
// Define log levels
|
||||
const LOG_LEVELS = {
|
||||
debug: 0,
|
||||
@@ -619,13 +614,7 @@ function createProjectStructure(
|
||||
|
||||
// Copy .gitignore with GitTasks preference
|
||||
try {
|
||||
const gitignoreTemplatePath = path.join(
|
||||
__dirname,
|
||||
'..',
|
||||
'assets',
|
||||
'gitignore'
|
||||
);
|
||||
const templateContent = fs.readFileSync(gitignoreTemplatePath, 'utf8');
|
||||
const templateContent = readAsset('gitignore', 'utf8');
|
||||
manageGitignoreFile(
|
||||
path.join(targetDir, GITIGNORE_FILE),
|
||||
templateContent,
|
||||
|
||||
@@ -5077,7 +5077,7 @@ Examples:
|
||||
function setupCLI() {
|
||||
// Create a new program instance
|
||||
const programInstance = new Command()
|
||||
.name('dev')
|
||||
.name('task-master')
|
||||
.description('AI-driven development task management')
|
||||
.version(process.env.TM_PUBLIC_VERSION || 'unknown')
|
||||
.helpOption('-h, --help', 'Display help')
|
||||
@@ -5108,8 +5108,9 @@ function setupCLI() {
|
||||
*/
|
||||
async function runCLI(argv = process.argv) {
|
||||
try {
|
||||
// Display banner if not in a pipe
|
||||
if (process.stdout.isTTY) {
|
||||
// Display banner if not in a pipe (except for init command which has its own banner)
|
||||
const isInitCommand = argv.includes('init');
|
||||
if (process.stdout.isTTY && !isInitCommand) {
|
||||
displayBanner();
|
||||
}
|
||||
|
||||
|
||||
@@ -142,6 +142,11 @@ function onPostConvertRulesProfile(targetDir, assetsDir) {
|
||||
// Transform to Zed format
|
||||
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
|
||||
fs.writeFileSync(
|
||||
mcpConfigPath,
|
||||
|
||||
@@ -463,6 +463,17 @@ export function findConfigPath(explicitPath = null, args = null, log = null) {
|
||||
}
|
||||
}
|
||||
|
||||
// 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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user