fix: handle chat completion state with enter button (#1114)
This commit is contained in:
parent
c68d0371a0
commit
a485fa9c1f
@ -86,7 +86,9 @@ const ChatScreen = () => {
|
|||||||
if (e.key === 'Enter') {
|
if (e.key === 'Enter') {
|
||||||
if (!e.shiftKey) {
|
if (!e.shiftKey) {
|
||||||
e.preventDefault()
|
e.preventDefault()
|
||||||
sendChatMessage()
|
if (messages[messages.length - 1]?.status !== MessageStatus.Pending)
|
||||||
|
sendChatMessage()
|
||||||
|
else onStopInferenceClick()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user