fix: enter input fixed

This commit is contained in:
qixinbo
2026-03-19 14:57:42 +08:00
parent cca492cfdb
commit 803f742a64
3 changed files with 12 additions and 2 deletions
+6 -1
View File
@@ -122,7 +122,12 @@ export function ChatInterface() {
setSlashQuery(null);
};
const handleInputKeyDown = (e: React.KeyboardEvent) => {
const handleInputKeyDown = (e: React.KeyboardEvent<HTMLInputElement>) => {
// Avoid triggering Enter when using IME (Input Method Editor) for CJK characters
if (e.nativeEvent.isComposing) {
return;
}
if (slashQuery !== null && filteredSlashSkills.length > 0) {
if (e.key === 'ArrowUp') {
e.preventDefault();