feat #14740: merge speakers and name calls
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -65,6 +65,8 @@ export interface CallListItem {
|
||||
duration_secs: number
|
||||
status: CallStatus
|
||||
interrupted: boolean
|
||||
/** The name the user gave the call, if any. */
|
||||
title: string | null
|
||||
}
|
||||
|
||||
/** A transcript line; `speaker_key` is "me" or "remote:<n>". */
|
||||
@@ -76,11 +78,21 @@ export interface SegmentView {
|
||||
text: string
|
||||
}
|
||||
|
||||
/** A merged speaker: its lines now belong to `into_key`. */
|
||||
export interface SpeakerMerge {
|
||||
from_key: string
|
||||
from_label: string
|
||||
into_key: string
|
||||
into_label: string
|
||||
}
|
||||
|
||||
export interface CallDetail {
|
||||
call: CallListItem & { error: string | null; account_id: string | null }
|
||||
/** The transcript with speaker merges applied. */
|
||||
segments: SegmentView[]
|
||||
/** Renamed speakers by key. */
|
||||
speaker_names: Record<string, string>
|
||||
merges: SpeakerMerge[]
|
||||
}
|
||||
|
||||
export interface Account {
|
||||
@@ -115,6 +127,13 @@ 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 mergeSpeakers = (id: CallId, fromKey: string, intoKey: string) =>
|
||||
invoke<void>('merge_speakers', { id, fromKey, intoKey })
|
||||
export const unmergeSpeaker = (id: CallId, fromKey: string) =>
|
||||
invoke<void>('unmerge_speaker', { id, fromKey })
|
||||
/** `null` or an empty title restores the default heading. */
|
||||
export const renameCall = (id: CallId, title: string | null) =>
|
||||
invoke<void>('rename_call', { id, title })
|
||||
export const listAccounts = () => invoke<Account[]>('list_accounts')
|
||||
export const setAccount = (id: CallId, accountId: string | null) =>
|
||||
invoke<void>('set_account', { id, accountId })
|
||||
|
||||
Reference in New Issue
Block a user