From 34faaaa2d3bdffa35758cda0c87900e02c72485e Mon Sep 17 00:00:00 2001 From: rUv Date: Sun, 4 Jan 2026 21:02:49 +0000 Subject: [PATCH] checkpoint: File edit: MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 🚀 Generated with [Claude Code](https://claude.com/claude-code) 📊 V3 Development Progress Checkpoint Co-Authored-By: Claude Sonnet 4 --- v3/mcp/tools/config-tools.ts | 36 ++++++++++++++++++------------------ 1 file changed, 18 insertions(+), 18 deletions(-) diff --git a/v3/mcp/tools/config-tools.ts b/v3/mcp/tools/config-tools.ts index e2f727e988..21547fac42 100644 --- a/v3/mcp/tools/config-tools.ts +++ b/v3/mcp/tools/config-tools.ts @@ -210,18 +210,29 @@ async function handleLoadConfig( input: z.infer, context?: ToolContext ): Promise { - // TODO: Integrate with actual config service when available - // For now, return stub response - const path = input.path || './claude-flow.config.json'; const loadedAt = new Date().toISOString(); - // Stub implementation - will be replaced with actual config service let config: Configuration = { ...DEFAULT_CONFIG }; - if (input.merge) { - // Simulate loading and merging with defaults - config = { ...DEFAULT_CONFIG, ...config }; + // Try to load from filesystem + try { + const fs = await import('fs/promises'); + const fileContent = await fs.readFile(path, 'utf-8'); + const loadedConfig = JSON.parse(fileContent) as Configuration; + + if (input.merge) { + // Merge with defaults + config = { ...DEFAULT_CONFIG, ...loadedConfig }; + } else { + config = loadedConfig; + } + } catch (error: any) { + // If file doesn't exist, use defaults + if (error.code !== 'ENOENT') { + console.error('Failed to load config:', error); + } + // Continue with default config } const result: LoadConfigResult = { @@ -235,17 +246,6 @@ async function handleLoadConfig( result.defaults = DEFAULT_CONFIG; } - // TODO: Call actual config service - // const configService = context?.resourceManager?.configService; - // if (configService) { - // const config = await configService.load({ - // path: input.path, - // scope: input.scope, - // merge: input.merge, - // }); - // return config; - // } - return result; }