fix: 快捷助手发起询问后没有清理掉输入框内的内容 (#4907)

This commit is contained in:
W 2025-04-16 10:42:34 +08:00 committed by GitHub
parent 444abc9b88
commit c10e5a9ca4
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -98,7 +98,6 @@ const HomeWindow: FC = () => {
setRoute('chat')
onSendMessage().then()
focusInput()
setTimeout(() => setText(''), 100)
}
}
}
@ -161,6 +160,7 @@ const HomeWindow: FC = () => {
}
EventEmitter.emit(EVENT_NAMES.SEND_MESSAGE, message)
setIsFirstMessage(false)
setText('') // ✅ 清除输入框内容
}, 0)
},
[content, defaultAssistant.id, defaultAssistant.topics]