mirror of
https://github.com/nomic-ai/gpt4all.git
synced 2025-08-16 23:17:11 +00:00
Move to a brave search specific settings page.
Signed-off-by: Adam Treat <treat.adam@gmail.com>
This commit is contained in:
parent
48117cda46
commit
a6730879dd
@ -138,6 +138,7 @@ qt_add_qml_module(chat
|
|||||||
qml/AddCollectionView.qml
|
qml/AddCollectionView.qml
|
||||||
qml/AddModelView.qml
|
qml/AddModelView.qml
|
||||||
qml/ApplicationSettings.qml
|
qml/ApplicationSettings.qml
|
||||||
|
qml/BraveSearchSettings.qml
|
||||||
qml/ChatDrawer.qml
|
qml/ChatDrawer.qml
|
||||||
qml/ChatView.qml
|
qml/ChatView.qml
|
||||||
qml/CollectionsDrawer.qml
|
qml/CollectionsDrawer.qml
|
||||||
@ -156,7 +157,6 @@ qt_add_qml_module(chat
|
|||||||
qml/ThumbsDownDialog.qml
|
qml/ThumbsDownDialog.qml
|
||||||
qml/Toast.qml
|
qml/Toast.qml
|
||||||
qml/ToastManager.qml
|
qml/ToastManager.qml
|
||||||
qml/ToolSettings.qml
|
|
||||||
qml/MyBusyIndicator.qml
|
qml/MyBusyIndicator.qml
|
||||||
qml/MyButton.qml
|
qml/MyButton.qml
|
||||||
qml/MyCheckBox.qml
|
qml/MyCheckBox.qml
|
||||||
|
@ -48,7 +48,7 @@ public:
|
|||||||
ToolEnums::Error error() const override { return m_error; }
|
ToolEnums::Error error() const override { return m_error; }
|
||||||
QString errorString() const override { return m_errorString; }
|
QString errorString() const override { return m_errorString; }
|
||||||
|
|
||||||
QString name() const override { return tr("Brave web search"); }
|
QString name() const override { return tr("Brave Web Search"); }
|
||||||
QString description() const override { return tr("Search the web using brave"); }
|
QString description() const override { return tr("Search the web using brave"); }
|
||||||
QString function() const override { return "brave_search"; }
|
QString function() const override { return "brave_search"; }
|
||||||
QJsonObject paramSchema() const override;
|
QJsonObject paramSchema() const override;
|
||||||
|
@ -34,7 +34,7 @@ public:
|
|||||||
ToolEnums::Error error() const override { return m_error; }
|
ToolEnums::Error error() const override { return m_error; }
|
||||||
QString errorString() const override { return m_errorString; }
|
QString errorString() const override { return m_errorString; }
|
||||||
|
|
||||||
QString name() const override { return tr("LocalDocs search"); }
|
QString name() const override { return tr("LocalDocs Search"); }
|
||||||
QString description() const override { return tr("Search the local docs"); }
|
QString description() const override { return tr("Search the local docs"); }
|
||||||
QString function() const override { return "localdocs_search"; }
|
QString function() const override { return "localdocs_search"; }
|
||||||
QJsonObject paramSchema() const override;
|
QJsonObject paramSchema() const override;
|
||||||
|
@ -16,7 +16,7 @@ MySettingsTab {
|
|||||||
|
|
||||||
showRestoreDefaultsButton: true
|
showRestoreDefaultsButton: true
|
||||||
|
|
||||||
title: qsTr("Tools")
|
title: qsTr("Brave Web Search")
|
||||||
contentItem: ColumnLayout {
|
contentItem: ColumnLayout {
|
||||||
id: root
|
id: root
|
||||||
spacing: 30
|
spacing: 30
|
||||||
@ -27,7 +27,7 @@ MySettingsTab {
|
|||||||
color: theme.grayRed900
|
color: theme.grayRed900
|
||||||
font.pixelSize: theme.fontSizeLarge
|
font.pixelSize: theme.fontSizeLarge
|
||||||
font.bold: true
|
font.bold: true
|
||||||
text: qsTr("Brave Search")
|
text: qsTr("Brave Web Search")
|
||||||
}
|
}
|
||||||
|
|
||||||
Rectangle {
|
Rectangle {
|
||||||
@ -37,6 +37,33 @@ MySettingsTab {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
RowLayout {
|
||||||
|
MySettingsLabel {
|
||||||
|
id: usageModeLabel
|
||||||
|
text: qsTr("Usage Mode")
|
||||||
|
helpText: qsTr("When and how the brave search tool is executed.")
|
||||||
|
}
|
||||||
|
MyComboBox {
|
||||||
|
id: usageModeBox
|
||||||
|
Layout.minimumWidth: 400
|
||||||
|
Layout.maximumWidth: 400
|
||||||
|
Layout.alignment: Qt.AlignRight
|
||||||
|
// NOTE: indices match values of UsageMode enum, keep them in sync
|
||||||
|
model: ListModel {
|
||||||
|
ListElement { name: qsTr("Never") }
|
||||||
|
ListElement { name: qsTr("Model decides") }
|
||||||
|
ListElement { name: qsTr("Ask for confirmation before executing") }
|
||||||
|
ListElement { name: qsTr("Force usage for every response when possible") }
|
||||||
|
}
|
||||||
|
Accessible.name: usageModeLabel.text
|
||||||
|
Accessible.description: usageModeLabel.helpText
|
||||||
|
onActivated: {
|
||||||
|
}
|
||||||
|
Component.onCompleted: {
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
RowLayout {
|
RowLayout {
|
||||||
MySettingsLabel {
|
MySettingsLabel {
|
||||||
id: apiKeyLabel
|
id: apiKeyLabel
|
||||||
@ -51,7 +78,8 @@ MySettingsTab {
|
|||||||
color: theme.textColor
|
color: theme.textColor
|
||||||
font.pixelSize: theme.fontSizeLarge
|
font.pixelSize: theme.fontSizeLarge
|
||||||
Layout.alignment: Qt.AlignRight
|
Layout.alignment: Qt.AlignRight
|
||||||
Layout.minimumWidth: 200
|
Layout.minimumWidth: 400
|
||||||
|
Layout.maximumWidth: 400
|
||||||
onEditingFinished: {
|
onEditingFinished: {
|
||||||
MySettings.braveSearchAPIKey = apiKeyField.text;
|
MySettings.braveSearchAPIKey = apiKeyField.text;
|
||||||
}
|
}
|
@ -35,7 +35,7 @@ Rectangle {
|
|||||||
title: qsTr("LocalDocs")
|
title: qsTr("LocalDocs")
|
||||||
}
|
}
|
||||||
ListElement {
|
ListElement {
|
||||||
title: qsTr("Tools")
|
title: qsTr("Brave Web Search")
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -158,7 +158,7 @@ Rectangle {
|
|||||||
|
|
||||||
MySettingsStack {
|
MySettingsStack {
|
||||||
tabs: [
|
tabs: [
|
||||||
Component { ToolSettings { } }
|
Component { BraveSearchSettings { } }
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user