2023-04-14 14:44:28 -04:00
|
|
|
import QtCore
|
|
|
|
import QtQuick
|
|
|
|
import QtQuick.Controls
|
2023-04-23 23:56:33 -04:00
|
|
|
import QtQuick.Controls.Basic
|
2023-04-14 14:44:28 -04:00
|
|
|
import QtQuick.Layouts
|
|
|
|
import download
|
|
|
|
import network
|
|
|
|
import llm
|
|
|
|
|
2023-07-06 10:53:43 -04:00
|
|
|
MyDialog {
|
2023-04-14 14:44:28 -04:00
|
|
|
id: thumbsDownDialog
|
|
|
|
modal: true
|
|
|
|
padding: 20
|
2023-04-23 09:42:35 -04:00
|
|
|
|
|
|
|
Theme {
|
|
|
|
id: theme
|
|
|
|
}
|
|
|
|
|
2023-04-14 14:44:28 -04:00
|
|
|
property alias response: thumbsDownNewResponse.text
|
2023-04-27 16:27:53 -04:00
|
|
|
|
2023-04-14 14:44:28 -04:00
|
|
|
Column {
|
|
|
|
anchors.fill: parent
|
|
|
|
spacing: 20
|
|
|
|
Item {
|
|
|
|
width: childrenRect.width
|
|
|
|
height: childrenRect.height
|
|
|
|
Image {
|
|
|
|
id: img
|
|
|
|
anchors.top: parent.top
|
|
|
|
anchors.left: parent.left
|
|
|
|
width: 60
|
|
|
|
height: 60
|
2023-04-23 09:42:35 -04:00
|
|
|
source: "qrc:/gpt4all/icons/thumbs_down.svg"
|
2023-04-14 14:44:28 -04:00
|
|
|
}
|
|
|
|
Text {
|
|
|
|
anchors.left: img.right
|
|
|
|
anchors.leftMargin: 30
|
|
|
|
anchors.verticalCenter: img.verticalCenter
|
2023-04-24 13:39:45 -04:00
|
|
|
text: qsTr("Please edit the text below to provide a better response. (optional)")
|
2023-04-23 09:42:35 -04:00
|
|
|
color: theme.textColor
|
2023-08-07 13:54:13 -04:00
|
|
|
font.pixelSize: theme.fontSizeLarge
|
2023-04-14 14:44:28 -04:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
ScrollView {
|
|
|
|
clip: true
|
|
|
|
height: 300
|
|
|
|
width: parent.width
|
|
|
|
ScrollBar.vertical.policy: ScrollBar.AlwaysOn
|
|
|
|
ScrollBar.horizontal.policy: ScrollBar.AlwaysOff
|
|
|
|
|
2024-01-22 14:41:47 -05:00
|
|
|
MyTextArea {
|
2023-04-14 14:44:28 -04:00
|
|
|
id: thumbsDownNewResponse
|
|
|
|
placeholderText: qsTr("Please provide a better response...")
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
footer: DialogButtonBox {
|
|
|
|
padding: 20
|
|
|
|
alignment: Qt.AlignRight
|
|
|
|
spacing: 10
|
2024-01-22 14:41:47 -05:00
|
|
|
MySettingsButton {
|
2023-05-23 09:53:32 -04:00
|
|
|
text: qsTr("Submit")
|
|
|
|
Accessible.description: qsTr("Submits the user's response")
|
2023-04-14 14:44:28 -04:00
|
|
|
DialogButtonBox.buttonRole: DialogButtonBox.AcceptRole
|
|
|
|
}
|
2024-01-22 14:41:47 -05:00
|
|
|
MySettingsButton {
|
2023-05-23 09:53:32 -04:00
|
|
|
text: qsTr("Cancel")
|
|
|
|
Accessible.description: qsTr("Closes the response dialog")
|
2023-04-14 14:44:28 -04:00
|
|
|
DialogButtonBox.buttonRole: DialogButtonBox.RejectRole
|
|
|
|
}
|
|
|
|
background: Rectangle {
|
|
|
|
color: "transparent"
|
|
|
|
}
|
|
|
|
}
|
2023-08-07 13:54:13 -04:00
|
|
|
}
|