From 0e888d62af1434fef231e11a5c307a5b48a8deb1 Mon Sep 17 00:00:00 2001
From: Matthias Nott <mnott@mnsoft.org>
Date: Sat, 07 Mar 2026 10:49:07 +0100
Subject: [PATCH] feat: singleton audio, transcript reflection, voice persistence

---
 contexts/ConnectionContext.tsx |    5 +++--
 1 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/contexts/ConnectionContext.tsx b/contexts/ConnectionContext.tsx
index e01d867..6734d9c 100644
--- a/contexts/ConnectionContext.tsx
+++ b/contexts/ConnectionContext.tsx
@@ -24,7 +24,7 @@
   connect: (config?: ServerConfig) => void;
   disconnect: () => void;
   sendTextMessage: (text: string) => boolean;
-  sendVoiceMessage: (audioBase64: string, transcript?: string) => boolean;
+  sendVoiceMessage: (audioBase64: string, transcript?: string, messageId?: string) => boolean;
   sendImageMessage: (imageBase64: string, caption: string, mimeType: string) => boolean;
   sendCommand: (command: string, args?: Record<string, unknown>) => boolean;
   saveServerConfig: (config: ServerConfig) => Promise<void>;
@@ -120,11 +120,12 @@
   }, []);
 
   const sendVoiceMessage = useCallback(
-    (audioBase64: string, transcript: string = ""): boolean => {
+    (audioBase64: string, transcript: string = "", messageId?: string): boolean => {
       return wsClient.send({
         type: "voice",
         content: transcript,
         audioBase64,
+        messageId,
       });
     },
     []

--
Gitblit v1.3.1