A desktop coding agent with free access to frontier models.
TypeScript
fix: quieter voice recording
ogsamrat4ff77e6dda69
diff --git a/apps/app/src/react-app/domains/voice/use-voice-dictation.ts b/apps/app/src/react-app/domains/voice/use-voice-dictation.tsindex ca9fbb88..2a61a213 100644--- a/apps/app/src/react-app/domains/voice/use-voice-dictation.ts+++ b/apps/app/src/react-app/domains/voice/use-voice-dictation.ts@@ -13,7 +13,7 @@ import {} from "@/app/lib/voice-core";import { defaultHotkey, hotkeyDown, hotkeyUp, matchesHotkeyDown, matchesHotkeyUp, parseHotkey } from "./hotkey";import { MicrophoneSource, ensureMicrophonePermission, microphoneSettingsUrl, type MicPermission } from "./mic-source";-import { useVoiceSettings, voicePrivacyNote } from "./voice-settings";+import { useVoiceSettings } from "./voice-settings";import { peekVoiceStatus, refreshVoiceStatus, useVoiceStatus } from "./voice-status";export type VoiceClient = Pick<OmniRushServerClient, "baseUrl" | "getVoiceStatus" | "voiceTranscriptionEndpoint">;@@ -113,10 +113,6 @@ export function useVoiceDictation(input: {const editor = editorRef.current;if (!editor) return;const current = useVoiceSettings.getState();- if (!current.disclosureSeen) {- toast.info(voicePrivacyNote(peekVoiceStatus(client, latest.current.workspaceId)?.providerRetentionDays), { duration: 10_000 });- current.update({ disclosureSeen: true });- }const permission = await ensureMicrophonePermission().catch((): MicPermission => "unknown");if (permission === "denied") {setPermissionDenied(true);diff --git a/apps/app/src/react-app/domains/voice/voice-settings.ts b/apps/app/src/react-app/domains/voice/voice-settings.tsindex c4939bc4..31138db0 100644--- a/apps/app/src/react-app/domains/voice/voice-settings.ts+++ b/apps/app/src/react-app/domains/voice/voice-settings.ts@@ -15,8 +15,6 @@ export type VoiceSettings = {language: string;/** Send the prompt when dictation ends (at least 3 words). */autoSend: boolean;- /** The one-time privacy note was shown. */- disclosureSeen: boolean;};type VoiceSettingsStore = VoiceSettings & {@@ -30,7 +28,6 @@ export const DEFAULT_VOICE_SETTINGS: VoiceSettings = {deviceId: null,language: "auto",autoSend: false,- disclosureSeen: false,};export const useVoiceSettings = create<VoiceSettingsStore>()(@@ -48,7 +45,7 @@ export const useVoiceSettings = create<VoiceSettingsStore>()();/**- * Shown once, on first use, and in Settings → Voice. The provider's+ * Shown in Settings → Voice. The provider's* retention comes from the backend's voice status (it cannot be turned off* upstream today: 30 days); without one the clause is left out.*/diff --git a/apps/app/tests/voice-dictation-ui.test.tsx b/apps/app/tests/voice-dictation-ui.test.tsxindex f807e205..bb488ca3 100644--- a/apps/app/tests/voice-dictation-ui.test.tsx+++ b/apps/app/tests/voice-dictation-ui.test.tsx@@ -185,7 +185,7 @@ describe("dictation in the composer", () => {document.body.append(container);root = createRoot(container);const { useVoiceSettings, DEFAULT_VOICE_SETTINGS } = await import("../src/react-app/domains/voice/voice-settings");- useVoiceSettings.setState({ ...DEFAULT_VOICE_SETTINGS, disclosureSeen: true });+ useVoiceSettings.setState(DEFAULT_VOICE_SETTINGS);await act(async () => {root.render(<QueryClientProvider client={queryClient}>