MCPcopy
hub / github.com/codeaashu/claude-code / beginFocusRecording

Function beginFocusRecording

src/hooks/useVoice.ts:594–607  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

592 !silenceTimedOutRef.current
593 ) {
594 const beginFocusRecording = (): void => {
595 // Re-check conditions — state or enabled/focusMode may have changed
596 // during the await (effect cleanup sets cancelled).
597 if (
598 cancelled ||
599 stateRef.current !== 'idle' ||
600 silenceTimedOutRef.current
601 )
602 return
603 logForDebugging('[voice] Focus gained, starting recording session')
604 focusTriggeredRef.current = true
605 void startRecordingSession()
606 armFocusSilenceTimer()
607 }
608 if (voiceModule) {
609 beginFocusRecording()
610 } else {

Callers 1

useVoiceFunction · 0.85

Calls 3

logForDebuggingFunction · 0.85
startRecordingSessionFunction · 0.85
armFocusSilenceTimerFunction · 0.85

Tested by

no test coverage detected