| 368 | // Only leave contents that are not in the default prompts | 368 | // Only leave contents that are not in the default prompts |
| 369 | migratedPrompts = migratedPrompts.filter(x => !defaultPrompts.some(y => y.content === x.content)); | 369 | migratedPrompts = migratedPrompts.filter(x => !defaultPrompts.some(y => y.content === x.content)); |
| 370 | for (const sysPromptData of migratedPrompts) { | 370 | for (const sysPromptData of migratedPrompts) { |
| | 371 | sysPromptData.name = `[Migrated] ${sysPromptData.name}`; |
| 371 | const syspromptPath = path.join(directory.sysprompt, `${sysPromptData.name}.json`); | 372 | const syspromptPath = path.join(directory.sysprompt, `${sysPromptData.name}.json`); |
| 372 | writeFileAtomicSync(syspromptPath, JSON.stringify(sysPromptData, null, 4)); | 373 | writeFileAtomicSync(syspromptPath, JSON.stringify(sysPromptData, null, 4)); |
| 373 | console.log(`Migrated system prompt ${sysPromptData.name} for ${directory.root.split(path.sep).pop()}`); | 374 | console.log(`Migrated system prompt ${sysPromptData.name} for ${directory.root.split(path.sep).pop()}`); |