From b5ae6d7a96fabeec28f8e6960541d3c90fe623c9 Mon Sep 17 00:00:00 2001 From: Hidetaka Tsuji Date: Tue, 24 Jun 2025 13:54:51 +0200 Subject: [PATCH] Fix: IME composition preventing message sending in chat --- .../void/browser/react/src/sidebar-tsx/SidebarChat.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/vs/workbench/contrib/void/browser/react/src/sidebar-tsx/SidebarChat.tsx b/src/vs/workbench/contrib/void/browser/react/src/sidebar-tsx/SidebarChat.tsx index ea24ef38..1d47a369 100644 --- a/src/vs/workbench/contrib/void/browser/react/src/sidebar-tsx/SidebarChat.tsx +++ b/src/vs/workbench/contrib/void/browser/react/src/sidebar-tsx/SidebarChat.tsx @@ -1121,7 +1121,7 @@ const UserMessageComponent = ({ chatMessage, messageIdx, isCheckpointGhost, curr if (e.key === 'Escape') { onCloseEdit() } - if (e.key === 'Enter' && !e.shiftKey) { + if (e.key === 'Enter' && !e.shiftKey && !(e.nativeEvent as any).isComposing) { onSubmit() } } @@ -3048,7 +3048,7 @@ export const SidebarChat = () => { setInstructionsAreEmpty(!newStr) }, [setInstructionsAreEmpty]) const onKeyDown = useCallback((e: KeyboardEvent) => { - if (e.key === 'Enter' && !e.shiftKey) { + if (e.key === 'Enter' && !e.shiftKey && !(e.nativeEvent as any).isComposing) { onSubmit() } else if (e.key === 'Escape' && isRunning) { onAbort()