Merge branch 'dev' into rp/jan-docs-v2-blog

This commit is contained in:
Ramon Perez 2025-08-11 14:57:21 +10:00
commit e3bc6c0818

View File

@ -371,7 +371,9 @@ const ChatInput = ({ model, className, initialMessage }: ChatInputProps) => {
setRows(Math.min(newRows, maxRows)) setRows(Math.min(newRows, maxRows))
}} }}
onKeyDown={(e) => { onKeyDown={(e) => {
if (e.key === 'Enter' && !e.shiftKey && prompt.trim()) { // e.keyCode 229 is for IME input with Safari
const isComposing = e.nativeEvent.isComposing || e.keyCode === 229;
if (e.key === 'Enter' && !e.shiftKey && prompt.trim() && !isComposing) {
e.preventDefault() e.preventDefault()
// Submit the message when Enter is pressed without Shift // Submit the message when Enter is pressed without Shift
handleSendMesage(prompt) handleSendMesage(prompt)