diff --git a/public/index.html b/public/index.html index b0f393eac..ea7e26d4c 100644 --- a/public/index.html +++ b/public/index.html @@ -730,47 +730,59 @@
-
- Jailbreak activation message +
+ Jailbreak activation message +
+
+
Message to send when auto-jailbreak is on.
- +
-
- Jailbreak confirmation reply +
+ Jailbreak confirmation reply +
+
+
Bot must send this back to confirm jailbreak
- +
-
- Character Note +
+ Character Note +
+
+
Influences bot behavior in its responses.
- +
-
- Impersonation prompt +
+ Impersonation prompt +
+
+
Prompt that is used for Impersonation function
- +
diff --git a/public/scripts/poe.js b/public/scripts/poe.js index a144f5481..0b0ef99cd 100644 --- a/public/scripts/poe.js +++ b/public/scripts/poe.js @@ -114,14 +114,14 @@ async function generatePoe(type, finalPrompt) { if (poe_settings.auto_jailbreak && !auto_jailbroken) { console.log('Could not jailbreak the bot'); } - + const isImpersonate = type == 'impersonate'; if (poe_settings.character_nudge && !isImpersonate) { let characterNudge = '\n' + substituteParams(poe_settings.character_nudge_message); finalPrompt += characterNudge; } - + if (poe_settings.impersonation_prompt && isImpersonate) { let impersonationNudge = '\n' + substituteParams(poe_settings.impersonation_prompt); finalPrompt += impersonationNudge; @@ -308,7 +308,31 @@ function onStreamingInput() { } function onImpersonationPromptInput() { - poe_settings.impersonation_prompt = !!$(this).prop('checked'); + poe_settings.impersonation_prompt = $(this).val(); + saveSettingsDebounced(); +} + +function onImpersonationPromptRestoreClick() { + poe_settings.impersonation_prompt = DEFAULT_IMPERSONATION_PROMPT; + $('#poe_impersonation_prompt').val(poe_settings.impersonation_prompt); + saveSettingsDebounced(); +} + +function onCharacterNudgeMessageRestoreClick() { + poe_settings.character_nudge_message = DEFAULT_CHARACTER_NUDGE_MESSAGE; + $('#poe_nudge_text').val(poe_settings.character_nudge_message); + saveSettingsDebounced(); +} + +function onResponseRestoreClick() { + poe_settings.jailbreak_response = DEFAULT_JAILBREAK_RESPONSE; + $('#poe_activation_response').val(poe_settings.jailbreak_response); + saveSettingsDebounced(); +} + +function onMessageRestoreClick() { + poe_settings.jailbreak_message = DEFAULT_JAILBREAK_MESSAGE; + $('#poe_activation_message').val(poe_settings.jailbreak_message); saveSettingsDebounced(); } @@ -323,4 +347,9 @@ $('document').ready(function () { $('#poe_character_nudge').on('input', onCharacterNudgeInput); $('#poe_nudge_text').on('input', onCharacterNudgeMessageInput); $('#poe_streaming').on('input', onStreamingInput); + $('#poe_impersonation_prompt').on('input', onImpersonationPromptInput); + $('#poe_impersonation_prompt_restore').on('click', onImpersonationPromptRestoreClick); + $('#poe_nudge_text_restore').on('click', onCharacterNudgeMessageRestoreClick); + $('#poe_activation_response_restore').on('click', onResponseRestoreClick); + $('#poe_activation_message_restore').on('click', onMessageRestoreClick); }); \ No newline at end of file diff --git a/public/style.css b/public/style.css index 59fc37cec..f58b38840 100644 --- a/public/style.css +++ b/public/style.css @@ -3153,7 +3153,7 @@ toolcool-color-picker { flex-wrap: wrap; } -#poe_activation_message { +.textarea_compact { font-size: calc(var(--mainFontSize) * 0.9); line-height: 1.2; }