Fix main prompt clearing on disabling

This commit is contained in:
Cohee 2024-04-27 00:08:30 +03:00
parent b06e09c030
commit bbdbb08301
1 changed files with 1 additions and 1 deletions

View File

@ -1286,7 +1286,7 @@ class PromptManager {
} else if (!entry.enabled && entry.identifier === 'main') {
// Some extensions require main prompt to be present for relative inserts.
// So we make a GMO-free vegan replacement.
const prompt = this.getPromptById(entry.identifier);
const prompt = structuredClone(this.getPromptById(entry.identifier));
prompt.content = '';
if (prompt) promptCollection.add(this.preparePrompt(prompt));
}