mirror of
https://github.com/nomic-ai/gpt4all
synced 2024-11-10 01:10:35 +00:00
chat: do not allow sending a message while the LLM is responding (#2323)
Signed-off-by: Jared Van Bortel <jared@nomic.ai>
This commit is contained in:
parent
d54e644d05
commit
f26e8d0d87
@ -1416,11 +1416,11 @@ Rectangle {
|
||||
Accessible.role: Accessible.EditableText
|
||||
Accessible.name: placeholderText
|
||||
Accessible.description: qsTr("Send messages/prompts to the model")
|
||||
Keys.onReturnPressed: (event)=> {
|
||||
if (event.modifiers & Qt.ControlModifier || event.modifiers & Qt.ShiftModifier)
|
||||
event.accepted = false;
|
||||
else {
|
||||
editingFinished();
|
||||
Keys.onReturnPressed: (event) => {
|
||||
if (event.modifiers & Qt.ControlModifier || event.modifiers & Qt.ShiftModifier) {
|
||||
event.accepted = false
|
||||
} else if (!currentChat.responseInProgress) {
|
||||
editingFinished()
|
||||
sendMessage()
|
||||
}
|
||||
}
|
||||
@ -1494,6 +1494,7 @@ Rectangle {
|
||||
width: 30
|
||||
height: 30
|
||||
visible: !currentChat.isServer
|
||||
enabled: !currentChat.responseInProgress
|
||||
source: "qrc:/gpt4all/icons/send_message.svg"
|
||||
Accessible.name: qsTr("Send message")
|
||||
Accessible.description: qsTr("Sends the message/prompt contained in textfield to the model")
|
||||
|
Loading…
Reference in New Issue
Block a user