Fix jailbreak prompt not being overwritten by character

This commit is contained in:
maver 2023-06-27 19:44:47 +02:00
parent 221ecbf8d6
commit 4ed92d69b0

View File

@ -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;
}