Skip to content

Voice-to-text dictation app with local (Nvidia Parakeet/Whisper) and cloud models (BYOK). Privacy-first and available cross-platform.

fix: sync custom prompts across windows without restart (#721)

Alcahest78496c0ce06f
diff --git a/src/stores/settingsStore.ts b/src/stores/settingsStore.ts
index 0cb7561ce..7540187b9 100644
--- a/src/stores/settingsStore.ts
+++ b/src/stores/settingsStore.ts
@@ -1662,6 +1662,16 @@ export async function initializeSettings(): Promise<void> {
if (!event.key || event.storageArea !== localStorage || event.newValue === null) return;
const { key, newValue } = event;
+
+ if (key.startsWith("customPrompt.")) {
+ const kind = key.slice("customPrompt.".length) as PromptKind;
+ if (!PROMPT_KIND_LIST.includes(kind)) return;
+ useSettingsStore.setState((s) => ({
+ customPrompts: { ...s.customPrompts, [kind]: newValue },
+ }));
+ return;
+ }
+
const state = useSettingsStore.getState();
if (!(key in state) || typeof (state as unknown as Record<string, unknown>)[key] === "function")
return;