mirror of
https://github.com/coleam00/bolt.new-any-llm
synced 2024-12-26 22:02:09 +00:00
fix: provider menu dropdown fix (ghost providers) (#862)
Some checks are pending
Update Stable Branch / prepare-release (push) Waiting to run
Some checks are pending
Update Stable Branch / prepare-release (push) Waiting to run
This commit is contained in:
parent
7295352a98
commit
d8943f9474
@ -60,15 +60,18 @@ export function useSettings() {
|
||||
if (savedProviders) {
|
||||
try {
|
||||
const parsedProviders: Record<string, IProviderSetting> = JSON.parse(savedProviders);
|
||||
Object.keys(parsedProviders).forEach((provider) => {
|
||||
const currentProvider = providers[provider];
|
||||
providersStore.setKey(provider, {
|
||||
...currentProvider,
|
||||
settings: {
|
||||
...parsedProviders[provider],
|
||||
enabled: parsedProviders[provider].enabled ?? true,
|
||||
},
|
||||
});
|
||||
Object.keys(providers).forEach((provider) => {
|
||||
const currentProviderSettings = parsedProviders[provider];
|
||||
|
||||
if (currentProviderSettings) {
|
||||
providersStore.setKey(provider, {
|
||||
...providers[provider],
|
||||
settings: {
|
||||
...currentProviderSettings,
|
||||
enabled: currentProviderSettings.enabled ?? true,
|
||||
},
|
||||
});
|
||||
}
|
||||
});
|
||||
} catch (error) {
|
||||
console.error('Failed to parse providers from cookies:', error);
|
||||
|
Loading…
Reference in New Issue
Block a user