From 1e954243cfb858c12972dcf374895471483bc81a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9C=B1=E6=A1=82=E5=BF=97?= <3300529038@qq.com> Date: Fri, 3 Jul 2026 09:09:30 +0800 Subject: [PATCH] fix: ignore Enter keydown during IME composition for CJK input --- src/ui/ChatWebviewProvider.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/ui/ChatWebviewProvider.ts b/src/ui/ChatWebviewProvider.ts index f9c58d27..33ab7137 100644 --- a/src/ui/ChatWebviewProvider.ts +++ b/src/ui/ChatWebviewProvider.ts @@ -1390,7 +1390,7 @@ export class ChatWebviewProvider implements vscode.WebviewViewProvider { selectSlashCommand(slashFilteredCommands[slashPopupSelectedIdx]); return; } - if (e.key === 'Enter' && !e.shiftKey) { + if (e.key === 'Enter' && !e.shiftKey && !e.isComposing) { e.preventDefault(); selectSlashCommand(slashFilteredCommands[slashPopupSelectedIdx]); return; @@ -1402,7 +1402,7 @@ export class ChatWebviewProvider implements vscode.WebviewViewProvider { } } - if (e.key === 'Enter' && !e.shiftKey) { + if (e.key === 'Enter' && !e.shiftKey && !e.isComposing) { e.preventDefault(); if (isProcessing) { handleCancel();