mirror of
https://github.com/OpenHands/OpenHands.git
synced 2025-12-26 05:48:36 +08:00
This commit is contained in:
parent
ebb68b33db
commit
92c166551f
@ -83,11 +83,11 @@ export function ChatInput({
|
||||
};
|
||||
|
||||
const handleSubmitMessage = () => {
|
||||
if (value || (textareaRef.current?.value && !value)) {
|
||||
onSubmit(value || textareaRef.current?.value || "");
|
||||
if (value) {
|
||||
onChange?.("");
|
||||
} else if (textareaRef.current) {
|
||||
const message = value || textareaRef.current?.value || "";
|
||||
if (message) {
|
||||
onSubmit(message);
|
||||
onChange?.("");
|
||||
if (textareaRef.current) {
|
||||
textareaRef.current.value = "";
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user