From b56cc61ca24fa06195be4931da2e02a82ae38fcc Mon Sep 17 00:00:00 2001 From: Adam Treat Date: Tue, 27 Jun 2023 14:52:44 -0400 Subject: [PATCH] Don't allow setting an invalid prompt template. --- gpt4all-chat/qml/SettingsDialog.qml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/gpt4all-chat/qml/SettingsDialog.qml b/gpt4all-chat/qml/SettingsDialog.qml index 2f9c12e1..db6df81a 100644 --- a/gpt4all-chat/qml/SettingsDialog.qml +++ b/gpt4all-chat/qml/SettingsDialog.qml @@ -566,6 +566,8 @@ Dialog { padding: 10 wrapMode: TextArea.Wrap onTextChanged: { + if (settings.promptTemplate.indexOf("%1") === -1) + return; settings.promptTemplate = text settings.sync() }