From 5359a33dca1c053698ed44033ee9a4eea0976b7b Mon Sep 17 00:00:00 2001 From: He-Xun <1226807142@qq.com> Date: Sun, 8 Jun 2025 22:03:56 +0800 Subject: [PATCH] Fully revised as requested: restored all required checks, improved compatibility, and converted all comments to English. --- scripts/modules/config-manager.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/modules/config-manager.js b/scripts/modules/config-manager.js index d179f567..9e94a25b 100644 --- a/scripts/modules/config-manager.js +++ b/scripts/modules/config-manager.js @@ -547,7 +547,7 @@ function isApiKeySet(providerName, session = null, projectRoot = null) { * @returns {boolean} True if the key exists and is not a placeholder, false otherwise. */ function getMcpApiKeyStatus(providerName, projectRoot = null) { - // 1. 恢复rootDir检查和警告 + // 1. Restore rootDir check and warning const rootDir = projectRoot || findProjectRoot(); if (!rootDir) { console.warn( @@ -557,7 +557,7 @@ function getMcpApiKeyStatus(providerName, projectRoot = null) { } const mcpConfigPath = path.join(rootDir, '.cursor', 'mcp.json'); - // 2. 文件存在性检查,保留注释warn + // 2. File existence check, keep the commented warn if (!fs.existsSync(mcpConfigPath)) { // console.warn(chalk.yellow('Warning: .cursor/mcp.json not found.')); return false; // File doesn't exist