fix(chatbot): prevent Enter from sending message during IME composition

This commit is contained in:
yiling
2026-07-11 10:55:01 +08:00
parent d19200e9ef
commit 4a7da10ca8
@@ -61,6 +61,8 @@ export function ChatbotSidebar({ projectId, contextAssetId }: ChatbotSidebarProp
}
const handleKeyDown = (e: React.KeyboardEvent<HTMLTextAreaElement>) => {
if (e.nativeEvent.isComposing) return
if (e.key === 'Enter' && !e.shiftKey) {
e.preventDefault()
handleSend()