File tree Expand file tree Collapse file tree 2 files changed +4
-6
lines changed
AITypingIndicatorView/hooks Expand file tree Collapse file tree 2 files changed +4
-6
lines changed Original file line number Diff line number Diff line change @@ -33,19 +33,18 @@ export const useAIState = <
3333 }
3434
3535 const indicatorChangedListener = channel . on (
36- // @ts -ignore
37- 'ai_indicator_changed' ,
36+ 'ai_indicator.update' ,
3837 ( event : Event < StreamChatGenerics > ) => {
3938 const { cid } = event ;
40- const state = event . state as AIStateType ;
39+ const state = event . ai_state as AIStateType ;
4140 if ( channel . cid === cid ) {
4241 setAiState ( state ) ;
4342 }
4443 } ,
4544 ) ;
4645
4746 // @ts -ignore
48- const indicatorClearedListener = channel . on ( 'ai_indicator_clear ' , ( event ) => {
47+ const indicatorClearedListener = channel . on ( 'ai_indicator.clear ' , ( event ) => {
4948 const { cid } = event ;
5049 if ( channel . cid === cid ) {
5150 setAiState ( AIStates . Idle ) ;
Original file line number Diff line number Diff line change @@ -81,8 +81,7 @@ export const MessageInputFlat = <
8181
8282 const { aiState } = useAIState ( channel ) ;
8383
84- // @ts -ignore
85- const stopGenerating = useCallback ( ( ) => channel ?. sendEvent ( { type : 'stop_generating' } ) , [
84+ const stopGenerating = useCallback ( ( ) => channel ?. sendEvent ( { type : 'ai_indicator.stop' } ) , [
8685 channel ,
8786 ] ) ;
8887
You can’t perform that action at this time.
0 commit comments