Revert "Fix: IME composition preventing message sending in chat"

This commit is contained in:
Andrew Pareles 2025-06-29 16:33:29 -07:00 committed by GitHub
parent 3fa95be625
commit 9031215001
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -1129,7 +1129,7 @@ const UserMessageComponent = ({ chatMessage, messageIdx, isCheckpointGhost, curr
if (e.key === 'Escape') {
onCloseEdit()
}
if (e.key === 'Enter' && !e.shiftKey && !(e.nativeEvent as any).isComposing) {
if (e.key === 'Enter' && !e.shiftKey) {
onSubmit()
}
}
@ -3056,7 +3056,7 @@ export const SidebarChat = () => {
setInstructionsAreEmpty(!newStr)
}, [setInstructionsAreEmpty])
const onKeyDown = useCallback((e: KeyboardEvent<HTMLTextAreaElement>) => {
if (e.key === 'Enter' && !e.shiftKey && !(e.nativeEvent as any).isComposing) {
if (e.key === 'Enter' && !e.shiftKey) {
onSubmit()
} else if (e.key === 'Escape' && isRunning) {
onAbort()