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:
@@ -8,6 +8,8 @@
|
||||
use std::thread;
|
||||
use std::time::Duration;
|
||||
|
||||
use recorder_core::accounts::{self, Account};
|
||||
use recorder_core::call_view::{CallDetail, CallListItem};
|
||||
use recorder_core::capture::Devices;
|
||||
use recorder_core::model::CallId;
|
||||
use recorder_core::secrets::Service;
|
||||
@@ -118,6 +120,47 @@ pub fn get_call_brief(state: State<'_, AppState>, id: CallId) -> CmdResult<CallB
|
||||
state.call_brief(id)
|
||||
}
|
||||
|
||||
/// The main window's call list, newest first.
|
||||
#[tauri::command]
|
||||
pub fn list_calls(state: State<'_, AppState>) -> CmdResult<Vec<CallListItem>> {
|
||||
state.call_list()
|
||||
}
|
||||
|
||||
/// The selected call with its transcript.
|
||||
#[tauri::command]
|
||||
pub fn get_call(state: State<'_, AppState>, id: CallId) -> CmdResult<CallDetail> {
|
||||
state.call_detail(id)
|
||||
}
|
||||
|
||||
/// Renames a speaker of a call (an empty name restores the default label).
|
||||
#[tauri::command]
|
||||
pub fn rename_speaker(
|
||||
app: AppHandle,
|
||||
state: State<'_, AppState>,
|
||||
id: CallId,
|
||||
speaker_key: String,
|
||||
name: String,
|
||||
) -> CmdResult<()> {
|
||||
state.rename_speaker(id, &speaker_key, &name)?;
|
||||
processing::emit_updated(&app, id);
|
||||
Ok(())
|
||||
}
|
||||
|
||||
#[tauri::command]
|
||||
pub fn list_accounts() -> Vec<Account> {
|
||||
accounts::list()
|
||||
}
|
||||
|
||||
/// Assigns a call to a customer account, or to none.
|
||||
#[tauri::command]
|
||||
pub fn set_account(
|
||||
state: State<'_, AppState>,
|
||||
id: CallId,
|
||||
account_id: Option<String>,
|
||||
) -> CmdResult<()> {
|
||||
state.set_account(id, account_id.as_deref())
|
||||
}
|
||||
|
||||
/// Deletes a finished call's audio and row. Closes the prompt if no call
|
||||
/// waits for it any more; otherwise the prompt reloads and shows the next.
|
||||
/// While its DeepScript jobs are still on record, nothing is deleted and a
|
||||
|
||||
Reference in New Issue
Block a user