mirror of
https://github.com/nomic-ai/gpt4all
synced 2024-11-02 09:40:42 +00:00
Fix the send message only when enter has been pressed or the send icon has been clicked.
This commit is contained in:
parent
cf8a4dd868
commit
b8b254cd9c
8
main.qml
8
main.qml
@ -875,10 +875,12 @@ Window {
|
||||
Keys.onReturnPressed: (event)=> {
|
||||
if (event.modifiers & Qt.ControlModifier || event.modifiers & Qt.ShiftModifier)
|
||||
event.accepted = false;
|
||||
else
|
||||
else {
|
||||
editingFinished();
|
||||
sendMessage()
|
||||
}
|
||||
onEditingFinished: {
|
||||
}
|
||||
function sendMessage() {
|
||||
if (textInput.text === "")
|
||||
return
|
||||
|
||||
@ -926,7 +928,7 @@ Window {
|
||||
Accessible.description: qsTr("Sends the message/prompt contained in textfield to the model")
|
||||
|
||||
onClicked: {
|
||||
textInput.accepted()
|
||||
textInput.sendMessage()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user