From c340766bb6ba6308cba8899cf3e9adae021ad819 Mon Sep 17 00:00:00 2001 From: Cohee <18619528+Cohee1207@users.noreply.github.com> Date: Sun, 22 Sep 2024 21:06:03 +0300 Subject: [PATCH] Use prefix in the migrated sysprompts --- public/scripts/sysprompt.js | 2 +- src/users.js | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/public/scripts/sysprompt.js b/public/scripts/sysprompt.js index e90081844..722e770c4 100644 --- a/public/scripts/sysprompt.js +++ b/public/scripts/sysprompt.js @@ -29,7 +29,7 @@ async function migrateSystemPromptFromInstructMode() { if (existingPromptName) { power_user.sysprompt.name = existingPromptName; } else { - const data = { name: `${power_user.instruct.preset} (Migrated)`, content: prompt }; + const data = { name: `[Migrated] ${power_user.instruct.preset}`, content: prompt }; await getPresetManager('sysprompt')?.savePreset(data.name, data); power_user.sysprompt.name = data.name; } diff --git a/src/users.js b/src/users.js index 098f22f4a..618641bab 100644 --- a/src/users.js +++ b/src/users.js @@ -368,6 +368,7 @@ async function migrateSystemPrompts() { // Only leave contents that are not in the default prompts migratedPrompts = migratedPrompts.filter(x => !defaultPrompts.some(y => y.content === x.content)); for (const sysPromptData of migratedPrompts) { + sysPromptData.name = `[Migrated] ${sysPromptData.name}`; const syspromptPath = path.join(directory.sysprompt, `${sysPromptData.name}.json`); writeFileAtomicSync(syspromptPath, JSON.stringify(sysPromptData, null, 4)); console.log(`Migrated system prompt ${sysPromptData.name} for ${directory.root.split(path.sep).pop()}`);