From 0cdd07b23f9c9bddee943c346cd5773d8c9b4d0a Mon Sep 17 00:00:00 2001 From: AT Date: Tue, 23 Jul 2024 21:51:36 -0400 Subject: [PATCH] Actually set the chat name and suggested follow-up question prompts. (#2723) Signed-off-by: Adam Treat --- gpt4all-chat/qml/ModelSettings.qml | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) diff --git a/gpt4all-chat/qml/ModelSettings.qml b/gpt4all-chat/qml/ModelSettings.qml index dba06b2d..5e896eb1 100644 --- a/gpt4all-chat/qml/ModelSettings.qml +++ b/gpt4all-chat/qml/ModelSettings.qml @@ -272,6 +272,21 @@ MySettingsTab { id: chatNamePromptTextArea anchors.fill: parent text: root.currentModelInfo.chatNamePrompt + Connections { + target: MySettings + function onChatNamePromptChanged() { + chatNamePromptTextArea.text = root.currentModelInfo.chatNamePrompt; + } + } + Connections { + target: root + function onCurrentModelInfoChanged() { + chatNamePromptTextArea.text = root.currentModelInfo.chatNamePrompt; + } + } + onTextChanged: { + MySettings.setModelChatNamePrompt(root.currentModelInfo, text) + } Accessible.role: Accessible.EditableText Accessible.name: chatNamePromptLabel.text Accessible.description: chatNamePromptLabel.text @@ -300,6 +315,21 @@ MySettingsTab { id: suggestedFollowUpPromptTextArea anchors.fill: parent text: root.currentModelInfo.suggestedFollowUpPrompt + Connections { + target: MySettings + function onSuggestedFollowUpPromptChanged() { + suggestedFollowUpPromptTextArea.text = root.currentModelInfo.suggestedFollowUpPrompt; + } + } + Connections { + target: root + function onCurrentModelInfoChanged() { + suggestedFollowUpPromptTextArea.text = root.currentModelInfo.suggestedFollowUpPrompt; + } + } + onTextChanged: { + MySettings.setModelSuggestedFollowUpPrompt(root.currentModelInfo, text) + } Accessible.role: Accessible.EditableText Accessible.name: suggestedFollowUpPromptLabel.text Accessible.description: suggestedFollowUpPromptLabel.text