From 9fb38af838f34f95c44046fa5ef3436abfb40107 Mon Sep 17 00:00:00 2001 From: maver Date: Tue, 15 Aug 2023 01:28:07 +0200 Subject: [PATCH] Fix defaults getting applied when switching back to Default preset --- public/scripts/PromptManager.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/public/scripts/PromptManager.js b/public/scripts/PromptManager.js index e763a3952..33753b0a7 100644 --- a/public/scripts/PromptManager.js +++ b/public/scripts/PromptManager.js @@ -23,6 +23,8 @@ function debouncePromise(func, delay) { */ const registerPromptManagerMigration = () => { const migrate = (settings, savePreset = null, presetName = null) => { + if ('Default' === presetName) return; + if (settings.main_prompt || settings.nsfw_prompt || settings.jailbreak_prompt) { console.log('Running prompt manager configuration migration'); if (settings.prompts === undefined || settings.prompts.length === 0) settings.prompts = structuredClone(chatCompletionDefaultPrompts.prompts);