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
Add meeting mode hotkey and account deletion
Gabriel Stein67c02e11a247
diff --git a/main.js b/main.jsindex fe6d17287..d96790465 100644--- a/main.js+++ b/main.js@@ -614,6 +614,27 @@ async function startApp() {}});+ // Set up meeting mode hotkey+ const meetingHotkeyCallback = () => {+ if (hotkeyManager.isInListeningMode()) return;+ meetingDetectionEngine?.startManualMeeting();+ };++ const savedMeetingKey = environmentManager.getMeetingKey?.() || "";+ if (savedMeetingKey) {+ hotkeyManager.registerSlot("meeting", savedMeetingKey, meetingHotkeyCallback);+ }++ ipcMain.on("meeting-hotkey-changed", (_event, hotkey) => {+ if (hotkey) {+ hotkeyManager.registerSlot("meeting", hotkey, meetingHotkeyCallback);+ environmentManager.saveMeetingKey(hotkey);+ } else {+ hotkeyManager.unregisterSlot("meeting");+ environmentManager.saveMeetingKey("");+ }+ });+// Phase 2: Initialize remaining managers after windows are visibleinitializeDeferredManagers();diff --git a/preload.js b/preload.jsindex dbffd87ae..8db1799cf 100644--- a/preload.js+++ b/preload.js@@ -538,6 +538,7 @@ contextBridge.exposeInMainWorld("electronAPI", {// Notify main process of activation mode changes (for Windows Push-to-Talk)notifyActivationModeChanged: (mode) => ipcRenderer.send("activation-mode-changed", mode),notifyHotkeyChanged: (hotkey) => ipcRenderer.send("hotkey-changed", hotkey),+ notifyMeetingHotkeyChanged: (hotkey) => ipcRenderer.send("meeting-hotkey-changed", hotkey),// Floating icon auto-hidenotifyFloatingIconAutoHideChanged: (enabled) =>diff --git a/src/components/SettingsPage.tsx b/src/components/SettingsPage.tsxindex 1a04c5da9..f7739b266 100644--- a/src/components/SettingsPage.tsx+++ b/src/components/SettingsPage.tsx@@ -26,9 +26,10 @@ import {RotateCw,BookOpen,Copy,+ Trash2,} from "lucide-react";import { useAuth } from "../hooks/useAuth";-import { NEON_AUTH_URL, signOut } from "../lib/neonAuth";+import { NEON_AUTH_URL, signOut, deleteAccount } from "../lib/neonAuth";import MicPermissionWarning from "./ui/MicPermissionWarning";import MicrophoneSettings from "./ui/MicrophoneSettings";import PermissionCard from "./ui/PermissionCard";@@ -682,6 +683,8 @@ export default function SettingsPage({ activeSection = "general" }: SettingsPagecustomReasoningApiKey,setCustomReasoningApiKey,setDictationKey,+ meetingKey,+ setMeetingKey,autoLearnCorrections,setAutoLearnCorrections,updateTranscriptionSettings,@@ -862,6 +865,16 @@ export default function SettingsPage({ activeSection = "general" }: SettingsPageshowAlert: showAlertDialog,});+ const { registerHotkey: registerMeetingHotkey, isRegistering: isMeetingHotkeyRegistering } =+ useHotkeyRegistration({+ onSuccess: (registeredHotkey) => {+ setMeetingKey(registeredHotkey);+ },+ showSuccessToast: false,+ showErrorToast: true,+ showAlert: showAlertDialog,+ });+const validateHotkeyForInput = useCallback((hotkey: string) => getValidationMessage(hotkey, getPlatform()),[]@@ -1037,6 +1050,7 @@ export default function SettingsPage({ activeSection = "general" }: SettingsPageconst { isSignedIn, isLoaded, user } = useAuth();const [isSigningOut, setIsSigningOut] = useState(false);+ const [isDeletingAccount, setIsDeletingAccount] = useState(false);const [isOpeningBilling, setIsOpeningBilling] = useState(false);const [billingState, setBillingState] = useState<Record<string, boolean>>({pro: true,@@ -1147,6 +1161,54 @@ export default function SettingsPage({ activeSection = "general" }: SettingsPage}}, [showAlertDialog, t]);+ const handleDeleteAccount = useCallback(() => {+ showConfirmDialog({+ title: t("settingsPage.account.deleteAccount.title"),+ description: t("settingsPage.account.deleteAccount.description"),+ onConfirm: async () => {+ setIsDeletingAccount(true);+ try {+ // 1. Delete all cloud notes (best-effort, needs session cookies)+ try {+ const { NotesService } = await import("../services/NotesService");+ await NotesService.deleteAll();+ } catch {}++ // 2. Delete server account (best-effort)+ const result = await deleteAccount();+ if (result.error) {+ logger.error("Server account deletion failed", result.error, "auth");+ }++ // 3. Sign out (clear auth state)+ try {+ await signOut();+ } catch {}++ // 4. Wipe all local data+ await window.electronAPI?.cleanupApp();++ // 5. Reload app+ showAlertDialog({+ title: t("settingsPage.account.deleteAccount.successTitle"),+ description: t("settingsPage.account.deleteAccount.successDescription"),+ });+ setTimeout(() => window.location.reload(), 1000);+ } catch (error) {+ logger.error("Account deletion failed", error, "auth");+ showAlertDialog({+ title: t("settingsPage.account.deleteAccount.failedTitle"),+ description: t("settingsPage.account.deleteAccount.failedDescription"),+ });+ } finally {+ setIsDeletingAccount(false);+ }+ },+ variant: "destructive",+ confirmText: t("settingsPage.account.deleteAccount.confirmText"),+ });+ }, [showConfirmDialog, showAlertDialog, t]);+const renderSectionContent = () => {switch (activeSection) {case "account":@@ -1213,6 +1275,28 @@ export default function SettingsPage({ activeSection = "general" }: SettingsPage</Button></SettingsPanelRow></SettingsPanel>++ <SettingsPanel>+ <SettingsPanelRow>+ <SettingsRow+ label={t("settingsPage.account.deleteAccount.label")}+ description={t("settingsPage.account.deleteAccount.labelDescription")}+ >+ <Button+ onClick={handleDeleteAccount}+ variant="outline"+ disabled={isDeletingAccount}+ size="sm"+ className="text-destructive border-destructive/30 hover:bg-destructive/10 hover:border-destructive"+ >+ <Trash2 className="mr-1.5 h-3.5 w-3.5" />+ {isDeletingAccount+ ? t("settingsPage.account.deleteAccount.deleting")+ : t("settingsPage.account.deleteAccount.button")}+ </Button>+ </SettingsRow>+ </SettingsPanelRow>+ </SettingsPanel></>) : isLoaded ? (<>@@ -2672,6 +2756,37 @@ EOF`,)}</SettingsPanel></div>++ {/* Meeting Mode Hotkey */}+ <div>+ <SectionHeader+ title={t("settingsPage.general.meetingHotkey.title")}+ description={t("settingsPage.general.meetingHotkey.description")}+ />+ <SettingsPanel>+ <SettingsPanelRow>+ <HotkeyInput+ value={meetingKey}+ onChange={async (newHotkey) => {+ await registerMeetingHotkey(newHotkey);+ }}+ disabled={isMeetingHotkeyRegistering}+ validate={validateHotkeyForInput}+ />+ {meetingKey && (+ <button+ onClick={() => {+ setMeetingKey("");+ }}+ disabled={isMeetingHotkeyRegistering}+ className="mt-2 text-xs text-muted-foreground/70 hover:text-foreground transition-colors disabled:opacity-50"+ >+ {t("settingsPage.general.meetingHotkey.clear")}+ </button>+ )}+ </SettingsPanelRow>+ </SettingsPanel>+ </div></div>);@@ -3435,28 +3550,29 @@ EOF`,showConfirmDialog({title: t("settingsPage.developer.resetAll.title"),description: t("settingsPage.developer.resetAll.description"),- onConfirm: () => {- window.electronAPI- ?.cleanupApp()- .then(() => {- showAlertDialog({- title: t("settingsPage.developer.resetAll.successTitle"),- description: t(- "settingsPage.developer.resetAll.successDescription"- ),- });- setTimeout(() => {- window.location.reload();- }, 1000);- })- .catch(() => {- showAlertDialog({- title: t("settingsPage.developer.resetAll.failedTitle"),- description: t(- "settingsPage.developer.resetAll.failedDescription"- ),- });+ onConfirm: async () => {+ try {+ try {+ await signOut();+ } catch {}+ await window.electronAPI?.cleanupApp();+ showAlertDialog({+ title: t("settingsPage.developer.resetAll.successTitle"),+ description: t(+ "settingsPage.developer.resetAll.successDescription"+ ),});+ setTimeout(() => {+ window.location.reload();+ }, 1000);+ } catch {+ showAlertDialog({+ title: t("settingsPage.developer.resetAll.failedTitle"),+ description: t(+ "settingsPage.developer.resetAll.failedDescription"+ ),+ });+ }},variant: "destructive",confirmText: t("settingsPage.developer.resetAll.confirmText"),diff --git a/src/helpers/environment.js b/src/helpers/environment.jsindex d19ae5e05..2ad7a35df 100644--- a/src/helpers/environment.js+++ b/src/helpers/environment.js@@ -21,6 +21,7 @@ const PERSISTED_KEYS = ["LLAMA_VULKAN_ENABLED","DICTATION_KEY","AGENT_KEY",+ "MEETING_KEY","ACTIVATION_MODE","FLOATING_ICON_AUTO_HIDE","START_MINIMIZED",@@ -143,6 +144,16 @@ class EnvironmentManager {return result;}+ getMeetingKey() {+ return this._getKey("MEETING_KEY");+ }++ saveMeetingKey(key) {+ const result = this._saveKey("MEETING_KEY", key);+ this.saveAllKeysToEnvFile().catch(() => {});+ return result;+ }+getActivationMode() {const mode = this._getKey("ACTIVATION_MODE");return mode === "push" ? "push" : "tap";diff --git a/src/helpers/googleCalendarManager.js b/src/helpers/googleCalendarManager.jsindex 85820b248..3d5fc951f 100644--- a/src/helpers/googleCalendarManager.js+++ b/src/helpers/googleCalendarManager.js@@ -86,6 +86,16 @@ class GoogleCalendarManager {return result;}+ async revokeAllTokens() {+ try {+ const allTokens = this.databaseManager.getAllGoogleTokens();+ await Promise.allSettled(allTokens.map((t) => this.oauth.revokeToken(t.access_token)));+ } catch (err) {+ debugLogger.error("Error revoking Google tokens", { error: err.message }, "gcal");+ }+ this.disconnect();+ }+disconnect(email) {if (email) {this.removeAccount(email);diff --git a/src/helpers/googleCalendarOAuth.js b/src/helpers/googleCalendarOAuth.jsindex 453cd0e40..e2975ed3f 100644--- a/src/helpers/googleCalendarOAuth.js+++ b/src/helpers/googleCalendarOAuth.js@@ -216,6 +216,15 @@ class GoogleCalendarOAuth {return tokens.access_token;}+ async revokeToken(token) {+ const body = new URLSearchParams({ token }).toString();+ try {+ await this._httpsPost("https://oauth2.googleapis.com/revoke", body);+ } catch {+ // Best-effort — token may already be revoked or network unavailable+ }+ }+_httpsPost(urlString, body) {const url = new URL(urlString);return new Promise((resolve, reject) => {diff --git a/src/helpers/ipcHandlers.js b/src/helpers/ipcHandlers.jsindex 4dcdceb99..4664e78e1 100644--- a/src/helpers/ipcHandlers.js+++ b/src/helpers/ipcHandlers.js@@ -3,7 +3,6 @@ const path = require("path");const http = require("http");const https = require("https");const crypto = require("crypto");-const AppUtils = require("../utils");const debugLogger = require("./debugLogger");const GnomeShortcutManager = require("./gnomeShortcut");const HyprlandShortcutManager = require("./hyprlandShortcut");@@ -1145,8 +1144,114 @@ class IPCHandlers {});ipcMain.handle("cleanup-app", async (event) => {- AppUtils.cleanup(this.windowManager.mainWindow);- return { success: true, message: "Cleanup completed successfully" };+ const fs = require("fs");+ const os = require("os");+ const errors = [];+ const mainWindow = this.windowManager.mainWindow;++ // 1. Stop running services (before deleting files they may hold open)+ try {+ await this.parakeetManager?.stopServer();+ } catch (e) {+ errors.push(`Parakeet stop: ${e.message}`);+ }+ try {+ this.whisperManager?.stopServer();+ } catch (e) {+ errors.push(`Whisper stop: ${e.message}`);+ }+ try {+ this.googleCalendarManager?.stop();+ } catch (e) {+ errors.push(`GCal stop: ${e.message}`);+ }++ // 2. Revoke Google Calendar OAuth tokens (best-effort, before DB is closed)+ try {+ await this.googleCalendarManager?.revokeAllTokens();+ } catch (e) {+ errors.push(`GCal revoke: ${e.message}`);+ }++ // 3. Close the database connection (before deleting the file)+ try {+ this.databaseManager?.db?.close();+ } catch (e) {+ errors.push(`DB close: ${e.message}`);+ }++ // 4. Delete audio files+ try {+ this.audioStorageManager.deleteAllAudio();+ } catch (e) {+ errors.push(`Audio delete: ${e.message}`);+ }++ // 5. Delete all downloaded models+ try {+ const whisperDir = path.join(os.homedir(), ".cache", "openwhispr", "whisper-models");+ if (fs.existsSync(whisperDir)) fs.rmSync(whisperDir, { recursive: true, force: true });+ } catch (e) {+ errors.push(`Whisper models: ${e.message}`);+ }++ try {+ await this.parakeetManager?.deleteAllParakeetModels();+ } catch (e) {+ errors.push(`Parakeet models: ${e.message}`);+ }++ try {+ const modelManager = require("./modelManagerBridge").default;+ await modelManager.deleteAllModels();+ } catch (e) {+ errors.push(`LLM models: ${e.message}`);+ }++ // 6. Delete the database file+ try {+ const dbPath = path.join(+ app.getPath("userData"),+ process.env.NODE_ENV === "development" ? "transcriptions-dev.db" : "transcriptions.db"+ );+ if (fs.existsSync(dbPath)) fs.unlinkSync(dbPath);+ // Also delete WAL and SHM files if they exist+ if (fs.existsSync(dbPath + "-wal")) fs.unlinkSync(dbPath + "-wal");+ if (fs.existsSync(dbPath + "-shm")) fs.unlinkSync(dbPath + "-shm");+ } catch (e) {+ errors.push(`DB file: ${e.message}`);+ }++ // 7. Delete .env file+ try {+ const envPath = path.join(app.getPath("userData"), ".env");+ if (fs.existsSync(envPath)) fs.unlinkSync(envPath);+ } catch (e) {+ errors.push(`Env file: ${e.message}`);+ }++ // 8. Clear session cookies+ try {+ const win = BrowserWindow.fromWebContents(event.sender);+ if (win) await win.webContents.session.clearStorageData({ storages: ["cookies"] });+ } catch (e) {+ errors.push(`Cookies: ${e.message}`);+ }++ // 9. Clear localStorage+ if (mainWindow?.webContents) {+ try {+ await mainWindow.webContents.executeJavaScript("localStorage.clear()");+ } catch (e) {+ errors.push(`localStorage: ${e.message}`);+ }+ }++ if (errors.length > 0) {+ debugLogger.warn("Cleanup completed with errors", { errors }, "cleanup");+ }++ return { success: errors.length === 0, message: "Cleanup completed", errors };});ipcMain.handle("update-hotkey", async (event, hotkey) => {diff --git a/src/helpers/meetingDetectionEngine.js b/src/helpers/meetingDetectionEngine.jsindex 6de005764..dc1b49489 100644--- a/src/helpers/meetingDetectionEngine.js+++ b/src/helpers/meetingDetectionEngine.js@@ -194,6 +194,35 @@ class MeetingDetectionEngine {}}+ async startManualMeeting() {+ const event = {+ id: `manual-${Date.now()}`,+ calendar_id: "__manual__",+ summary: "New note",+ start_time: new Date().toISOString(),+ end_time: new Date(Date.now() + 3600000).toISOString(),+ is_all_day: 0,+ status: "confirmed",+ hangout_link: null,+ conference_data: null,+ organizer_email: null,+ attendees_count: 0,+ };++ const noteResult = this.databaseManager.saveNote(event.summary, "", "meeting");+ const meetingsFolder = this.databaseManager.getMeetingsFolder();++ if (noteResult?.note?.id && meetingsFolder?.id) {+ await this.windowManager.createControlPanelWindow();+ this.windowManager.snapControlPanelToMeetingMode();+ this.windowManager.sendToControlPanel("navigate-to-meeting-note", {+ noteId: noteResult.note.id,+ folderId: meetingsFolder.id,+ event,+ });+ }+ }+handleNotificationTimeout() {for (const [detectionId, detection] of this.activeDetections) {if (!detection.dismissed) {diff --git a/src/hooks/useSettings.ts b/src/hooks/useSettings.tsindex 56d0c62f4..9d441a551 100644--- a/src/hooks/useSettings.ts+++ b/src/hooks/useSettings.ts@@ -32,6 +32,7 @@ export interface ReasoningSettings {export interface HotkeySettings {dictationKey: string;+ meetingKey: string;activationMode: "tap" | "push";}@@ -188,6 +189,7 @@ function useSettingsInternal() {groqApiKey: store.groqApiKey,mistralApiKey: store.mistralApiKey,dictationKey: store.dictationKey,+ meetingKey: store.meetingKey,theme: store.theme,setUseLocalWhisper: store.setUseLocalWhisper,setWhisperModel: store.setWhisperModel,@@ -218,6 +220,7 @@ function useSettingsInternal() {customReasoningApiKey: store.customReasoningApiKey,setCustomReasoningApiKey: store.setCustomReasoningApiKey,setDictationKey: store.setDictationKey,+ setMeetingKey: store.setMeetingKey,setTheme: store.setTheme,activationMode: store.activationMode,setActivationMode: store.setActivationMode,diff --git a/src/lib/neonAuth.ts b/src/lib/neonAuth.tsindex 47b161d7a..461f183ba 100644--- a/src/lib/neonAuth.ts+++ b/src/lib/neonAuth.ts@@ -98,6 +98,28 @@ export function isWithinGracePeriod(): boolean {return elapsed < GRACE_PERIOD_MS;}+export async function deleteAccount(): Promise<{ error?: Error }> {+ if (!OPENWHISPR_API_URL) {+ return { error: new Error("API not configured") };+ }++ try {+ const res = await fetch(`${OPENWHISPR_API_URL}/api/auth/delete-account`, {+ method: "DELETE",+ credentials: "include",+ });++ if (!res.ok) {+ const data = await res.json().catch(() => ({}));+ throw new Error(data.error || "Failed to delete account");+ }++ return {};+ } catch (error) {+ return { error: error instanceof Error ? error : new Error("Failed to delete account") };+ }+}+export async function signOut(): Promise<void> {try {if (window.electronAPI?.authClearSession) {diff --git a/src/locales/de/translation.json b/src/locales/de/translation.jsonindex 6ec97f1f0..b33ea3784 100644--- a/src/locales/de/translation.json+++ b/src/locales/de/translation.json@@ -1013,7 +1013,20 @@"title": "Pro 7 Tage kostenlos testen"},"user": "Benutzer",- "wordsRemaining": "{{remaining}} verbleibend"+ "wordsRemaining": "{{remaining}} verbleibend",+ "deleteAccount": {+ "label": "Konto löschen",+ "labelDescription": "Konto, alle Cloud-Daten und lokale Daten dauerhaft löschen. Diese Aktion kann nicht rückgängig gemacht werden.",+ "button": "Mein Konto löschen",+ "deleting": "Wird gelöscht...",+ "title": "Konto löschen?",+ "description": "Dies löscht dauerhaft Ihr OpenWhispr-Konto, alle in der Cloud synchronisierten Notizen und alle lokalen Daten, einschließlich Transkriptionen, Audioaufnahmen, heruntergeladene Modelle, Kalenderverbindungen und Einstellungen. Diese Aktion kann nicht rückgängig gemacht werden.",+ "confirmText": "Alles löschen",+ "successTitle": "Konto gelöscht",+ "successDescription": "Ihr Konto und alle Daten wurden gelöscht. Die App wird jetzt neu geladen.",+ "failedTitle": "Löschung fehlgeschlagen",+ "failedDescription": "Beim Löschen Ihres Kontos ist ein Fehler aufgetreten. Ihre lokalen Daten wurden möglicherweise teilweise entfernt. Bitte versuchen Sie es erneut."+ }},"agentConfig": {"agentName": "Agent-Name",@@ -1077,7 +1090,7 @@"removing": "Wird entfernt...","resetAll": {"confirmText": "Alles löschen",- "description": "Dadurch werden alle Einstellungen, Transkriptionen und zwischengespeicherten Daten dauerhaft gelöscht. Die App wird nach dem Zurücksetzen neu geladen.",+ "description": "Dies löscht dauerhaft alle lokalen Einstellungen, Transkriptionen, Audioaufnahmen, heruntergeladene KI-Modelle, Kalenderverbindungen und zwischengespeicherte Daten. Cloud-Daten und Ihr Konto werden nicht beeinträchtigt. Die App wird nach dem Zurücksetzen neu geladen.","failedDescription": "Etwas ist schiefgelaufen. Bitte versuchen Sie es erneut oder installieren Sie die App neu.","failedTitle": "Zurücksetzen fehlgeschlagen","successDescription": "Alles wurde zurückgesetzt. Die App wird jetzt neu geladen.",@@ -1085,7 +1098,7 @@"title": "Alle App-Daten zurücksetzen"},"resetAppData": "App-Daten zurücksetzen",- "resetAppDataDescription": "Alle Einstellungen, Transkriptionen und zwischengespeicherten Daten dauerhaft löschen"+ "resetAppDataDescription": "Alle lokalen Einstellungen, Transkriptionen, Audioaufnahmen, heruntergeladene Modelle und zwischengespeicherte Daten dauerhaft löschen"},"dictionary": {"title": "Benutzerwörterbuch",@@ -1131,6 +1144,11 @@"resetToDefault": "Auf {{hotkey}} zurücksetzen","title": "Diktat-Hotkey"},+ "meetingHotkey": {+ "title": "Meeting-Modus-Hotkey",+ "description": "Meeting-Modus starten und das Panel an den Bildschirmrand verschieben",+ "clear": "Hotkey entfernen"+ },"microphone": {"description": "Wählen Sie das Eingabegerät für das Diktat","title": "Mikrofon"diff --git a/src/locales/en/translation.json b/src/locales/en/translation.jsonindex 5018c264f..3d4cf8b0f 100644--- a/src/locales/en/translation.json+++ b/src/locales/en/translation.json@@ -1068,7 +1068,20 @@"button": "Create Free Account"},"user": "User",- "wordsRemaining": "{{remaining}} remaining"+ "wordsRemaining": "{{remaining}} remaining",+ "deleteAccount": {+ "label": "Delete Account",+ "labelDescription": "Permanently delete your account, all cloud data, and local data. This action cannot be undone.",+ "button": "Delete My Account",+ "deleting": "Deleting...",+ "title": "Delete Your Account?",+ "description": "This will permanently delete your OpenWhispr account, all cloud-synced notes, and all local data including transcriptions, audio recordings, downloaded models, calendar connections, and settings. This action cannot be undone.",+ "confirmText": "Delete Everything",+ "successTitle": "Account Deleted",+ "successDescription": "Your account and all data have been deleted. The app will now reload.",+ "failedTitle": "Deletion Failed",+ "failedDescription": "Something went wrong deleting your account. Your local data may have been partially removed. Please try again."+ }},"agentConfig": {"agentName": "Agent Name",@@ -1132,7 +1145,7 @@"removing": "Removing...","resetAll": {"confirmText": "Delete Everything",- "description": "This will permanently delete all settings, transcriptions, and cached data. The app will reload after reset.",+ "description": "This will permanently delete all local settings, transcriptions, audio recordings, downloaded AI models, calendar connections, and cached data. Cloud data and your account will not be affected. The app will reload after reset.","failedDescription": "Something went wrong. Please try again or reinstall the app.","failedTitle": "Couldn't reset","successDescription": "Everything has been reset. The app will reload now.",@@ -1140,7 +1153,7 @@"title": "Reset All App Data"},"resetAppData": "Reset app data",- "resetAppDataDescription": "Permanently delete all settings, transcriptions, and cached data"+ "resetAppDataDescription": "Permanently delete all local settings, transcriptions, audio recordings, downloaded models, and cached data"},"dictionary": {"title": "Custom Dictionary",@@ -1191,6 +1204,11 @@"resetToDefault": "Reset to {{hotkey}}","title": "Dictation Hotkey"},+ "meetingHotkey": {+ "title": "Meeting Mode Hotkey",+ "description": "Start meeting mode and snap the panel to the side of the screen",+ "clear": "Remove hotkey"+ },"microphone": {"description": "Select which input device to use for dictation","title": "Microphone"diff --git a/src/locales/es/translation.json b/src/locales/es/translation.jsonindex 069b8118f..6357defc7 100644--- a/src/locales/es/translation.json+++ b/src/locales/es/translation.json@@ -1013,7 +1013,20 @@"title": "Prueba Pro gratis por 7 días"},"user": "Usuario",- "wordsRemaining": "{{remaining}} restantes"+ "wordsRemaining": "{{remaining}} restantes",+ "deleteAccount": {+ "label": "Eliminar cuenta",+ "labelDescription": "Eliminar permanentemente tu cuenta, todos los datos en la nube y los datos locales. Esta acción no se puede deshacer.",+ "button": "Eliminar mi cuenta",+ "deleting": "Eliminando...",+ "title": "¿Eliminar tu cuenta?",+ "description": "Esto eliminará permanentemente tu cuenta de OpenWhispr, todas las notas sincronizadas en la nube y todos los datos locales, incluyendo transcripciones, grabaciones de audio, modelos descargados, conexiones de calendario y configuraciones. Esta acción no se puede deshacer.",+ "confirmText": "Eliminar todo",+ "successTitle": "Cuenta eliminada",+ "successDescription": "Tu cuenta y todos los datos han sido eliminados. La aplicación se recargará ahora.",+ "failedTitle": "Error al eliminar",+ "failedDescription": "Algo salió mal al eliminar tu cuenta. Es posible que tus datos locales se hayan eliminado parcialmente. Inténtalo de nuevo."+ }},"agentConfig": {"agentName": "Nombre del agente",@@ -1077,7 +1090,7 @@"removing": "Eliminando...","resetAll": {"confirmText": "Eliminar todo",- "description": "Esto eliminará permanentemente todos los ajustes, transcripciones y datos en caché. La app se recargará tras el restablecimiento.",+ "description": "Esta acción eliminará permanentemente todas las configuraciones locales, transcripciones, grabaciones de audio, modelos de IA descargados, conexiones de calendario y datos en caché. Los datos en la nube y tu cuenta no se verán afectados. La aplicación se recargará después del restablecimiento.","failedDescription": "Algo salió mal. Inténtalo de nuevo o reinstala la app.","failedTitle": "No se pudo restablecer","successDescription": "Todo ha sido restablecido. La app se recargará ahora.",@@ -1085,7 +1098,7 @@"title": "Restablecer todos los datos de la app"},"resetAppData": "Restablecer datos de la app",- "resetAppDataDescription": "Elimina permanentemente todos los ajustes, transcripciones y datos en caché"+ "resetAppDataDescription": "Eliminar permanentemente todas las configuraciones locales, transcripciones, grabaciones de audio, modelos descargados y datos en caché"},"dictionary": {"title": "Diccionario personalizado",@@ -1131,6 +1144,11 @@"resetToDefault": "Restablecer a {{hotkey}}","title": "Atajo de dictado"},+ "meetingHotkey": {+ "title": "Atajo modo reunión",+ "description": "Iniciar modo reunión y ajustar el panel al lado de la pantalla",+ "clear": "Eliminar atajo"+ },"microphone": {"description": "Selecciona qué dispositivo de entrada usar para dictado","title": "Micrófono"diff --git a/src/locales/fr/translation.json b/src/locales/fr/translation.jsonindex b6d4cd799..29e9fcb8b 100644--- a/src/locales/fr/translation.json+++ b/src/locales/fr/translation.json@@ -1013,7 +1013,20 @@"button": "Créer un compte gratuit"},"user": "Utilisateur",- "wordsRemaining": "{{remaining}} restants"+ "wordsRemaining": "{{remaining}} restants",+ "deleteAccount": {+ "label": "Supprimer le compte",+ "labelDescription": "Supprimer définitivement votre compte, toutes les données cloud et les données locales. Cette action est irréversible.",+ "button": "Supprimer mon compte",+ "deleting": "Suppression...",+ "title": "Supprimer votre compte ?",+ "description": "Cela supprimera définitivement votre compte OpenWhispr, toutes les notes synchronisées dans le cloud et toutes les données locales, y compris les transcriptions, les enregistrements audio, les modèles téléchargés, les connexions de calendrier et les paramètres. Cette action est irréversible.",+ "confirmText": "Tout supprimer",+ "successTitle": "Compte supprimé",+ "successDescription": "Votre compte et toutes les données ont été supprimés. L'application va maintenant se recharger.",+ "failedTitle": "Échec de la suppression",+ "failedDescription": "Une erreur s'est produite lors de la suppression de votre compte. Vos données locales ont peut-être été partiellement supprimées. Veuillez réessayer."+ }},"agentConfig": {"agentName": "Nom de l'agent",@@ -1077,7 +1090,7 @@"removing": "Suppression...","resetAll": {"confirmText": "Tout supprimer",- "description": "Cela supprimera définitivement tous les paramètres, transcriptions et données en cache. L'application redémarrera après la réinitialisation.",+ "description": "Cela supprimera définitivement tous les paramètres locaux, transcriptions, enregistrements audio, modèles IA téléchargés, connexions de calendrier et données en cache. Les données cloud et votre compte ne seront pas affectés. L'application se rechargera après la réinitialisation.","failedDescription": "Un problème est survenu. Veuillez réessayer ou réinstaller l'application.","failedTitle": "Impossible de réinitialiser","successDescription": "Tout a été réinitialisé. L'application va redémarrer.",@@ -1085,7 +1098,7 @@"title": "Réinitialiser toutes les données de l'application"},"resetAppData": "Réinitialiser les données de l'application",- "resetAppDataDescription": "Supprime définitivement tous les paramètres, transcriptions et données en cache"+ "resetAppDataDescription": "Supprimer définitivement tous les paramètres locaux, transcriptions, enregistrements audio, modèles téléchargés et données en cache"},"dictionary": {"title": "Dictionnaire personnalisé",@@ -1131,6 +1144,11 @@"resetToDefault": "Réinitialiser à {{hotkey}}","title": "Raccourci de dictée"},+ "meetingHotkey": {+ "title": "Raccourci mode réunion",+ "description": "Démarrer le mode réunion et ancrer le panneau sur le côté de l'écran",+ "clear": "Supprimer le raccourci"+ },"microphone": {"description": "Sélectionnez le périphérique d'entrée à utiliser pour la dictée","title": "Microphone"diff --git a/src/locales/it/translation.json b/src/locales/it/translation.jsonindex 608ae2733..1d5c14417 100644--- a/src/locales/it/translation.json+++ b/src/locales/it/translation.json@@ -1013,7 +1013,20 @@"button": "Crea account gratuito"},"user": "Utente",- "wordsRemaining": "{{remaining}} rimanenti"+ "wordsRemaining": "{{remaining}} rimanenti",+ "deleteAccount": {+ "label": "Elimina account",+ "labelDescription": "Elimina permanentemente il tuo account, tutti i dati cloud e i dati locali. Questa azione non può essere annullata.",+ "button": "Elimina il mio account",+ "deleting": "Eliminazione...",+ "title": "Eliminare il tuo account?",+ "description": "Questo eliminerà permanentemente il tuo account OpenWhispr, tutte le note sincronizzate nel cloud e tutti i dati locali, incluse trascrizioni, registrazioni audio, modelli scaricati, connessioni calendario e impostazioni. Questa azione non può essere annullata.",+ "confirmText": "Elimina tutto",+ "successTitle": "Account eliminato",+ "successDescription": "Il tuo account e tutti i dati sono stati eliminati. L'app si ricaricherà ora.",+ "failedTitle": "Eliminazione fallita",+ "failedDescription": "Qualcosa è andato storto durante l'eliminazione del tuo account. I tuoi dati locali potrebbero essere stati parzialmente rimossi. Riprova."+ }},"agentConfig": {"agentName": "Nome dell'agente",@@ -1077,7 +1090,7 @@"removing": "Rimozione...","resetAll": {"confirmText": "Elimina tutto",- "description": "Questa operazione eliminerà definitivamente tutte le impostazioni, le trascrizioni e i dati in cache. L'app si ricaricherà dopo il ripristino.",+ "description": "Questo eliminerà permanentemente tutte le impostazioni locali, trascrizioni, registrazioni audio, modelli IA scaricati, connessioni calendario e dati memorizzati nella cache. I dati cloud e il tuo account non saranno interessati. L'app si ricaricherà dopo il ripristino.","failedDescription": "Qualcosa è andato storto. Riprova o reinstalla l'app.","failedTitle": "Impossibile reimpostare","successDescription": "Tutto è stato reimpostato. L'app si ricaricherà ora.",@@ -1085,7 +1098,7 @@"title": "Reimposta tutti i dati dell'app"},"resetAppData": "Reimposta dati app",- "resetAppDataDescription": "Elimina definitivamente tutte le impostazioni, le trascrizioni e i dati in cache"+ "resetAppDataDescription": "Eliminare permanentemente tutte le impostazioni locali, trascrizioni, registrazioni audio, modelli scaricati e dati memorizzati nella cache"},"dictionary": {"title": "Dizionario personalizzato",@@ -1131,6 +1144,11 @@"resetToDefault": "Ripristina a {{hotkey}}","title": "Scorciatoia di dettatura"},+ "meetingHotkey": {+ "title": "Scorciatoia modalità meeting",+ "description": "Avvia la modalità meeting e posiziona il pannello a lato dello schermo",+ "clear": "Rimuovi scorciatoia"+ },"microphone": {"description": "Seleziona il dispositivo di ingresso da usare per la dettatura","title": "Microfono"diff --git a/src/locales/ja/translation.json b/src/locales/ja/translation.jsonindex 8bcc3a075..4bb86a17f 100644--- a/src/locales/ja/translation.json+++ b/src/locales/ja/translation.json@@ -1013,7 +1013,20 @@"title": "Pro を 7 日間無料でお試し"},"user": "ユーザー",- "wordsRemaining": "残り {{remaining}}"+ "wordsRemaining": "残り {{remaining}}",+ "deleteAccount": {+ "label": "アカウントを削除",+ "labelDescription": "アカウント、すべてのクラウドデータ、ローカルデータを完全に削除します。この操作は元に戻せません。",+ "button": "アカウントを削除",+ "deleting": "削除中...",+ "title": "アカウントを削除しますか?",+ "description": "OpenWhispr アカウント、すべてのクラウド同期ノート、すべてのローカルデータ(文字起こし、音声録音、ダウンロード済みモデル、カレンダー接続、設定を含む)が完全に削除されます。この操作は元に戻せません。",+ "confirmText": "すべて削除",+ "successTitle": "アカウントが削除されました",+ "successDescription": "アカウントとすべてのデータが削除されました。アプリが再読み込みされます。",+ "failedTitle": "削除に失敗しました",+ "failedDescription": "アカウントの削除中にエラーが発生しました。ローカルデータが部分的に削除された可能性があります。もう一度お試しください。"+ }},"agentConfig": {"agentName": "エージェント名",@@ -1077,7 +1090,7 @@"removing": "削除中...","resetAll": {"confirmText": "すべて削除",- "description": "すべての設定、文字起こし履歴、キャッシュデータが完全に削除されます。リセット後にアプリが再読み込みされます。",+ "description": "すべてのローカル設定、文字起こし、音声録音、ダウンロード済みAIモデル、カレンダー接続、キャッシュデータが完全に削除されます。クラウドデータとアカウントは影響を受けません。リセット後にアプリが再読み込みされます。","failedDescription": "問題が発生しました。もう一度試すか、アプリを再インストールしてください。","failedTitle": "リセットできませんでした","successDescription": "すべてリセットされました。アプリを再読み込みします。",@@ -1085,7 +1098,7 @@"title": "すべてのアプリデータをリセット"},"resetAppData": "アプリデータをリセット",- "resetAppDataDescription": "すべての設定、文字起こし履歴、キャッシュデータを完全に削除"+ "resetAppDataDescription": "すべてのローカル設定、文字起こし、音声録音、ダウンロード済みモデル、キャッシュデータを完全に削除"},"dictionary": {"title": "カスタム辞書",@@ -1131,6 +1144,11 @@"resetToDefault": "{{hotkey}}にリセット","title": "ディクテーションホットキー"},+ "meetingHotkey": {+ "title": "ミーティングモードホットキー",+ "description": "ミーティングモードを開始し、パネルを画面の横に配置する",+ "clear": "ホットキーを削除"+ },"microphone": {"description": "ディクテーションに使用する入力デバイスを選択","title": "マイク"diff --git a/src/locales/pt/translation.json b/src/locales/pt/translation.jsonindex 3726b8990..791158eff 100644--- a/src/locales/pt/translation.json+++ b/src/locales/pt/translation.json@@ -985,7 +985,20 @@"button": "Criar conta gratuita"},"user": "Usuário",- "wordsRemaining": "{{remaining}} restantes"+ "wordsRemaining": "{{remaining}} restantes",+ "deleteAccount": {+ "label": "Excluir conta",+ "labelDescription": "Excluir permanentemente sua conta, todos os dados na nuvem e dados locais. Esta ação não pode ser desfeita.",+ "button": "Excluir minha conta",+ "deleting": "Excluindo...",+ "title": "Excluir sua conta?",+ "description": "Isso excluirá permanentemente sua conta OpenWhispr, todas as notas sincronizadas na nuvem e todos os dados locais, incluindo transcrições, gravações de áudio, modelos baixados, conexões de calendário e configurações. Esta ação não pode ser desfeita.",+ "confirmText": "Excluir tudo",+ "successTitle": "Conta excluída",+ "successDescription": "Sua conta e todos os dados foram excluídos. O aplicativo será recarregado agora.",+ "failedTitle": "Falha na exclusão",+ "failedDescription": "Algo deu errado ao excluir sua conta. Seus dados locais podem ter sido parcialmente removidos. Tente novamente."+ }},"agentConfig": {"agentName": "Nome do agente",@@ -1049,7 +1062,7 @@"removing": "Removendo...","resetAll": {"confirmText": "Excluir tudo",- "description": "Isso excluirá permanentemente todas as configurações, transcrições e dados em cache. O app será recarregado após a redefinição.",+ "description": "Isso excluirá permanentemente todas as configurações locais, transcrições, gravações de áudio, modelos de IA baixados, conexões de calendário e dados em cache. Os dados na nuvem e sua conta não serão afetados. O aplicativo será recarregado após a redefinição.","failedDescription": "Algo deu errado. Tente novamente ou reinstale o app.","failedTitle": "Não foi possível redefinir","successDescription": "Tudo foi redefinido. O app será recarregado agora.",@@ -1057,7 +1070,7 @@"title": "Redefinir todos os dados do app"},"resetAppData": "Redefinir dados do app",- "resetAppDataDescription": "Excluir permanentemente todas as configurações, transcrições e dados em cache"+ "resetAppDataDescription": "Excluir permanentemente todas as configurações locais, transcrições, gravações de áudio, modelos baixados e dados em cache"},"dictionary": {"title": "Dicionário personalizado",@@ -1103,6 +1116,11 @@"resetToDefault": "Redefinir para {{hotkey}}","title": "Atalho de ditado"},+ "meetingHotkey": {+ "title": "Atalho modo reunião",+ "description": "Iniciar modo reunião e posicionar o painel ao lado da tela",+ "clear": "Remover atalho"+ },"microphone": {"description": "Selecione qual dispositivo de entrada usar para ditado","title": "Microfone"diff --git a/src/locales/ru/translation.json b/src/locales/ru/translation.jsonindex f473b7e1d..aacf1faf9 100644--- a/src/locales/ru/translation.json+++ b/src/locales/ru/translation.json@@ -1013,7 +1013,20 @@"button": "Создать бесплатный аккаунт"},"user": "Пользователь",- "wordsRemaining": "Осталось {{remaining}}"+ "wordsRemaining": "Осталось {{remaining}}",+ "deleteAccount": {+ "label": "Удалить аккаунт",+ "labelDescription": "Навсегда удалить ваш аккаунт, все облачные и локальные данные. Это действие нельзя отменить.",+ "button": "Удалить мой аккаунт",+ "deleting": "Удаление...",+ "title": "Удалить ваш аккаунт?",+ "description": "Это навсегда удалит ваш аккаунт OpenWhispr, все синхронизированные облачные заметки и все локальные данные, включая транскрипции, аудиозаписи, загруженные модели, подключения календаря и настройки. Это действие нельзя отменить.",+ "confirmText": "Удалить всё",+ "successTitle": "Аккаунт удалён",+ "successDescription": "Ваш аккаунт и все данные были удалены. Приложение сейчас перезагрузится.",+ "failedTitle": "Ошибка удаления",+ "failedDescription": "Что-то пошло не так при удалении вашего аккаунта. Ваши локальные данные могли быть частично удалены. Попробуйте снова."+ }},"agentConfig": {"agentName": "Имя агента",@@ -1077,7 +1090,7 @@"removing": "Удаление...","resetAll": {"confirmText": "Удалить всё",- "description": "Все настройки, транскрипции и кешированные данные будут безвозвратно удалены. Приложение перезагрузится после сброса.",+ "description": "Это навсегда удалит все локальные настройки, транскрипции, аудиозаписи, загруженные модели ИИ, подключения календаря и кэшированные данные. Облачные данные и ваш аккаунт не будут затронуты. Приложение перезагрузится после сброса.","failedDescription": "Что-то пошло не так. Попробуйте ещё раз или переустановите приложение.","failedTitle": "Не удалось сбросить","successDescription": "Всё сброшено. Приложение сейчас перезагрузится.",@@ -1085,7 +1098,7 @@"title": "Сбросить все данные приложения"},"resetAppData": "Сбросить данные приложения",- "resetAppDataDescription": "Безвозвратно удалить все настройки, транскрипции и кешированные данные"+ "resetAppDataDescription": "Навсегда удалить все локальные настройки, транскрипции, аудиозаписи, загруженные модели и кэшированные данные"},"dictionary": {"title": "Пользовательский словарь",@@ -1131,6 +1144,11 @@"resetToDefault": "Сбросить на {{hotkey}}","title": "Горячая клавиша диктовки"},+ "meetingHotkey": {+ "title": "Горячая клавиша режима встречи",+ "description": "Запустить режим встречи и закрепить панель сбоку экрана",+ "clear": "Удалить горячую клавишу"+ },"microphone": {"description": "Выберите устройство ввода для диктовки","title": "Микрофон"diff --git a/src/locales/zh-CN/translation.json b/src/locales/zh-CN/translation.jsonindex bc9970aa9..af0e7113d 100644--- a/src/locales/zh-CN/translation.json+++ b/src/locales/zh-CN/translation.json@@ -1013,7 +1013,20 @@"button": "免费创建账户"},"user": "用户",- "wordsRemaining": "剩余 {{remaining}} 个词"+ "wordsRemaining": "剩余 {{remaining}} 个词",+ "deleteAccount": {+ "label": "删除账户",+ "labelDescription": "永久删除您的账户、所有云端数据和本地数据。此操作无法撤销。",+ "button": "删除我的账户",+ "deleting": "正在删除...",+ "title": "删除您的账户?",+ "description": "这将永久删除您的 OpenWhispr 账户、所有云端同步笔记和所有本地数据,包括转录、音频录制、下载的模型、日历连接和设置。此操作无法撤销。",+ "confirmText": "删除所有内容",+ "successTitle": "账户已删除",+ "successDescription": "您的账户和所有数据已被删除。应用将立即重新加载。",+ "failedTitle": "删除失败",+ "failedDescription": "删除您的账户时出错。您的本地数据可能已被部分删除。请重试。"+ }},"agentConfig": {"agentName": "助手名称",@@ -1077,7 +1090,7 @@"removing": "正在删除...","resetAll": {"confirmText": "删除所有数据",- "description": "这将永久删除所有设置、转录记录和缓存数据。重置后应用将重新加载。",+ "description": "这将永久删除所有本地设置、转录、音频录制、下载的 AI 模型、日历连接和缓存数据。云端数据和您的账户不会受到影响。应用将在重置后重新加载。","failedDescription": "出了点问题,请重试或重新安装应用。","failedTitle": "无法重置","successDescription": "所有数据已重置,应用将立即重新加载。",@@ -1085,7 +1098,7 @@"title": "重置所有应用数据"},"resetAppData": "重置应用数据",- "resetAppDataDescription": "永久删除所有设置、转录记录和缓存数据"+ "resetAppDataDescription": "永久删除所有本地设置、转录、音频录制、下载的模型和缓存数据"},"dictionary": {"title": "自定义词典",@@ -1131,6 +1144,11 @@"resetToDefault": "重置为 {{hotkey}}","title": "听写快捷键"},+ "meetingHotkey": {+ "title": "会议模式快捷键",+ "description": "启动会议模式并将面板固定到屏幕侧边",+ "clear": "移除快捷键"+ },"microphone": {"description": "选择用于听写的输入设备","title": "麦克风"diff --git a/src/locales/zh-TW/translation.json b/src/locales/zh-TW/translation.jsonindex 688d26154..4f59b0905 100644--- a/src/locales/zh-TW/translation.json+++ b/src/locales/zh-TW/translation.json@@ -1013,7 +1013,20 @@"button": "建立免費帳號"},"user": "使用者",- "wordsRemaining": "剩餘 {{remaining}} 字"+ "wordsRemaining": "剩餘 {{remaining}} 字",+ "deleteAccount": {+ "label": "刪除帳戶",+ "labelDescription": "永久刪除您的帳戶、所有雲端資料和本地資料。此操作無法復原。",+ "button": "刪除我的帳戶",+ "deleting": "正在刪除...",+ "title": "刪除您的帳戶?",+ "description": "這將永久刪除您的 OpenWhispr 帳戶、所有雲端同步筆記和所有本地資料,包括轉錄、音訊錄製、下載的模型、行事曆連線和設定。此操作無法復原。",+ "confirmText": "刪除所有內容",+ "successTitle": "帳戶已刪除",+ "successDescription": "您的帳戶和所有資料已被刪除。應用程式將立即重新載入。",+ "failedTitle": "刪除失敗",+ "failedDescription": "刪除您的帳戶時發生錯誤。您的本地資料可能已被部分刪除。請重試。"+ }},"agentConfig": {"agentName": "助理名稱",@@ -1077,7 +1090,7 @@"removing": "移除中...","resetAll": {"confirmText": "刪除所有資料",- "description": "這將永久刪除所有設定、轉錄記錄和快取資料。重設後應用程式將重新載入。",+ "description": "這將永久刪除所有本地設定、轉錄、音訊錄製、下載的 AI 模型、行事曆連線和快取資料。雲端資料和您的帳戶不會受到影響。應用程式將在重設後重新載入。","failedDescription": "發生錯誤。請再試一次或重新安裝應用程式。","failedTitle": "無法重設","successDescription": "所有資料已重設。應用程式即將重新載入。",@@ -1085,7 +1098,7 @@"title": "重設所有應用程式資料"},"resetAppData": "重設應用程式資料",- "resetAppDataDescription": "永久刪除所有設定、轉錄記錄和快取資料"+ "resetAppDataDescription": "永久刪除所有本地設定、轉錄、音訊錄製、下載的模型和快取資料"},"dictionary": {"title": "自訂詞典",@@ -1131,6 +1144,11 @@"resetToDefault": "重置為 {{hotkey}}","title": "語音輸入快捷鍵"},+ "meetingHotkey": {+ "title": "會議模式快捷鍵",+ "description": "啟動會議模式並將面板固定到螢幕側邊",+ "clear": "移除快捷鍵"+ },"microphone": {"description": "選擇用於語音輸入的輸入裝置","title": "麥克風"diff --git a/src/services/NotesService.ts b/src/services/NotesService.tsindex 4d8dae576..de8479281 100644--- a/src/services/NotesService.ts+++ b/src/services/NotesService.ts@@ -85,6 +85,28 @@ async function list(limit?: number, before?: string): Promise<{ notes: CloudNotereturn res.json() as Promise<{ notes: CloudNote[] }>;}+async function deleteAll(): Promise<{ deleted: number; errors: number }> {+ // Try bulk endpoint first; fall back to per-note deletion+ try {+ const res = await fetch(`${OPENWHISPR_API_URL}/api/notes/delete-all`, {+ method: "DELETE",+ credentials: "include",+ });+ if (res.ok) {+ const data = (await res.json()) as { deleted?: number };+ return { deleted: data.deleted ?? 0, errors: 0 };+ }+ } catch {+ // bulk endpoint doesn't exist — fall through+ }++ // Fallback: list all and delete one-by-one+ const { notes } = await list(9999);+ const results = await Promise.allSettled(notes.map((n) => deleteNote(n.id)));+ const errors = results.filter((r) => r.status === "rejected").length;+ return { deleted: results.length - errors, errors };+}+async function search(query: string, limit?: number): Promise<{ notes: SearchResult[] }> {const res = await fetch(`${OPENWHISPR_API_URL}/api/notes/search`, {method: "POST",@@ -96,6 +118,14 @@ async function search(query: string, limit?: number): Promise<{ notes: SearchResreturn res.json() as Promise<{ notes: SearchResult[] }>;}-export { create, batchCreate, update, deleteNote, list, search };+export { create, batchCreate, update, deleteNote, deleteAll, list, search };-export const NotesService = { create, batchCreate, update, delete: deleteNote, list, search };+export const NotesService = {+ create,+ batchCreate,+ update,+ delete: deleteNote,+ deleteAll,+ list,+ search,+};diff --git a/src/stores/settingsStore.ts b/src/stores/settingsStore.tsindex 808cf13b5..1ad91a433 100644--- a/src/stores/settingsStore.ts+++ b/src/stores/settingsStore.ts@@ -135,6 +135,7 @@ export interface SettingsStatesetCustomReasoningApiKey: (key: string) => void;setDictationKey: (key: string) => void;+ setMeetingKey: (key: string) => void;setActivationMode: (mode: "tap" | "push") => void;setPreferBuiltInMic: (value: boolean) => void;@@ -256,6 +257,7 @@ export const useSettingsStore = create<SettingsState>()((set, get) => ({customReasoningApiKey: readString("customReasoningApiKey", ""),dictationKey: readString("dictationKey", ""),+ meetingKey: readString("meetingKey", ""),activationMode: (readString("activationMode", "tap") === "push" ? "push" : "tap") as| "tap"| "push",@@ -413,6 +415,13 @@ export const useSettingsStore = create<SettingsState>()((set, get) => ({window.electronAPI?.saveDictationKey?.(key);}},+ setMeetingKey: (key: string) => {+ if (isBrowser) localStorage.setItem("meetingKey", key);+ set({ meetingKey: key });+ if (isBrowser) {+ window.electronAPI?.notifyMeetingHotkeyChanged?.(key);+ }+ },setActivationMode: (mode: "tap" | "push") => {// Linux has no native key listener for push-to-talk — force tapdiff --git a/src/types/electron.ts b/src/types/electron.tsindex dfde4dd35..e6fdb45eb 100644--- a/src/types/electron.ts+++ b/src/types/electron.ts@@ -609,7 +609,7 @@ declare global {// App managementappQuit: () => Promise<void>;- cleanupApp: () => Promise<{ success: boolean; message: string }>;+ cleanupApp: () => Promise<{ success: boolean; message: string; errors?: string[] }>;// Update operationscheckForUpdates: () => Promise<UpdateCheckResult>;@@ -744,6 +744,7 @@ declare global {// Windows Push-to-Talk notificationsnotifyActivationModeChanged?: (mode: "tap" | "push") => void;notifyHotkeyChanged?: (hotkey: string) => void;+ notifyMeetingHotkeyChanged?: (hotkey: string) => void;notifyFloatingIconAutoHideChanged?: (enabled: boolean) => void;onFloatingIconAutoHideChanged?: (callback: (enabled: boolean) => void) => () => void;notifyStartMinimizedChanged?: (enabled: boolean) => void;diff --git a/src/utils.js b/src/utils.jsdeleted file mode 100644index 5c39e158c..000000000--- a/src/utils.js+++ /dev/null@@ -1,67 +0,0 @@-const fs = require("fs");-const path = require("path");-const os = require("os");-const { app } = require("electron");--class AppUtils {- static cleanup(mainWindow) {- console.log("Starting cleanup process...");-- // Database file deletion- try {- const dbPath = path.join(- app.getPath("userData"),- process.env.NODE_ENV === "development" ? "transcriptions-dev.db" : "transcriptions.db"- );- if (fs.existsSync(dbPath)) {- fs.unlinkSync(dbPath);- console.log("✅ Database file deleted:", dbPath);- }- } catch (error) {- console.error("❌ Error deleting database file:", error);- }-- // Local storage clearing- if (mainWindow && mainWindow.webContents) {- mainWindow.webContents- .executeJavaScript("localStorage.clear()")- .then(() => {- console.log("✅ Local storage cleared");- })- .catch((error) => {- console.error("❌ Error clearing local storage:", error);- });- }-- // Local Whisper model deletion- try {- const modelCacheDir = path.join(os.homedir(), ".cache", "openwhispr", "whisper-models");- if (fs.existsSync(modelCacheDir)) {- fs.rmSync(modelCacheDir, { recursive: true, force: true });- console.log("✅ Local Whisper models deleted:", modelCacheDir);- }- } catch (error) {- console.error("❌ Error deleting Whisper models:", error);- }-- // Permissions instruction- console.log(- "ℹ️ Please manually remove accessibility and microphone permissions via System Preferences if needed."- );-- // Env file deletion- try {- const envPath = path.join(app.getPath("userData"), ".env");- if (fs.existsSync(envPath)) {- fs.unlinkSync(envPath);- console.log("✅ .env file deleted:", envPath);- }- } catch (error) {- console.error("❌ Error deleting .env file:", error);- }-- console.log("Cleanup process completed.");- }-}--module.exports = AppUtils;