fix: Remove duplicate empty LM Studio providers
This commit is contained in:
parent
7677850547
commit
b83343a8b9
Binary file not shown.
|
Before Width: | Height: | Size: 4.5 KiB After Width: | Height: | Size: 4.0 KiB |
@ -30,7 +30,7 @@ const persistedReducer = persistReducer(
|
||||
{
|
||||
key: 'cherry-studio',
|
||||
storage,
|
||||
version: 71,
|
||||
version: 72,
|
||||
blacklist: ['runtime'],
|
||||
migrate
|
||||
},
|
||||
|
||||
@ -1110,6 +1110,17 @@ const migrateConfig = {
|
||||
state.minapps.enabled.push(monica)
|
||||
}
|
||||
}
|
||||
|
||||
// remove duplicate lmstudio providers
|
||||
const emptyLmStudioProviderIndex = state.llm.providers.findLastIndex(
|
||||
(provider) => provider.id === 'lmstudio' && provider.models.length === 0
|
||||
)
|
||||
|
||||
if (emptyLmStudioProviderIndex !== -1) {
|
||||
state.llm.providers.splice(emptyLmStudioProviderIndex, 1)
|
||||
}
|
||||
|
||||
return state
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user