Fix defaults getting applied when switching back to Default preset

This commit is contained in:
maver 2023-08-15 01:28:07 +02:00
parent 2bb8fa5ea1
commit 9fb38af838
1 changed files with 2 additions and 0 deletions

View File

@ -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);