优化参数取值逻辑

This commit is contained in:
tsingliu 2026-02-08 14:39:05 +08:00
parent 94dccc0d2b
commit 2704c30131

View file

@ -113,7 +113,11 @@ async function runSetup(options: any = {}) {
// Load both to show current effective values as defaults
const globalConfig = loadJsonConfig(GLOBAL_CONFIG_FILE);
const localConfig = loadJsonConfig(LOCAL_CONFIG_FILE);
const currentConfig = { ...globalConfig, ...localConfig };
// If setting up Global (default), prioritize Global values for display, falling back to Local.
// If setting up Project, prioritize Project values (standard effective config).
const currentConfig = isProject
? { ...globalConfig, ...localConfig }
: { ...localConfig, ...globalConfig };
function maskSecret(secret?: string): string {
if (!secret || secret.length < 8) return '******';