From e43ef004ebd4a42c36e53f9b080dce6ae4326b0d Mon Sep 17 00:00:00 2001 From: John Tennant Date: Fri, 31 Jul 2026 15:06:52 -0400 Subject: [PATCH] refactor(desktop): remove unused dictation start callback Signed-off-by: John Tennant --- desktop/src/features/dictation/hooks/useLocalDictation.ts | 5 ----- 1 file changed, 5 deletions(-) diff --git a/desktop/src/features/dictation/hooks/useLocalDictation.ts b/desktop/src/features/dictation/hooks/useLocalDictation.ts index 2a4e3ba44..13b40e359 100644 --- a/desktop/src/features/dictation/hooks/useLocalDictation.ts +++ b/desktop/src/features/dictation/hooks/useLocalDictation.ts @@ -18,7 +18,6 @@ function invokeRawBinary(cmd: string, payload: Uint8Array): Promise { interface UseLocalDictationOptions { disabled?: boolean; - onRecordingStart?: () => void; onTranscriptText: (text: string) => void; } @@ -71,7 +70,6 @@ const SESSION_HEADER_BYTES = 8; */ export function useLocalDictation({ disabled = false, - onRecordingStart, onTranscriptText, }: UseLocalDictationOptions) { const [isRecording, setIsRecording] = useState(false); @@ -91,7 +89,6 @@ export function useLocalDictation({ const flushChainRef = useRef>(Promise.resolve()); const unlistenTranscriptRef = useRef(null); const unlistenStateRef = useRef(null); - const onRecordingStartRef = useRef(onRecordingStart); const onTranscriptTextRef = useRef(onTranscriptText); // Native session ID — set after `start_dictation` returns. Transcript and // state events include this ID so we can definitively ignore stale events @@ -101,7 +98,6 @@ export function useLocalDictation({ // awaiting async setup. The start resumes and bails before activating. const startAbortedRef = useRef(false); - onRecordingStartRef.current = onRecordingStart; onTranscriptTextRef.current = onTranscriptText; const isEnabled = !disabled && isAvailable; @@ -307,7 +303,6 @@ export function useLocalDictation({ flushChainRef.current = Promise.resolve(); setIsStarting(true); - onRecordingStartRef.current?.(); try { // 1. Start the native STT engine — returns the session ID used to tag events.