feat #14740: main window with call list and transcript
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -54,6 +54,40 @@ export interface PendingPrompt extends CallBrief {
|
||||
more_waiting: number
|
||||
}
|
||||
|
||||
export type CallStatus = 'recording' | 'awaiting_decision' | 'processing' | 'done' | 'failed'
|
||||
|
||||
/** A row of the main window's call list. Times are RFC 3339. */
|
||||
export interface CallListItem {
|
||||
id: CallId
|
||||
app: string
|
||||
started_at: string
|
||||
/** 0 while recording. */
|
||||
duration_secs: number
|
||||
status: CallStatus
|
||||
interrupted: boolean
|
||||
}
|
||||
|
||||
/** A transcript line; `speaker_key` is "me" or "remote:<n>". */
|
||||
export interface SegmentView {
|
||||
speaker_key: string
|
||||
label: string
|
||||
start: number
|
||||
end: number
|
||||
text: string
|
||||
}
|
||||
|
||||
export interface CallDetail {
|
||||
call: CallListItem & { error: string | null; account_id: string | null }
|
||||
segments: SegmentView[]
|
||||
/** Renamed speakers by key. */
|
||||
speaker_names: Record<string, string>
|
||||
}
|
||||
|
||||
export interface Account {
|
||||
id: string
|
||||
name: string
|
||||
}
|
||||
|
||||
export interface Levels {
|
||||
mic: number
|
||||
out: number
|
||||
@@ -76,6 +110,14 @@ export const getCallBrief = (id: CallId) => invoke<CallBrief>('get_call_brief',
|
||||
export const transcribeCall = (id: CallId) => invoke<void>('transcribe_call', { id })
|
||||
export const retryCall = (id: CallId) => invoke<void>('retry_call', { id })
|
||||
export const discardCall = (id: CallId) => invoke<void>('discard_call', { id })
|
||||
export const listCalls = () => invoke<CallListItem[]>('list_calls')
|
||||
export const getCall = (id: CallId) => invoke<CallDetail>('get_call', { id })
|
||||
/** An empty name restores the default label. */
|
||||
export const renameSpeaker = (id: CallId, speakerKey: string, name: string) =>
|
||||
invoke<void>('rename_speaker', { id, speakerKey, name })
|
||||
export const listAccounts = () => invoke<Account[]>('list_accounts')
|
||||
export const setAccount = (id: CallId, accountId: string | null) =>
|
||||
invoke<void>('set_account', { id, accountId })
|
||||
|
||||
export const onRecordingState = (handler: (state: RecordingState) => void): Promise<UnlistenFn> =>
|
||||
listen<RecordingState>('recording-state', (event) => handler(event.payload))
|
||||
|
||||
Reference in New Issue
Block a user