Merge pull request #797 from voideditor/revert-784-fix-ime-composition-chat

Revert "Fix: IME composition preventing message sending in chat"
This commit is contained in:
Andrew Pareles
2025-06-29 16:34:44 -07:00
committed by GitHub
@@ -1129,7 +1129,7 @@ const UserMessageComponent = ({ chatMessage, messageIdx, isCheckpointGhost, curr
if (e.key === 'Escape') { if (e.key === 'Escape') {
onCloseEdit() onCloseEdit()
} }
if (e.key === 'Enter' && !e.shiftKey && !(e.nativeEvent as any).isComposing) { if (e.key === 'Enter' && !e.shiftKey && !e.nativeEvent.isComposing) {
onSubmit() onSubmit()
} }
} }
@@ -3056,7 +3056,7 @@ export const SidebarChat = () => {
setInstructionsAreEmpty(!newStr) setInstructionsAreEmpty(!newStr)
}, [setInstructionsAreEmpty]) }, [setInstructionsAreEmpty])
const onKeyDown = useCallback((e: KeyboardEvent<HTMLTextAreaElement>) => { const onKeyDown = useCallback((e: KeyboardEvent<HTMLTextAreaElement>) => {
if (e.key === 'Enter' && !e.shiftKey && !(e.nativeEvent as any).isComposing) { if (e.key === 'Enter' && !e.shiftKey && !e.nativeEvent.isComposing) {
onSubmit() onSubmit()
} else if (e.key === 'Escape' && isRunning) { } else if (e.key === 'Escape' && isRunning) {
onAbort() onAbort()