fix(AgentConfigSidebar): 修复无效配置的检查错误的问题
This commit is contained in:
parent
c47d0e9aab
commit
dc8f48513f
@ -495,15 +495,6 @@ const validateAndFilterConfig = () => {
|
||||
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;
|
||||
|
||||
Loading…
Reference in New Issue
Block a user