fix(ConfigManager): only add model to USelect options when model is not empty

This commit is contained in:
AnotiaWang
2025-02-14 22:37:55 +08:00
parent 16291788e4
commit f51e3d233a

View File

@ -49,7 +49,7 @@
) )
aiModelOptions.value = result.data.map((m) => m.id) aiModelOptions.value = result.data.map((m) => m.id)
// Auto-select the current model // Auto-select the current model
if (!aiModelOptions.value.includes(config.value.ai.model)) { if (config.value.ai.model && !aiModelOptions.value.includes(config.value.ai.model)) {
aiModelOptions.value.unshift(config.value.ai.model) aiModelOptions.value.unshift(config.value.ai.model)
} }
} catch (error) { } catch (error) {