Skip to content

Commit ebb8e1b

Browse files
🤖 fix: dispatch providers-config-changed on coupon save (#808)
ProvidersSection was not notifying useModelLRU when provider configs (like mux-gateway coupon) were saved. This caused mux-gateway models to only appear after navigating away and back to ChatInput. Now dispatches `providers-config-changed` after saves, matching ModelsSection. _Generated with `mux`_
1 parent 463fad6 commit ebb8e1b

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

src/browser/components/Settings/sections/ProvidersSection.tsx

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -116,6 +116,9 @@ export function ProvidersSection() {
116116
setConfig(cfg);
117117
setEditingField(null);
118118
setEditValue("");
119+
120+
// Notify other components about the change
121+
window.dispatchEvent(new Event("providers-config-changed"));
119122
} finally {
120123
setSaving(false);
121124
}
@@ -127,6 +130,9 @@ export function ProvidersSection() {
127130
await window.api.providers.setProviderConfig(provider, [field], "");
128131
const cfg = await window.api.providers.getConfig();
129132
setConfig(cfg);
133+
134+
// Notify other components about the change
135+
window.dispatchEvent(new Event("providers-config-changed"));
130136
} finally {
131137
setSaving(false);
132138
}

0 commit comments

Comments
 (0)