Skip to content

Commit b89eff0

Browse files
committed
🤖 fix: dispatch providers-config-changed on coupon save
ProvidersSection was not notifying useModelLRU when provider configs (like mux-gateway coupon) were saved. This caused models to only appear after navigating away and back to ChatInput. _Generated with mux_
1 parent 89a3209 commit b89eff0

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)