fix(AgentConfigSidebar): 修复无效配置的检查错误的问题

This commit is contained in:
Wenjie Zhang 2025-09-02 19:53:12 +08:00
parent c47d0e9aab
commit dc8f48513f

View File

@ -495,15 +495,6 @@ const validateAndFilterConfig = () => {
console.warn(`配置项 ${key} 中包含无效的选项,已自动过滤`); console.warn(`配置项 ${key} 中包含无效的选项,已自动过滤`);
} }
} }
// ( options list )
else if (configItem.options && configItem.type !== 'list' && currentValue !== undefined) {
const validOptions = configItem.options;
if (!validOptions.includes(currentValue)) {
console.warn(`配置项 ${key} 的值 "${currentValue}" 不在有效选项中,将重置为默认值`);
validatedConfig[key] = configItem.default || validOptions[0] || null;
}
}
}); });
return validatedConfig; return validatedConfig;