diff --git a/ui/src/api/chat.ts b/ui/src/api/chat.ts index 233742ac..6d5d5a94 100644 --- a/ui/src/api/chat.ts +++ b/ui/src/api/chat.ts @@ -62,7 +62,7 @@ export const chatApi = { async postMessageAndStream( conversationId: string, - data: { content: string; agentId?: string }, + data: { content: string; agentId?: string; voiceMode?: string }, callbacks: { onToken: (token: string) => void; onDone: (messageId: string, content: string) => void; diff --git a/ui/src/hooks/useStreamingChat.ts b/ui/src/hooks/useStreamingChat.ts index 85b24228..f76cfdb0 100644 --- a/ui/src/hooks/useStreamingChat.ts +++ b/ui/src/hooks/useStreamingChat.ts @@ -10,7 +10,7 @@ export function useStreamingChat(conversationId: string | null) { const [, startTransition] = useTransition(); const startStream = useCallback( - (userMessage: string, agentId?: string) => { + (userMessage: string, agentId?: string, voiceMode?: string) => { if (!conversationId) return; setIsStreaming(true); @@ -21,7 +21,7 @@ export function useStreamingChat(conversationId: string | null) { chatApi.postMessageAndStream( conversationId, - { content: userMessage, agentId }, + { content: userMessage, agentId, voiceMode }, { onToken: (token: string) => { startTransition(() => {