Skip to content

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

Merge branch 'HeroTools:main' into 250929--custom-llm-endpoint

ayalda3885f4a94e30
diff --cc src/components/SettingsPage.tsx
index 46715a8c4,9234decba..ea51affa7
--- a/src/components/SettingsPage.tsx
+++ b/src/components/SettingsPage.tsx
@@@ -16,8 -16,8 +16,9 @@@ import { REASONING_PROVIDERS } from "..
import { formatHotkeyLabel } from "../utils/hotkeys";
import LanguageSelector from "./ui/LanguageSelector";
import PromptStudio from "./ui/PromptStudio";
+import { API_ENDPOINTS } from "../config/constants";
import AIModelSelectorEnhanced from "./AIModelSelectorEnhanced";
+ import type { UpdateInfoResult } from "../types/electron";
const InteractiveKeyboard = React.lazy(() => import("./ui/Keyboard"));
export type SettingsSectionType =
@@@ -155,47 -218,35 +223,38 @@@ export default function SettingsPage(
window.electronAPI.removeAllListeners?.("update-download-progress");
}
};
- }, [whisperHook]);
-
- const subscribeToUpdates = () => {
- if (window.electronAPI) {
- const handleUpdateAvailable = (event, info) => {
- setUpdateStatus((prev) => ({ ...prev, updateAvailable: true, updateDownloaded: false }));
- if (info) {
- setUpdateInfo({
- version: info.version || 'unknown',
- releaseDate: info.releaseDate,
- releaseNotes: info.releaseNotes,
- });
- }
- };
-
- const handleUpdateDownloaded = (event, info) => {
- setUpdateStatus((prev) => ({ ...prev, updateDownloaded: true }));
- setDownloadingUpdate(false);
- };
-
- const handleUpdateProgress = (event, progressObj) => {
- setUpdateDownloadProgress(progressObj.percent || 0);
- };
-
- const handleUpdateError = (event, error) => {
- setCheckingForUpdates(false);
- setDownloadingUpdate(false);
- console.error("Update error:", error);
- };
-
- window.electronAPI.onUpdateAvailable?.(handleUpdateAvailable);
- window.electronAPI.onUpdateDownloaded?.(handleUpdateDownloaded);
- window.electronAPI.onUpdateDownloadProgress?.(handleUpdateProgress);
- window.electronAPI.onUpdateError?.(handleUpdateError);
+ }, [whisperHook, subscribeToUpdates]);
+
+ useEffect(() => {
+ if (installInitiated) {
+ if (installTimeoutRef.current) {
+ clearTimeout(installTimeoutRef.current);
+ }
+ installTimeoutRef.current = setTimeout(() => {
+ setInstallInitiated(false);
+ showAlertDialog({
+ title: "Still Running",
+ description:
+ "OpenWhispr didn't restart automatically. Please quit the app manually to finish installing the update.",
+ });
+ }, 10000);
+ } else if (installTimeoutRef.current) {
+ clearTimeout(installTimeoutRef.current);
+ installTimeoutRef.current = null;
}
- };
+
+ return () => {
+ if (installTimeoutRef.current) {
+ clearTimeout(installTimeoutRef.current);
+ installTimeoutRef.current = null;
+ }
+ };
+ }, [installInitiated, showAlertDialog]);
const saveReasoningSettings = useCallback(async () => {
+ const normalizedReasoningBase = (cloudReasoningBaseUrl || '').trim();
+ setCloudReasoningBaseUrl(normalizedReasoningBase);
+
// Update reasoning settings
updateReasoningSettings({
useReasoningModel,