From 4ed92d69b09ba32af1b6a657cc1f4681d41a6d78 Mon Sep 17 00:00:00 2001 From: maver Date: Tue, 27 Jun 2023 19:44:47 +0200 Subject: [PATCH] Fix jailbreak prompt not being overwritten by character --- public/scripts/PromptManager.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/public/scripts/PromptManager.js b/public/scripts/PromptManager.js index c164255ec..f3a2f2d57 100644 --- a/public/scripts/PromptManager.js +++ b/public/scripts/PromptManager.js @@ -239,7 +239,7 @@ PromptManagerModule.prototype.init = function (moduleConfiguration, serviceSetti prompts.set(systemPrompt, prompts.index('main')); } - const jailbreakPromptOverride = this.activeCharacter.data?.jailbreak_prompt ?? null; + const jailbreakPromptOverride = this.activeCharacter.data?.post_history_instructions ?? null; const jailbreakPrompt = prompts.get('jailbreak') ?? null; if (jailbreakPromptOverride && jailbreakPrompt) { jailbreakPrompt.content = jailbreakPromptOverride; @@ -607,6 +607,9 @@ PromptManagerModule.prototype.loadPromptIntoEditForm = function (prompt) { roleField.disabled = true; } + const resetPromptButton = document.getElementById(this.configuration.prefix + 'prompt_manager_popup_entry_form_reset'); + resetPromptButton.dataset.pmPrompt = prompt.identifier; + const savePromptButton = document.getElementById(this.configuration.prefix + 'prompt_manager_popup_entry_form_save'); savePromptButton.dataset.pmPrompt = prompt.identifier; }