mirror of
https://github.com/nomic-ai/gpt4all.git
synced 2025-06-25 15:02:03 +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
@ -1417,10 +1417,10 @@ Rectangle {
|
|||||||
Accessible.name: placeholderText
|
Accessible.name: placeholderText
|
||||||
Accessible.description: qsTr("Send messages/prompts to the model")
|
Accessible.description: qsTr("Send messages/prompts to the model")
|
||||||
Keys.onReturnPressed: (event) => {
|
Keys.onReturnPressed: (event) => {
|
||||||
if (event.modifiers & Qt.ControlModifier || event.modifiers & Qt.ShiftModifier)
|
if (event.modifiers & Qt.ControlModifier || event.modifiers & Qt.ShiftModifier) {
|
||||||
event.accepted = false;
|
event.accepted = false
|
||||||
else {
|
} else if (!currentChat.responseInProgress) {
|
||||||
editingFinished();
|
editingFinished()
|
||||||
sendMessage()
|
sendMessage()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -1494,6 +1494,7 @@ Rectangle {
|
|||||||
width: 30
|
width: 30
|
||||||
height: 30
|
height: 30
|
||||||
visible: !currentChat.isServer
|
visible: !currentChat.isServer
|
||||||
|
enabled: !currentChat.responseInProgress
|
||||||
source: "qrc:/gpt4all/icons/send_message.svg"
|
source: "qrc:/gpt4all/icons/send_message.svg"
|
||||||
Accessible.name: qsTr("Send message")
|
Accessible.name: qsTr("Send message")
|
||||||
Accessible.description: qsTr("Sends the message/prompt contained in textfield to the model")
|
Accessible.description: qsTr("Sends the message/prompt contained in textfield to the model")
|
||||||
|
Loading…
Reference in New Issue
Block a user