We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 2fa5975 commit 911ea9aCopy full SHA for 911ea9a
package/src/components/MessageInput/MessageInput.tsx
@@ -733,10 +733,7 @@ const MessageInputWithContext = <
733
const { channel } = useChannelContext<StreamChatGenerics>();
734
const { aiState } = useAIState(channel);
735
736
- const stopGenerating = useCallback(
737
- () => channel.sendEvent({ type: 'ai_indicator.stop' }),
738
- [channel],
739
- );
+ const stopGenerating = useCallback(() => channel?.stopAIResponse(), [channel]);
740
const shouldDisplayStopAIGeneration = [AIStates.Thinking, AIStates.Generating].includes(aiState);
741
742
return (
0 commit comments