File tree Expand file tree Collapse file tree
packages/gen-ai/frontend/src/app/Chatbot/hooks Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -130,6 +130,13 @@ const useChatbotMessages = ({
130130 const handleStopStreaming = React . useCallback ( ( ) => {
131131 if ( abortControllerRef . current ) {
132132 isStoppingStreamRef . current = true ;
133+
134+ // Track stop button click
135+ fireMiscTrackingEvent ( 'Playground Query Stopped' , {
136+ isStreaming : isStreamingEnabled ,
137+ isRag : isRawUploaded ,
138+ } ) ;
139+
133140 // Clear any pending streaming updates to prevent them from overwriting the stop message
134141 if ( timeoutRef . current ) {
135142 clearTimeout ( timeoutRef . current ) ;
@@ -138,7 +145,7 @@ const useChatbotMessages = ({
138145 abortControllerRef . current . abort ( ) ;
139146 abortControllerRef . current = null ;
140147 }
141- } , [ ] ) ;
148+ } , [ isStreamingEnabled , isRawUploaded ] ) ;
142149
143150 const clearConversation = React . useCallback ( ( ) => {
144151 // Mark that we're clearing (not just stopping)
You can’t perform that action at this time.
0 commit comments