diff --git a/desktop/src/components/chat/ChatInput.tsx b/desktop/src/components/chat/ChatInput.tsx index 903cf802..9da3a06f 100644 --- a/desktop/src/components/chat/ChatInput.tsx +++ b/desktop/src/components/chat/ChatInput.tsx @@ -220,6 +220,9 @@ export function ChatInput() { } const handleKeyDown = (event: React.KeyboardEvent) => { + // Ignore key events during IME composition (e.g. Chinese input method) + if (event.nativeEvent.isComposing) return + // Route file search navigation keys to FileSearchMenu if (fileSearchOpen) { const key = event.key diff --git a/desktop/src/pages/EmptySession.tsx b/desktop/src/pages/EmptySession.tsx index a20e6d9c..3c49d504 100644 --- a/desktop/src/pages/EmptySession.tsx +++ b/desktop/src/pages/EmptySession.tsx @@ -181,6 +181,9 @@ export function EmptySession() { } const handleKeyDown = (event: React.KeyboardEvent) => { + // Ignore key events during IME composition (e.g. Chinese input method) + if (event.nativeEvent.isComposing) return + // Route file search navigation keys to FileSearchMenu if (fileSearchOpen) { const key = event.key @@ -347,7 +350,7 @@ export function EmptySession() {