From bbdbb08301e6c063ee86dc37126b8a92bd37178f Mon Sep 17 00:00:00 2001 From: Cohee <18619528+Cohee1207@users.noreply.github.com> Date: Sat, 27 Apr 2024 00:08:30 +0300 Subject: [PATCH] Fix main prompt clearing on disabling --- public/scripts/PromptManager.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/public/scripts/PromptManager.js b/public/scripts/PromptManager.js index 308015326..cbf3eed3f 100644 --- a/public/scripts/PromptManager.js +++ b/public/scripts/PromptManager.js @@ -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)); }