Update BaseChat.tsx

This commit is contained in:
Anirban Kar 2024-12-14 14:15:27 +05:30 committed by GitHub
parent b0ca49d65e
commit 3db4004642
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -425,15 +425,16 @@ export const BaseChat = React.forwardRef<HTMLDivElement, BaseChatProps>(
} }
event.preventDefault(); event.preventDefault();
if (isStreaming) { if (isStreaming) {
handleStop?.(); handleStop?.();
return; return;
} }
// ignore if using input method engine
if (!event.nativeEvent.isComposing) { if (event.nativeEvent.isComposing) {
handleSendMessage?.(event); return
} }
handleSendMessage?.(event);
} }
}} }}
value={input} value={input}