Fix/claude code path executable setting (#1172)

Co-authored-by: Ralph Khreish <35776126+Crunchyman-ralph@users.noreply.github.com>
This commit is contained in:
Julien Pelletier
2025-09-22 22:39:37 +02:00
committed by GitHub
parent d67b81d25d
commit b5fe723f8e
3 changed files with 14 additions and 5 deletions

View File

@@ -0,0 +1,5 @@
---
"task-master-ai": patch
---
Fix Claude Code settings validation for pathToClaudeCodeExecutable

View File

@@ -310,6 +310,7 @@ function validateProviderModelCombination(providerName, modelId) {
function validateClaudeCodeSettings(settings) { function validateClaudeCodeSettings(settings) {
// Define the base settings schema without commandSpecific first // Define the base settings schema without commandSpecific first
const BaseSettingsSchema = z.object({ const BaseSettingsSchema = z.object({
pathToClaudeCodeExecutable: z.string().optional(),
maxTurns: z.number().int().positive().optional(), maxTurns: z.number().int().positive().optional(),
customSystemPrompt: z.string().optional(), customSystemPrompt: z.string().optional(),
appendSystemPrompt: z.string().optional(), appendSystemPrompt: z.string().optional(),

View File

@@ -14,20 +14,23 @@ function enhanceRooMCPConfiguration(mcpPath) {
log('warn', `[Roo] MCP configuration file not found at ${mcpPath}`); log('warn', `[Roo] MCP configuration file not found at ${mcpPath}`);
return; return;
} }
try { try {
// Read the existing configuration // Read the existing configuration
const mcpConfig = JSON.parse(fs.readFileSync(mcpPath, 'utf8')); const mcpConfig = JSON.parse(fs.readFileSync(mcpPath, 'utf8'));
if (mcpConfig.mcpServers && mcpConfig.mcpServers['task-master-ai']) { if (mcpConfig.mcpServers && mcpConfig.mcpServers['task-master-ai']) {
const server = mcpConfig.mcpServers['task-master-ai']; const server = mcpConfig.mcpServers['task-master-ai'];
// Add Roo-specific timeout enhancement for long-running AI operations // Add Roo-specific timeout enhancement for long-running AI operations
server.timeout = 300; server.timeout = 300;
// Write the enhanced configuration back // Write the enhanced configuration back
fs.writeFileSync(mcpPath, formatJSONWithTabs(mcpConfig) + '\n'); fs.writeFileSync(mcpPath, formatJSONWithTabs(mcpConfig) + '\n');
log('debug', `[Roo] Enhanced MCP configuration with timeout at ${mcpPath}`); log(
'debug',
`[Roo] Enhanced MCP configuration with timeout at ${mcpPath}`
);
} else { } else {
log('warn', `[Roo] task-master-ai server not found in MCP configuration`); log('warn', `[Roo] task-master-ai server not found in MCP configuration`);
} }