mirror of
https://github.com/CherryHQ/cherry-studio.git
synced 2026-01-06 21:35:52 +08:00
fix: Remove duplicate empty LM Studio providers
This commit is contained in:
parent
626e72a4fe
commit
da2137f8f1
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',
|
key: 'cherry-studio',
|
||||||
storage,
|
storage,
|
||||||
version: 71,
|
version: 72,
|
||||||
blacklist: ['runtime'],
|
blacklist: ['runtime'],
|
||||||
migrate
|
migrate
|
||||||
},
|
},
|
||||||
|
|||||||
@ -1110,6 +1110,17 @@ const migrateConfig = {
|
|||||||
state.minapps.enabled.push(monica)
|
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…
Reference in New Issue
Block a user