mirror of
https://github.com/CherryHQ/cherry-studio.git
synced 2025-12-24 02:20:10 +08:00
fix: remove duplicate migration for web search providers
Resolve duplicate migration for adding Searxng and Exa web search providers by consolidating the migration logic into a single version
This commit is contained in:
parent
910bd30b24
commit
2cf67b59d2
@ -1219,11 +1219,18 @@ const migrateConfig = {
|
|||||||
'77': (state: RootState) => {
|
'77': (state: RootState) => {
|
||||||
if (state.websearch) {
|
if (state.websearch) {
|
||||||
if (!state.websearch.providers.find((p) => p.id === 'searxng')) {
|
if (!state.websearch.providers.find((p) => p.id === 'searxng')) {
|
||||||
state.websearch.providers.push({
|
state.websearch.providers.push(
|
||||||
|
{
|
||||||
id: 'searxng',
|
id: 'searxng',
|
||||||
name: 'Searxng',
|
name: 'Searxng',
|
||||||
apiHost: ''
|
apiHost: ''
|
||||||
})
|
},
|
||||||
|
{
|
||||||
|
id: 'exa',
|
||||||
|
name: 'Exa',
|
||||||
|
apiKey: ''
|
||||||
|
}
|
||||||
|
)
|
||||||
}
|
}
|
||||||
state.websearch.providers.forEach((p) => {
|
state.websearch.providers.forEach((p) => {
|
||||||
// @ts-ignore eslint-disable-next-line
|
// @ts-ignore eslint-disable-next-line
|
||||||
@ -1231,15 +1238,6 @@ const migrateConfig = {
|
|||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
return state
|
|
||||||
},
|
|
||||||
'77': (state: RootState) => {
|
|
||||||
state.websearch.providers.push({
|
|
||||||
id: 'exa',
|
|
||||||
name: 'Exa',
|
|
||||||
enabled: false,
|
|
||||||
apiKey: ''
|
|
||||||
})
|
|
||||||
return state
|
return state
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user