summaryrefslogtreecommitdiff
path: root/makima/src
diff options
context:
space:
mode:
Diffstat (limited to 'makima/src')
-rw-r--r--makima/src/server/handlers/listen.rs10
-rw-r--r--makima/src/server/messages.rs7
2 files changed, 17 insertions, 0 deletions
diff --git a/makima/src/server/handlers/listen.rs b/makima/src/server/handlers/listen.rs
index 524c48a..e1bc30e 100644
--- a/makima/src/server/handlers/listen.rs
+++ b/makima/src/server/handlers/listen.rs
@@ -553,6 +553,16 @@ async fn handle_socket(socket: WebSocket, state: SharedState) {
deduplicated_count = final_entries.len(),
"Saved final transcript to file"
);
+
+ // Send TranscriptSaved message to client
+ if let Some(contract_id) = target_contract_id {
+ let _ = response_tx
+ .send(ServerMessage::TranscriptSaved {
+ file_id: fid.to_string(),
+ contract_id: contract_id.to_string(),
+ })
+ .await;
+ }
}
Err(e) => {
tracing::error!(
diff --git a/makima/src/server/messages.rs b/makima/src/server/messages.rs
index 401afb0..9c50334 100644
--- a/makima/src/server/messages.rs
+++ b/makima/src/server/messages.rs
@@ -73,6 +73,13 @@ pub enum ServerMessage {
Ready { session_id: String },
/// Transcription result
Transcript(TranscriptMessage),
+ /// Transcript has been saved to a file
+ TranscriptSaved {
+ /// The ID of the file where the transcript was saved
+ file_id: String,
+ /// The ID of the contract the file belongs to
+ contract_id: String,
+ },
/// Error occurred during processing
Error { code: String, message: String },
/// Session has been stopped