Send metadata event when aborting autoplay TTS
This commit is contained in:
parent
d2a177db59
commit
50b5bb911a
|
|
@ -187,7 +187,10 @@ const abortTextToSpeech = async (req: Request, res: Response) => {
|
|||
|
||||
// Also abort the main chat flow AbortController for auto-TTS
|
||||
const chatFlowAbortId = `${chatflowId}_${chatId}`
|
||||
appServer.abortControllerPool.abort(chatFlowAbortId)
|
||||
if (appServer.abortControllerPool.get(chatFlowAbortId)) {
|
||||
appServer.abortControllerPool.abort(chatFlowAbortId)
|
||||
appServer.sseStreamer.streamMetadataEvent(chatId, { chatId, chatMessageId })
|
||||
}
|
||||
|
||||
// Send abort event to client
|
||||
appServer.sseStreamer.streamTTSAbortEvent(chatId, chatMessageId)
|
||||
|
|
|
|||
Loading…
Reference in New Issue