Merge branch 'fork/beetle0915/fix/ime-enter-composition' into dev

This commit is contained in:
HouYunFei
2026-07-08 16:30:38 +08:00
4 changed files with 61 additions and 2 deletions
@@ -2,6 +2,7 @@ import { useEffect, useRef, useState, type ReactNode } from "react";
import { Button, Tooltip } from "antd";
import { ArrowUp, CheckCircle2, CircleAlert, ImagePlus, LoaderCircle, UserRound, Wrench, X, XCircle } from "lucide-react";
import { isPlainEnterKey } from "@/lib/keyboard-event";
import { canvasThemes } from "@/lib/canvas-theme";
import type { LocalUser } from "@/stores/use-user-store";
@@ -197,7 +198,7 @@ export function AgentChatComposer({
void onAddFiles(images);
}}
onKeyDown={(event) => {
if (event.key !== "Enter" || event.shiftKey || event.ctrlKey || event.metaKey) return;
if (!isPlainEnterKey(event)) return;
event.preventDefault();
void onSubmit();
}}