core: improve dependency management and error handling for more reliable builds

This commit is contained in:
Dax Raad
2025-10-14 01:33:25 -04:00
parent 19b3f3d7ce
commit b8249cde4b
6 changed files with 15 additions and 14 deletions

View File

@@ -526,11 +526,11 @@ export namespace Provider {
model_id: string
}[]
}
const models = state?.recently_used_models ?? []
if (models.length > 0) {
const [model] = state?.recently_used_models ?? []
if (model) {
return {
providerID: models[0].provider_id,
modelID: models[0].model_id,
providerID: model.provider_id,
modelID: model.model_id,
}
}
})