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

Function handleAbort

packages/ui/src/views/chatmessage/ChatMessage.jsx:511–536  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

509 }
510
511 const handleAbort = async () => {
512 setIsMessageStopping(true)
513 try {
514 // Stop all TTS streams first
515 await handleTTSAbortAll()
516 stopAllTTS()
517
518 await chatmessageApi.abortMessage(chatflowid, chatId)
519 setIsMessageStopping(false)
520 } catch (error) {
521 setIsMessageStopping(false)
522 enqueueSnackbar({
523 message: typeof error.response.data === 'object' ? error.response.data.message : error.response.data,
524 options: {
525 key: new Date().getTime() + Math.random(),
526 variant: 'error',
527 persist: true,
528 action: (key) => (
529 <Button style={{ color: 'white' }} onClick={() => closeSnackbar(key)}>
530 <IconX />
531 </Button>
532 )
533 }
534 })
535 }
536 }
537
538 const handleDeletePreview = (itemToDelete) => {
539 if (itemToDelete.type === 'file') {

Callers 1

ChatMessageFunction · 0.85

Calls 5

enqueueSnackbarFunction · 0.90
closeSnackbarFunction · 0.90
handleTTSAbortAllFunction · 0.85
stopAllTTSFunction · 0.85
getTimeMethod · 0.45

Tested by

no test coverage detected