Expand description
Recording session management — async input event handlers for the recording state machine.
These functions are called from the main event loop in super when
keyboard or hotkey input events arrive. They implement the full recording
pipeline: cpal capture → Whisper transcription → OpenCode injection.
§Push-to-talk flow
- [
handle_push_to_talk_start] — opens aCpalRecorder, starts the audio stream, spawns an energy-forwarding task, transitions toRecordingState::Recording. - [
handle_push_to_talk_stop] — stops the recorder, checks minimum duration, writes aTempWav, transcribes via Whisper, injects into OpenCode, transitions back to Idle (or ApprovalPending).