feat #14740: automatic call detection on windows
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -40,6 +40,15 @@ export type RecordingState =
|
||||
| { state: 'idle' }
|
||||
| { state: 'recording'; call_id: CallId; app: string; started_at: string }
|
||||
|
||||
/** What the end-of-call prompt shows about a call. Times are RFC 3339. */
|
||||
export interface CallBrief {
|
||||
id: CallId
|
||||
app: string
|
||||
started_at: string
|
||||
ended_at: string | null
|
||||
duration_secs: number
|
||||
}
|
||||
|
||||
export interface Levels {
|
||||
mic: number
|
||||
out: number
|
||||
@@ -57,9 +66,15 @@ export const getRecordingState = () => invoke<RecordingState>('get_recording_sta
|
||||
export const startManualRecording = () => invoke<CallId>('start_manual_recording')
|
||||
export const stopRecording = () => invoke<void>('stop_recording')
|
||||
export const discardCurrentRecording = () => invoke<void>('discard_current_recording')
|
||||
export const getPendingPrompt = () => invoke<CallBrief | null>('get_pending_prompt')
|
||||
export const getCallBrief = (id: CallId) => invoke<CallBrief>('get_call_brief', { id })
|
||||
export const transcribeCall = (id: CallId) => invoke<void>('transcribe_call', { id })
|
||||
export const discardCall = (id: CallId) => invoke<void>('discard_call', { id })
|
||||
|
||||
export const onRecordingState = (handler: (state: RecordingState) => void): Promise<UnlistenFn> =>
|
||||
listen<RecordingState>('recording-state', (event) => handler(event.payload))
|
||||
export const onCallEnded = (handler: (id: CallId) => void): Promise<UnlistenFn> =>
|
||||
listen<{ id: CallId }>('call-ended', (event) => handler(event.payload.id))
|
||||
export const onLevels = (handler: (levels: Levels) => void): Promise<UnlistenFn> =>
|
||||
listen<Levels>('levels', (event) => handler(event.payload))
|
||||
|
||||
|
||||
Reference in New Issue
Block a user