MCPcopy Index your code
hub / github.com/FlowiseAI/Flowise / setTTSAction

Function setTTSAction

packages/ui/src/views/chatmessage/ChatMessage.jsx:593–606  ·  view source on GitHub ↗
(isActive)

Source from the content-addressed store, hash-verified

591
592 // Helper function to manage TTS action flag
593 const setTTSAction = (isActive) => {
594 isTTSActionRef.current = isActive
595 if (ttsTimeoutRef.current) {
596 clearTimeout(ttsTimeoutRef.current)
597 ttsTimeoutRef.current = null
598 }
599 if (isActive) {
600 // Reset the flag after a longer delay to ensure all state changes are complete
601 ttsTimeoutRef.current = setTimeout(() => {
602 isTTSActionRef.current = false
603 ttsTimeoutRef.current = null
604 }, 300)
605 }
606 }
607
608 const onChange = useCallback((e) => setUserInput(e.target.value), [setUserInput])
609

Callers 3

handleTTSStopFunction · 0.85
handleTTSClickFunction · 0.85
handleTTSStartFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected