diff --git a/src/ui-modules/config-scanner.js b/src/ui-modules/config-scanner.js index 4b04137..042740f 100644 --- a/src/ui-modules/config-scanner.js +++ b/src/ui-modules/config-scanner.js @@ -29,6 +29,7 @@ export async function scanConfigFiles(currentConfig, providerPoolManager) { addToUsedPaths(usedPaths, currentConfig.ANTIGRAVITY_OAUTH_CREDS_FILE_PATH); addToUsedPaths(usedPaths, currentConfig.IFLOW_TOKEN_FILE_PATH); addToUsedPaths(usedPaths, currentConfig.ORCHIDS_CREDS_FILE_PATH); + addToUsedPaths(usedPaths, currentConfig.CODEX_OAUTH_CREDS_FILE_PATH); // 使用最新的提供商池数据 let providerPools = currentConfig.providerPools; @@ -46,6 +47,7 @@ export async function scanConfigFiles(currentConfig, providerPoolManager) { addToUsedPaths(usedPaths, provider.ANTIGRAVITY_OAUTH_CREDS_FILE_PATH); addToUsedPaths(usedPaths, provider.IFLOW_TOKEN_FILE_PATH); addToUsedPaths(usedPaths, provider.ORCHIDS_CREDS_FILE_PATH); + addToUsedPaths(usedPaths, provider.CODEX_OAUTH_CREDS_FILE_PATH); } } } @@ -227,6 +229,17 @@ function getFileUsageInfo(relativePath, fileName, usedPaths, currentConfig) { }); } + if (currentConfig.CODEX_OAUTH_CREDS_FILE_PATH && + (pathsEqual(relativePath, currentConfig.CODEX_OAUTH_CREDS_FILE_PATH) || + pathsEqual(relativePath, currentConfig.CODEX_OAUTH_CREDS_FILE_PATH.replace(/\\/g, '/')))) { + usageInfo.usageType = 'main_config'; + usageInfo.usageDetails.push({ + type: 'Main Config', + location: 'Codex OAuth credentials file path', + configKey: 'CODEX_OAUTH_CREDS_FILE_PATH' + }); + } + // 检查提供商池中的使用情况 if (currentConfig.providerPools) { // 使用 flatMap 将双重循环优化为单层循环 O(n) @@ -309,6 +322,18 @@ function getFileUsageInfo(relativePath, fileName, usedPaths, currentConfig) { configKey: 'ORCHIDS_CREDS_FILE_PATH' }); } + + if (provider.CODEX_OAUTH_CREDS_FILE_PATH && + (pathsEqual(relativePath, provider.CODEX_OAUTH_CREDS_FILE_PATH) || + pathsEqual(relativePath, provider.CODEX_OAUTH_CREDS_FILE_PATH.replace(/\\/g, '/')))) { + providerUsages.push({ + type: 'Provider Pool', + location: `Codex OAuth credentials (node ${index + 1})`, + providerType: providerType, + providerIndex: index, + configKey: 'CODEX_OAUTH_CREDS_FILE_PATH' + }); + } if (providerUsages.length > 0) { usageInfo.usageType = 'provider_pool'; diff --git a/static/app/upload-config-manager.js b/static/app/upload-config-manager.js index 3fcf96d..6951dde 100644 --- a/static/app/upload-config-manager.js +++ b/static/app/upload-config-manager.js @@ -849,6 +849,12 @@ function detectProviderFromPath(filePath) { providerType: 'claude-orchids-oauth', displayName: 'Orchids OAuth', shortName: 'orchids-oauth' + }, + { + patterns: ['configs/codex/', '/codex/'], + providerType: 'openai-codex-oauth', + displayName: 'OpenAI Codex OAuth', + shortName: 'codex-oauth' } ];