feat #14740: merge speakers and name calls

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
This commit is contained in:
hauke
2026-11-06 11:17:40 +01:00
co-authored by Claude Opus 5.5
parent 5dfe1d9357
commit 345dd01147
12 changed files with 1213 additions and 29 deletions
+19
View File
@@ -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 })