Change location of reset context button.

This commit is contained in:
Adam Treat 2023-04-10 17:31:40 -04:00
parent b1b7744241
commit be65e91c7d

View File

@ -45,6 +45,41 @@ Window {
anchors.bottom: parent.bottom anchors.bottom: parent.bottom
anchors.top: parent.top anchors.top: parent.top
Button {
id: resetContextButton
anchors.right: parent.right
anchors.top: parent.top
anchors.topMargin: 30
anchors.rightMargin: 30
width: 60
height: 60
z: 200
padding: 15
background: Item {
anchors.fill: parent
Rectangle {
anchors.fill: parent
color: "#343541"
border.color: "#7d7d8e"
border.width: 1
opacity: 0.5
radius: 10
}
Image {
anchors.fill: parent
anchors.margins: 15
source: "qrc:/gpt4all-chat/icons/regenerate.svg"
}
}
onClicked: {
LLM.stopGenerating()
LLM.resetContext()
chatModel.clear()
}
}
ScrollView { ScrollView {
id: scrollView id: scrollView
anchors.left: parent.left anchors.left: parent.left
@ -187,7 +222,7 @@ Window {
TextField { TextField {
id: textInput id: textInput
anchors.left: parent.left anchors.left: parent.left
anchors.right: resetContextButton.left anchors.right: parent.right
anchors.bottom: parent.bottom anchors.bottom: parent.bottom
anchors.margins: 30 anchors.margins: 30
color: "#dadadc" color: "#dadadc"
@ -239,25 +274,5 @@ Window {
} }
} }
} }
Button {
id: resetContextButton
anchors.right: parent.right
anchors.rightMargin: 30
anchors.verticalCenter: textInput.verticalCenter
width: 40
height: 40
background: Image {
anchors.fill: parent
source: "qrc:/gpt4all-chat/icons/regenerate.svg"
}
onClicked: {
LLM.stopGenerating()
LLM.resetContext()
chatModel.clear()
}
}
} }
} }