mirror of
https://github.com/OpenHands/OpenHands.git
synced 2025-12-26 05:48:36 +08:00
fix: set the input to be empty after pressing enter instead of showing a newline (#506)
This commit is contained in:
parent
dac89a9720
commit
6d43b0ae88
@ -122,7 +122,9 @@ function ChatInterface({ setSettingOpen }: Props): JSX.Element {
|
||||
maxRows={10}
|
||||
minRows={1}
|
||||
variant="bordered"
|
||||
onChange={(e) => setInputMessage(e.target.value)}
|
||||
onChange={(e) =>
|
||||
e.target.value !== "\n" && setInputMessage(e.target.value)
|
||||
}
|
||||
placeholder="Send a message (won't interrupt the Assistant)"
|
||||
onKeyDown={(e) => {
|
||||
if (e.key === "Enter" && !e.shiftKey) {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user