This commit is contained in:
Timothy J. Baek 2024-10-23 15:33:13 -07:00
parent d4c42dcfa9
commit 51265b4683

View File

@ -475,9 +475,13 @@
selectedModels = $config?.default_models.split(',');
}
if (selectedModels.length === 1 && selectedModels[0] === '') {
selectedModels = selectedModels.filter((modelId) => $models.map((m) => m.id).includes(modelId));
if (selectedModels.length === 0 || (selectedModels.length === 1 && selectedModels[0] === '')) {
if ($models.length > 0) {
selectedModels = [$models[0].id];
} else {
selectedModels = [''];
}
}