Voice-to-text dictation app with local (Nvidia Parakeet/Whisper) and cloud models (BYOK). Privacy-first and available cross-platform.
JavaScript aianthropiccross-platformgeminigroqlinuxmacosnvidiaopen-sourceopenaiparakeetspeech-to-texttranscribewhisperwindows
style: format updated UI and hotkey files
Gabriel Stein2a484652ce88
diff --git a/src/components/ReferralDashboard.tsx b/src/components/ReferralDashboard.tsxindex 6dcbb8f4e..b7a2760d7 100644--- a/src/components/ReferralDashboard.tsx+++ b/src/components/ReferralDashboard.tsx@@ -74,20 +74,23 @@ function AnimatedCounter({ value, delay = 0 }: { value: number; delay?: number }const duration = 800;let start: number | null = null;- const timeout = setTimeout(() => {- if (prefersReduced) {- setDisplay(value);- return;- }- const animate = (timestamp: number) => {- if (!start) start = timestamp;- const progress = Math.min((timestamp - start) / duration, 1);- const eased = 1 - Math.pow(1 - progress, 3);- setDisplay(Math.round(eased * value));- if (progress < 1) rafRef.current = requestAnimationFrame(animate);- };- rafRef.current = requestAnimationFrame(animate);- }, prefersReduced ? 0 : delay);+ const timeout = setTimeout(+ () => {+ if (prefersReduced) {+ setDisplay(value);+ return;+ }+ const animate = (timestamp: number) => {+ if (!start) start = timestamp;+ const progress = Math.min((timestamp - start) / duration, 1);+ const eased = 1 - Math.pow(1 - progress, 3);+ setDisplay(Math.round(eased * value));+ if (progress < 1) rafRef.current = requestAnimationFrame(animate);+ };+ rafRef.current = requestAnimationFrame(animate);+ },+ prefersReduced ? 0 : delay+ );return () => {clearTimeout(timeout);diff --git a/src/components/notes/NoteEditor.tsx b/src/components/notes/NoteEditor.tsxindex c70705042..8b455f120 100644--- a/src/components/notes/NoteEditor.tsx+++ b/src/components/notes/NoteEditor.tsx@@ -211,11 +211,7 @@ export default function NoteEditor({}}- if (- !autoShowDone &&- embeddedChat.activeConversationId &&- embeddedChat.messages.length > 0- ) {+ if (!autoShowDone && embeddedChat.activeConversationId && embeddedChat.messages.length > 0) {setAutoShowDone(true);setChatMode("floating");}diff --git a/src/helpers/gnomeShortcut.js b/src/helpers/gnomeShortcut.jsindex 5418ed220..0139f0d5f 100644--- a/src/helpers/gnomeShortcut.js+++ b/src/helpers/gnomeShortcut.js@@ -213,7 +213,11 @@ class GnomeShortcutManager {const { path: keybindingPath, name: keybindingName } = getSlotConfig(slotName);- const SLOT_DBUS_METHOD = { dictation: "Toggle", agent: "ToggleAgent", meeting: "ToggleMeeting" };+ const SLOT_DBUS_METHOD = {+ dictation: "Toggle",+ agent: "ToggleAgent",+ meeting: "ToggleMeeting",+ };const dbusMethod = SLOT_DBUS_METHOD[slotName] || "Toggle";const command = `dbus-send --session --type=method_call --dest=${DBUS_SERVICE_NAME} ${DBUS_OBJECT_PATH} ${DBUS_INTERFACE}.${dbusMethod}`;@@ -229,10 +233,13 @@ class GnomeShortcutManager {});const conflict = this.findConflictingBinding(shortcut, existing, keybindingPath);if (conflict) {- debugLogger.log(`[GnomeShortcut] Shortcut conflict — "${shortcut}" already used by "${conflict}"`, {- slot: slotName,- conflictPath: conflict,- });+ debugLogger.log(+ `[GnomeShortcut] Shortcut conflict — "${shortcut}" already used by "${conflict}"`,+ {+ slot: slotName,+ conflictPath: conflict,+ }+ );return false;}@@ -299,7 +306,9 @@ class GnomeShortcutManager {const existing = this.getExistingKeybindings();const conflict = this.findConflictingBinding(shortcut, existing, keybindingPath);if (conflict) {- debugLogger.log(`[GnomeShortcut] Shortcut conflict on update — "${shortcut}" already used by "${conflict}"`);+ debugLogger.log(+ `[GnomeShortcut] Shortcut conflict on update — "${shortcut}" already used by "${conflict}"`+ );return false;}@@ -390,7 +399,9 @@ class GnomeShortcutManager {"gsettings",["get", `${KEYBINDING_SCHEMA}:${path}`, "binding"],{ encoding: "utf-8" }- ).trim().replace(/^'|'$/g, "");+ )+ .trim()+ .replace(/^'|'$/g, "");if (normalize(binding) === normalizedShortcut) return path;} catch {}}diff --git a/src/helpers/googleCalendarOAuth.js b/src/helpers/googleCalendarOAuth.jsindex 9619067ec..6a55be7fa 100644--- a/src/helpers/googleCalendarOAuth.js+++ b/src/helpers/googleCalendarOAuth.js@@ -5,7 +5,8 @@ const { shell } = require("electron");const GOOGLE_AUTH_URL = "https://accounts.google.com/o/oauth2/v2/auth";const GOOGLE_TOKEN_URL = "https://oauth2.googleapis.com/token";-const CALENDAR_SCOPE = "openid email https://www.googleapis.com/auth/calendar.events.readonly https://www.googleapis.com/auth/calendar.calendarlist.readonly";+const CALENDAR_SCOPE =+ "openid email https://www.googleapis.com/auth/calendar.events.readonly https://www.googleapis.com/auth/calendar.calendarlist.readonly";const OAUTH_TIMEOUT_MS = 120000;const DEFAULT_DESKTOP_CALLBACK_URL = "https://openwhispr.com/auth/desktop-callback";diff --git a/src/helpers/hotkeyManager.js b/src/helpers/hotkeyManager.jsindex 5941c1a71..c6ba4febf 100644--- a/src/helpers/hotkeyManager.js+++ b/src/helpers/hotkeyManager.js@@ -20,7 +20,7 @@ const GNOME_NATIVE_SLOTS = new Set(["agent", "meeting"]);// KDE registration failure reasons — reuse existing i18n keysconst KDE_FAILURE_REASONS = {- "conflict": (hotkey) => i18nMain.t("hotkey.errors.alreadyRegistered", { hotkey }),+ conflict: (hotkey) => i18nMain.t("hotkey.errors.alreadyRegistered", { hotkey }),"modifier-only": (hotkey) => i18nMain.t("hotkey.errors.osReserved", { hotkey }),};@@ -171,7 +171,10 @@ class HotkeyManager {debugLogger.log(`[HotkeyManager] Could not convert hotkey "${hotkey}" to GNOME format for slot "${slotName}"`);- return { success: false, error: i18nMain.t("hotkey.errors.registrationFailed", { hotkey }) };+ return {+ success: false,+ error: i18nMain.t("hotkey.errors.registrationFailed", { hotkey }),+ };}if (slotName === "agent") {@@ -213,7 +216,9 @@ class HotkeyManager {const result = await this.kdeManager.registerKeybinding(hotkey, slotName, callback);if (result !== true) {- const reason = KDE_FAILURE_REASONS[result]?.(hotkey) || i18nMain.t("hotkey.errors.registrationFailed", { hotkey });+ const reason =+ KDE_FAILURE_REASONS[result]?.(hotkey) ||+ i18nMain.t("hotkey.errors.registrationFailed", { hotkey });debugLogger.log(`[HotkeyManager] KDE keybinding registration failed for slot "${slotName}" ("${hotkey}")`,{ reason: result }@@ -495,10 +500,7 @@ class HotkeyManager {}async initializeKDEShortcuts(callback) {- if (- process.platform !== "linux" ||- !KDEShortcutManager.isKDE()- ) {+ if (process.platform !== "linux" || !KDEShortcutManager.isKDE()) {return false;}@@ -613,11 +615,14 @@ class HotkeyManager {this.isInitialized = true;return;}-}// Try Hyprland native shortcuts (Wayland only, non-GNOME)- if (process.platform === "linux" && HyprlandShortcutManager.isWayland() && HyprlandShortcutManager.isHyprland()) {+ if (+ process.platform === "linux" &&+ HyprlandShortcutManager.isWayland() &&+ HyprlandShortcutManager.isHyprland()+ ) {const hyprlandOk = await this.initializeHyprlandShortcuts(callback);if (hyprlandOk) {@@ -673,11 +678,15 @@ class HotkeyManager {debugLogger.log(`[HotkeyManager] KDE hotkey "${hotkey}" registered successfully`);} else if (result === "conflict" || result === "modifier-only") {const ok = await this.tryNativeFallbacks(hotkey, "KDE", (fb) =>- this.kdeManager.registerKeybinding(fb, "dictation", callback).then((r) => r === true)+ this.kdeManager+ .registerKeybinding(fb, "dictation", callback)+ .then((r) => r === true));if (!ok) {this.currentHotkey = hotkey;- this.notifyHotkeyFailure(hotkey, { error: i18nMain.t("hotkey.errors.registrationFailed", { hotkey }) });+ this.notifyHotkeyFailure(hotkey, {+ error: i18nMain.t("hotkey.errors.registrationFailed", { hotkey }),+ });}} else {debugLogger.log(@@ -860,7 +869,10 @@ class HotkeyManager {);if (lsKey && lsKey.trim() !== "") return lsKey;} catch (err) {- debugLogger.log("[HotkeyManager] Failed to read dictationKey from localStorage:", err.message);+ debugLogger.log(+ "[HotkeyManager] Failed to read dictationKey from localStorage:",+ err.message+ );}}@@ -912,7 +924,9 @@ class HotkeyManager {const success = await registerFn(fallback);if (success) {this.currentHotkey = fallback;- debugLogger.log(`[HotkeyManager] ${backend} fallback hotkey "${fallback}" registered successfully`);+ debugLogger.log(+ `[HotkeyManager] ${backend} fallback hotkey "${fallback}" registered successfully`+ );// Persist to .env only, not localStorage (preserves user's preferred key for retry on next launch).await this._persistHotkeyToEnvFile(fallback);this.notifyActiveHotkey(fallback);@@ -1014,12 +1028,18 @@ class HotkeyManager {const result = await this.kdeManager.registerKeybinding(hotkey, "dictation", callback);if (result !== true) {if (previousHotkey) {- const restored = await this.kdeManager.registerKeybinding(previousHotkey, "dictation", callback);+ const restored = await this.kdeManager.registerKeybinding(+ previousHotkey,+ "dictation",+ callback+ );if (restored === true) {debugLogger.log(`[HotkeyManager] Restored previous KDE hotkey "${previousHotkey}"`);}}- const reason = KDE_FAILURE_REASONS[result]?.(hotkey) || i18nMain.t("hotkey.errors.registrationFailed", { hotkey });+ const reason =+ KDE_FAILURE_REASONS[result]?.(hotkey) ||+ i18nMain.t("hotkey.errors.registrationFailed", { hotkey });return { success: false, message: reason };}this.currentHotkey = hotkey;diff --git a/src/helpers/kdeShortcut.js b/src/helpers/kdeShortcut.jsindex 2b4f09cf3..2953bc94a 100644--- a/src/helpers/kdeShortcut.js+++ b/src/helpers/kdeShortcut.js@@ -219,7 +219,7 @@ class KDEShortcutManager {// Modifier-only shortcuts (e.g. Control+Super) don't work on X11 —// XGrabKey requires an actual key code, not just modifiers.// On Wayland, KWin handles modifier-only natively, so allow them.- const QT_MODIFIER_MASK = 0xFE000000;+ const QT_MODIFIER_MASK = 0xfe000000;if (!KDEShortcutManager.isWayland() && (qtKey & ~QT_MODIFIER_MASK) === 0) {debugLogger.log("[KDEShortcut] Modifier-only shortcut not supported on X11", {slot: slotName,@@ -262,12 +262,17 @@ class KDEShortcutManager {}} catch (checkErr) {// globalShortcutsByKey may not exist on older KDE — proceed without check- debugLogger.log("[KDEShortcut] Could not check for conflicts, proceeding:", checkErr.message);+ debugLogger.log(+ "[KDEShortcut] Could not check for conflicts, proceeding:",+ checkErr.message+ );}// Clear stale registration, then register with flag 0x02 (SetPresent).// Flag 0x02 overwrites any saved binding; flag 0 preserves stale values.- try { await this.kglobalaccel.unRegister(actionId); } catch {}+ try {+ await this.kglobalaccel.unRegister(actionId);+ } catch {}await this.kglobalaccel.doRegister(actionId);const result = await this.kglobalaccel.setShortcut(actionId, [qtKey], 0x02);@@ -280,7 +285,9 @@ class KDEShortcutManager {requested: `0x${qtKey.toString(16)}`,assigned: `0x${assignedKey.toString(16)}`,});- try { await this.kglobalaccel.unRegister(actionId); } catch {}+ try {+ await this.kglobalaccel.unRegister(actionId);+ } catch {}return "conflict";}@@ -293,7 +300,9 @@ class KDEShortcutManager {debugLogger.log(`[KDEShortcut] Keybinding registered but listener failed for "${slotName}", unregistering`);- try { await this.kglobalaccel.unRegister(actionId); } catch {}+ try {+ await this.kglobalaccel.unRegister(actionId);+ } catch {}return false;}