Use prefix in the migrated sysprompts
This commit is contained in:
parent
4ee771b7af
commit
c340766bb6
|
@ -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;
|
||||
}
|
||||
|
|
|
@ -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()}`);
|
||||
|
|
Loading…
Reference in New Issue