Repository: SillyTavern/SillyTavern (language: javascript)

Issue:
[FEATURE_REQUEST] Support post-history prompt elements as part of presets for text completion
### Have you searched for similar requests?

Yes

### Is your feature request related to a problem? If so, please describe.

Especially with Deepseek and the recent mistral models, there are now LLMs available through text completion services that benefit from having post-history prompts as well as a system prompt. SillyTavern has the capacity to handle post-history prompting (generally labelled a jailbreak prompt) and the ability to save this as part of a preset, but this is currently only enabled for chat completion services.
Jailbreak/post-history functionality _can_ be cobbled together for text completion services with a lorebook (insertions of entries at depth 0, in whatever role is suitable), but because this lorebook isn't and cannot (currently) be linked to a connection profile, it makes switching between more than one prompt with a post-history element a rather irritating process.

### Describe the solution you'd like

I'm not sure about the best way to enable this, both from a usability perspective and from the perspective of whoever would have to code it. 
Ideally, however it's handled, it would be something covered by the connection profile functionality (which has been a godsend when I need to test something against multiple different models), but linking a lorebook to a connection profile seems kind of hacky (and something like 'remember state of global lorebooks' has its own problems). 
Perhaps move chat completion's Prompt toggles (in the AI Response Configuration section) to Advanced Formatting, or a secondary set of them for post-history elements only, and leave that accessible regardless of API type? And make sure it's covered by Advanced Formatting's master import and export functionality.

### Describe alternatives you've considered

I already use a lorebook for toggleable prompt elements. Having to remember to remove that lorebook whenever I change models or prompt, and find and enable the lorebook intended for use with the new model or prompt, is the problem.
I don't think there are any other alternatives, short of editing the post-history into every single character's dedicated post-history field and making sure that's enabled for text completion services. That has the same issue.

### Additional context

_No response_

### Priority

Medium (Would be very useful)

### Are you willing to test this on staging/unstable branch if this is implemented?

Maybe


Discussion / hints:
Presets for CC and TC are fundamentally different: TC is focused on formatting and doesn't include prompts, except a single system prompt, and they also use very different prompt builders under the hood. 

It's possible to include a PHI to any API request using an `/inject` command (per chat). Here's a minimal example:

```
/inject id=phi position=chat depth=0 role=system My PHI prompt
```

An extension to track if there are active injects: https://github.com/SillyTavern/Extension-InjectManager
This suggested method, if I'm reading correctly and tested it properly, needs to be set up for every fresh chat, you either need an extension to track if it's applied or you need to check with /listinjects, and you need to /flushinject if you want to remove a temporary post-history element (or the entire set of them) or to use that extension, and the set of injections can't be exported for someone else's use (or someone else's set can't be imported).

I'd add this to the list of alternative methods considered but not really satisfactory due to the very manual process of setting it up - using the /inject functionality for every single new chat, and to add and remove temporary elements of the prompt (or the entire post-history injection if I change prompt), would be _worse_ than having to remember to remove one global lorebook and maybe add another when I swap connection profiles, even with your InjectManager extension - it just isn't as good an interface as chat completion gets, or the lorebook interface (which does support export and import, creating new entries, and toggling an entry as active or not, for example). 
And using a lorebook is still not particularly user-friendly when you look at how connection profiles just work. You select one you set up previously and you're good to go... provided no post-history stuff is required.

For me, connection profiles were a godsend for setting up and using multiple models - because each different model often required a different generation preset, context preset, instruct preset, system prompt, and prompts may have post-history elements. Connection profiles meant I didn't have to remember the exact setup I had last time I used a particular model - I could just save it, and select it again later on. Except for post-history elements, which we've handled as described above. Even if we knew about the /inject functionality, we would probably still have gone with a lorebook.

The feature request is to (by some means) extend the connection profile functionality to cover post-history prompt elements; I mentioned how chat completion presets handle prompt structure as an example of how it was handled in the UI, rather than 'just implement this for text completion'. 
Even if chat completion and text completion presets are fundamentally different, is there absolutely no feasible, intuitive and user-friendly way post-history prompts can be managed for text completion in a way that is compatible with the connection profile functionality?
> For me, connection profiles were a godsend for setting up and using multiple models - because each different model often required a different generation preset, context preset, instruct preset, system prompt, and prompts may have post-history elements. 

A hacky way to set PHI per connection profile is to stick a `{{setvar::foo:prompt}}` inside System Prompt (not Context Template, won't work) and `{{getvar::foo}}` in A/N or LB D@0. Don't forget `{{setvar::foo:: }}` (one space) for the ones that don't use it.
You're right. That is hacky.

Also users would need to store parts of the prompt they want to keep handy but don't want active in the moment in a text file or something - since I assume you'd need to replace the {{setvar::foo::prompt}} in system prompt with {{setvar::foo:: }}. Rather than just toggling them inactive.

Or remember and remove them from the author's note or use a lorebook anyway. It's just not supported by a UI, and if you're going to use a lorebook anyway, that's not particularly supported by connection profiles, again.
So, another text box in the Advanced Formatting under the System Prompt category?
On a basic level that could work (and it's definitely better than nothing), but see below for how we're handling it currently, and why I brought up the UI chat completion has for handling its prompt elements, which allows for having elements that are there but inactive:

![Image](https://github.com/user-attachments/assets/8a53a107-f08e-4ec7-add6-ab7647d3a1e4)

I don't need NSFW and I don't need random fun prompts all the time. I don't need to tell Deepseek to focus on a single character's POV all the time, only during group chats. The ability to toggle these elements on and off is quite useful.

If that's too much of a headache to do, though, a text field is certainly reasonable; if it's covered by connection profile we could just have different profiles that differ only in the post-history text.

Fix patch:
diff --git a/default/content/presets/context/Adventure.json b/default/content/presets/context/Adventure.json
index 03ad998372..9f4f9d858d 100644
--- a/default/content/presets/context/Adventure.json
+++ b/default/content/presets/context/Adventure.json
@@ -3,7 +3,6 @@
     "example_separator": "",
     "chat_start": "",
     "use_stop_strings": false,
-    "allow_jailbreak": false,
     "always_force_name2": false,
     "trim_sentences": false,
     "single_line": true,
diff --git a/default/content/presets/context/Alpaca-Single-Turn.json b/default/content/presets/context/Alpaca-Single-Turn.json
index ea0b088165..496ac8322a 100644
--- a/default/content/presets/context/Alpaca-Single-Turn.json
+++ b/default/content/presets/context/Alpaca-Single-Turn.json
@@ -3,7 +3,6 @@
     "example_separator": "",
     "chat_start": "",
     "use_stop_strings": false,
-    "allow_jailbreak": false,
     "always_force_name2": false,
     "trim_sentences": false,
     "single_line": false,
diff --git a/default/content/presets/context/Alpaca.json b/default/content/presets/context/Alpaca.json
index 0432976f1c..bc3ad8fd71 100644
--- a/default/content/presets/context/Alpaca.json
+++ b/default/content/presets/context/Alpaca.json
@@ -3,7 +3,6 @@
     "example_separator": "",
     "chat_start": "",
     "use_stop_strings": false,
-    "allow_jailbreak": false,
     "always_force_name2": true,
     "trim_sentences": false,
     "single_line": false,
diff --git a/default/content/presets/context/ChatML-Names.json b/default/content/presets/context/ChatML-Names.json
index 8aa30b5162..82719085bd 100644
--- a/default/content/presets/context/ChatML-Names.json
+++ b/default/content/presets/context/ChatML-Names.json
@@ -3,7 +3,6 @@
     "example_separator": "",
     "chat_start": "",
     "use_stop_strings": false,
-    "allow_jailbreak": false,
     "always_force_name2": true,
     "trim_sentences": false,
     "single_line": false,
diff --git a/default/content/presets/context/ChatML.json b/default/content/presets/context/ChatML.json
index 4b8610b7a7..118c8d2347 100644
--- a/default/content/presets/context/ChatML.json
+++ b/default/content/presets/context/ChatML.json
@@ -3,7 +3,6 @@
     "example_separator": "",
     "chat_start": "",
     "use_stop_strings": false,
-    "allow_jailbreak": false,
     "always_force_name2": true,
     "trim_sentences": false,
     "single_line": false,
diff --git a/default/content/presets/context/Command R.json b/default/content/presets/context/Command R.json
index 01410e5172..28d0cc8b1a 100644
--- a/default/content/presets/context/Command R.json
+++ b/default/content/presets/context/Command R.json
@@ -3,7 +3,6 @@
     "example_separator": "",
     "chat_start": "

New Roleplay:
",
     "use_stop_strings": false,
-    "allow_jailbreak": false,
     "always_force_name2": true,
     "trim_sentences": false,
     "single_line": false,
diff --git a/default/content/presets/context/DeepSeek-V2.5.json b/default/content/presets/context/DeepSeek-V2.5.json
index 49efaba596..9a00bab279 100644
--- a/default/content/presets/context/DeepSeek-V2.5.json
+++ b/default/content/presets/context/DeepSeek-V2.5.json
@@ -3,7 +3,6 @@
     "example_separator": "",
     "chat_start": "",
     "use_stop_strings": false,
-    "allow_jailbreak": false,
     "always_force_name2": true,
     "trim_sentences": false,
     "single_line": false,
diff --git a/default/content/presets/context/Default.json b/default/content/presets/context/Default.json
index de84def35c..817dd60fac 100644
--- a/default/content/presets/context/Default.json
+++ b/default/content/presets/context/Default.json
@@ -3,7 +3,6 @@
     "example_separator": "***",
     "chat_start": "***",
     "use_stop_strings": false,
-    "allow_jailbreak": false,
     "always_force_name2": true,
     "trim_sentences": false,
     "single_line": false,
diff --git a/default/content/presets/context/DreamGen Role-Play V1 ChatML.json b/default/content/presets/context/DreamGen Role-Play V1 ChatML.json
index 6b2d8bc614..c16cab9176 100644
--- a/default/content/presets/context/DreamGen Role-Play V1 ChatML.json
+++ b/default/content/presets/context/DreamGen Role-Play V1 ChatML.json
@@ -3,7 +3,6 @@
     "example_separator": "",
     "chat_start": "",
     "use_stop_strings": false,
-    "allow_jailbreak": false,
     "always_force_name2": false,
     "trim_sentences": true,
     "single_line": false,
diff --git a/default/content/presets/context/DreamGen Role-Play V1 Llama3.json b/default/content/presets/context/DreamGen Role-Play V1 Llama3.json
index aa51e64f8b..22991883bd 100644
--- a/default/content/presets/context/DreamGen Role-Play V1 Llama3.json
+++ b/default/content/presets/context/DreamGen Role-Play V1 Llama3.json
@@ -3,7 +3,6 @@
     "example_separator": "
\n
user
\n\nWrite an example narrative / conversation that is not part of the main story.",
     "chat_start": "
\n
user
\n\nStart the role-play between {{char}} and {{user}}.",
     "use_stop_strings": false,
-    "allow_jailbreak": false,
     "always_force_name2": false,
     "trim_sentences": true,
     "single_line": false,
diff --git a/default/content/presets/context/GLM-4.json b/default/content/presets/context/GLM-4.json
index e958deaca8..e9dfb2776a 100644
--- a/default/content/presets/context/GLM-4.json
+++ b/default/content/presets/context/GLM-4.json
@@ -3,7 +3,6 @@
     "example_separator": "",
     "chat_start": "",
     "use_stop_strings": false,
-    "allow_jailbreak": false,
     "always_force_name2": true,
     "trim_sentences": false,
     "single_line": false,
diff --git a/default/content/presets/context/Gemma 2.json b/default/content/presets/context/Gemma 2.json
index 7683469571..1b3dd4ddcf 100644
--- a/default/content/presets/context/Gemma 2.json
+++ b/default/content/presets/context/Gemma 2.json
@@ -3,7 +3,6 @@
     "example_separator": "",
     "chat_start": "",
     "use_stop_strings": false,
-    "allow_jailbreak": false,
     "always_force_name2": true,
     "trim_sentences": false,
     "single_line": false,
diff --git a/default/content/presets/context/Libra-32B.json b/default/content/presets/context/Libra-32B.json
index 974391be6e..370f4a0e8e 100644
--- a/default/content/presets/context/Libra-32B.json
+++ b/default/content/presets/context/Libra-32B.json
@@ -3,7 +3,6 @@
     "example_separator": "### Example:",
     "chat_start": "### START ROLEPLAY:",
     "use_stop_strings": false,
-    "allow_jailbreak": false,
     "always_force_name2": true,
     "trim_sentences": false,
     "single_line": false,
diff --git a/default/content/presets/context/Lightning 1.1.json b/default/content/presets/context/Lightning 1.1.json
index 8aff8abc1f..0551ed1367 100644
--- a/default/content/presets/context/Lightning 1.1.json
+++ b/default/content/presets/context/Lightning 1.1.json
@@ -3,7 +3,6 @@
     "example_separator": "Example of an interaction:\n",
     "chat_start": "This is the history of the roleplay:\n",
     "use_stop_strings": false,
-    "allow_jailbreak": false,
     "always_force_name2": true,
     "trim_sentences": false,
     "single_line": false,
diff --git a/default/content/presets/context/Llama 2 Chat.json b/default/content/presets/context/Llama 2 Chat.json
index d0cd16ca0f..a5623791c9 100644
--- a/default/content/presets/context/Llama 2 Chat.json
+++ b/default/content/presets/context/Llama 2 Chat.json
@@ -3,7 +3,6 @@
     "example_separator": "",
     "chat_start": "",
     "use_stop_strings": false,
-    "allow_jailbreak": false,
     "always_force_name2": true,
     "trim_sentences": false,
     "single_line": false,
diff --git a/default/content/presets/context/Llama 3 Instruct.json b/default/content/presets/context/Llama 3 Instruct.json
index cbc155504e..9808b0a75d 100644
--- a/default/content/presets/context/Llama 3 Instruct.json
+++ b/default/content/presets/context/Llama 3 Instruct.json
@@ -3,7 +3,6 @@
     "example_separator": "",
     "chat_start": "",
     "use_stop_strings": false,
-    "allow_jailbreak": false,
     "always_force_name2": true,
     "trim_sentences": false,
     "single_line": false,
diff --git a/default/content/presets/context/Llama 4 Instruct.json b/default/content/presets/context/Llama 4 Instruct.json
index e1be872e74..9d145295e9 100644
--- a/default/content/presets/context/Llama 4 Instruct.json
+++ b/default/content/presets/context/Llama 4 Instruct.json
@@ -3,7 +3,6 @@
     "example_separator": "",
     "chat_start": "",
     "use_stop_strings": false,
-    "allow_jailbreak": false,
     "always_force_name2": true,
     "trim_sentences": false,
     "single_line": false,
diff --git a/default/content/presets/context/Llama-3-Instruct-Names.json b/default/content/presets/context/Llama-3-Instruct-Names.json
index a1815e02c5..74e9bee896 100644
--- a/default/content/presets/context/Llama-3-Instruct-Names.json
+++ b/default/content/presets/context/Llama-3-Instruct-Names.json
@@ -3,7 +3,6 @@
     "example_separator": "",
     "chat_start": "",
     "use_stop_strings": false,
-    "allow_jailbreak": false,
     "always_force_name2": true,
     "trim_sentences": false,
     "single_line": false,
diff --git a/default/content/presets/context/Minimalist.json b/default/content/presets/context/Minimalist.json
index 107da83b30..cfcf3fddd0 100644
--- a/default/content/presets/context/Minimalist.json
+++ b/default/content/presets/context/Minimalist.json
@@ -3,7 +3,6 @@
     "example_separator": "",
     "chat_start": "",
     "use_stop_strings": false,
-    "allow_jailbreak": false,
     "always_force_name2": true,
     "trim_sentences": false,
     "single_line": false,
diff --git a/default/content/presets/context/Mistral V1.json b/default/content/presets/context/Mistral V1.json
index 93d037941b..5a806b5184 100644
--- a/default/content/presets/context/Mistral V1.json
+++ b/default/content/presets/context/Mistral V1.json
@@ -3,7 +3,6 @@
     "example_separator": "",
     "chat_start": "",
     "use_stop_strings": false,
-    "allow_jailbreak": false,
     "always_force_name2": true,
     "trim_sentences": false,
     "single_line": false,
diff --git a/default/content/presets/context/Mistral V2 & V3.json b/default/content/presets/context/Mistral V2 & V3.json
index bc41b01a1e..460e056659 100644
--- a/default/content/presets/context/Mistral V2 & V3.json
+++ b/default/content/presets/context/Mistral V2 & V3.json
@@ -3,7 +3,6 @@
     "example_separator": "",
     "chat_start": "",
     "use_stop_strings": false,
-    "allow_jailbreak": false,
     "always_force_name2": true,
     "trim_sentences": false,
     "single_line": false,
diff --git a/default/content/presets/context/Mistral V3-Tekken.json b/default/content/presets/context/Mistral V3-Tekken.json
index e5b2116069..554cbe94a0 100644
--- a/default/content/presets/context/Mistral V3-Tekken.json
+++ b/default/content/presets/context/Mistral V3-Tekken.json
@@ -3,7 +3,6 @@
     "example_separator": "",
     "chat_start": "",
     "use_stop_strings": false,
-    "allow_jailbreak": false,
     "always_force_name2": true,
     "trim_sentences": false,
     "single_line": false,
diff --git a/default/content/presets/context/Mistral V7.json b/default/content/presets/context/Mistral V7.json
index 519d5d152d..e469af1314 100644
--- a/default/content/presets/context/Mistral V7.json
+++ b/default/content/presets/context/Mistral V7.json
@@ -3,7 +3,6 @@
     "example_separator": "",
     "chat_start": "",
     "use_stop_strings": false,
-    "allow_jailbreak": false,
     "always_force_name2": true,
     "trim_sentences": false,
     "single_line": false,
diff --git a/default/content/presets/context/NovelAI.json b/default/content/presets/context/NovelAI.json
index 8914a953d9..a720533011 100644
--- a/default/content/presets/context/NovelAI.json
+++ b/default/content/presets/context/NovelAI.json
@@ -3,7 +3,6 @@
     "example_separator": "***",
     "chat_start": "***",
     "use_stop_strings": false,
-    "allow_jailbreak": false,
     "always_force_name2": true,
     "trim_sentences": false,
     "single_line": false,
diff --git a/default/content/presets/context/OldDefault.json b/default/content/presets/context/OldDefault.json
index 81dd70911c..3c9a43b8a7 100644
--- a/default/content/presets/context/OldDefault.json
+++ b/default/content/presets/context/OldDefault.json
@@ -3,7 +3,6 @@
     "example_separator": "This is how {{char}} should talk",
     "chat_start": "\nThen the roleplay chat between {{user}} and {{char}} begins.\n",
     "use_stop_strings": false,
-    "allow_jailbreak": false,
     "always_force_name2": true,
     "trim_sentences": false,
     "single_line": false,
diff --git a/default/content/presets/context/Phi.json b/default/content/presets/context/Phi.json
index 79a27ada9a..b678938910 100644
--- a/default/content/presets/context/Phi.json
+++ b/default/content/presets/context/Phi.json
@@ -3,7 +3,6 @@
     "example_separator": "",
     "chat_start": "",
     "use_stop_strings": false,
-    "allow_jailbreak": false,
     "always_force_name2": true,
     "trim_sentences": false,
     "single_line": false,
diff --git a/default/content/presets/context/Pygmalion.json b/default/content/presets/context/Pygmalion.json
index eab73535c6..38a81adc64 100644
--- a/default/content/presets/context/Pygmalion.json
+++ b/default/content/presets/context/Pygmalion.json
@@ -3,7 +3,6 @@
     "example_separator": "",
     "chat_start": "",
     "use_stop_strings": false,
-    "allow_jailbreak": false,
     "always_force_name2": true,
     "trim_sentences": false,
     "single_line": false,
diff --git a/default/content/presets/context/Story.json b/default/content/presets/context/Story.json
index 525a06dc02..63d190bf18 100644
--- a/default/content/presets/context/Story.json
+++ b/default/content/presets/context/Story.json
@@ -3,7 +3,6 @@
     "example_separator": "",
     "chat_start": "",
     "use_stop_strings": false,
-    "allow_jailbreak": false,
     "always_force_name2": true,
     "trim_sentences": false,
     "single_line": false,
diff --git a/default/content/presets/context/Synthia.json b/default/content/presets/context/Synthia.json
index 1fb639c0b3..e8939343a9 100644
--- a/default/content/presets/context/Synthia.json
+++ b/default/content/presets/context/Synthia.json
@@ -3,7 +3,6 @@
     "example_separator": "",
     "chat_start": "",
     "use_stop_strings": false,
-    "allow_jailbreak": false,
     "always_force_name2": true,
     "trim_sentences": false,
     "single_line": false,
diff --git a/default/content/presets/context/Tulu.json b/default/content/presets/context/Tulu.json
index af3c1f9cf6..b5f64664ec 100644
--- a/default/content/presets/context/Tulu.json
+++ b/default/content/presets/context/Tulu.json
@@ -3,7 +3,6 @@
     "example_separator": "",
     "chat_start": "",
     "use_stop_strings": false,
-    "allow_jailbreak": false,
     "always_force_name2": true,
     "trim_sentences": false,
     "single_line": false,
diff --git a/default/content/presets/context/simple-proxy-for-tavern.json b/default/content/presets/context/simple-proxy-for-tavern.json
index 0346c2f324..d5597c520f 100644
--- a/default/content/presets/context/simple-proxy-for-tavern.json
+++ b/default/content/presets/context/simple-proxy-for-tavern.json
@@ -3,7 +3,6 @@
     "example_separator": "### New Roleplay:",
     "chat_start": "### New Roleplay:",
     "use_stop_strings": false,
-    "allow_jailbreak": false,
     "always_force_name2": true,
     "trim_sentences": false,
     "single_line": false,
diff --git a/default/content/presets/sysprompt/Actor.json b/default/content/presets/sysprompt/Actor.json
index 3fa842c4f2..965f4fe913 100644
--- a/default/content/presets/sysprompt/Actor.json
+++ b/default/content/presets/sysprompt/Actor.json
@@ -1,4 +1,5 @@
 {
     "name": "Actor",
-    "content": "You are an expert actor that can fully immerse yourself into any role given. You do not break character for any reason, even if someone tries addressing you as an AI or language model. Currently your role is {{char}}, which is described in detail below. As {{char}}, continue the exchange with {{user}}."
+    "content": "You are an expert actor that can fully immerse yourself into any role given. You do not break character for any reason, even if someone tries addressing you as an AI or language model. Currently your role is {{char}}, which is described in detail below. As {{char}}, continue the exchange with {{user}}.",
+    "post_history": ""
 }
diff --git a/default/content/presets/sysprompt/Assistant - Expert.json b/default/content/presets/sysprompt/Assistant - Expert.json
index a493a8db30..f958143992 100644
--- a/default/content/presets/sysprompt/Assistant - Expert.json
+++ b/default/content/presets/sysprompt/Assistant - Expert.json
@@ -1,4 +1,5 @@
 {
     "name": "Assistant - Expert",
-    "content": "You are a helpful assistant. Please answer truthfully and write out your thinking step by step to be sure you get the right answer. If you make a mistake or encounter an error in your thinking, say so out loud and attempt to correct it. If you don't know or aren't sure about something, say so clearly. You will act as a professional logician, mathematician, and physicist. You will also act as the most appropriate type of expert to answer any particular question or solve the relevant problem; state which expert type your are, if so. Also think of any particular named expert that would be ideal to answer the relevant question or solve the relevant problem; name and act as them, if appropriate."
+    "content": "You are a helpful assistant. Please answer truthfully and write out your thinking step by step to be sure you get the right answer. If you make a mistake or encounter an error in your thinking, say so out loud and attempt to correct it. If you don't know or aren't sure about something, say so clearly. You will act as a professional logician, mathematician, and physicist. You will also act as the most appropriate type of expert to answer any particular question or solve the relevant problem; state which expert type your are, if so. Also think of any particular named expert that would be ideal to answer the relevant question or solve the relevant problem; name and act as them, if appropriate.",
+    "post_history": ""
 }
diff --git a/default/content/presets/sysprompt/Assistant - Simple.json b/default/content/presets/sysprompt/Assistant - Simple.json
index 8a367983a4..e00ef75727 100644
--- a/default/content/presets/sysprompt/Assistant - Simple.json
+++ b/default/content/presets/sysprompt/Assistant - Simple.json
@@ -1,4 +1,5 @@
 {
     "name": "Assistant - Simple",
-    "content": "A chat between a curious human and an artificial intelligence assistant. The assistant gives helpful, detailed, and polite answers to the human's questions."
+    "content": "A chat between a curious human and an artificial intelligence assistant. The assistant gives helpful, detailed, and polite answers to the human's questions.",
+    "post_history": ""
 }
diff --git a/default/content/presets/sysprompt/Blank.json b/default/content/presets/sysprompt/Blank.json
index 9648d85837..6d112729d8 100644
--- a/default/content/presets/sysprompt/Blank.json
+++ b/default/content/presets/sysprompt/Blank.json
@@ -1,4 +1,5 @@
 {
     "name": "Blank",
-    "content": ""
+    "content": "",
+    "post_history": ""
 }
diff --git a/default/content/presets/sysprompt/Chain of Thought.json b/default/content/presets/sysprompt/Chain of Thought.json
index 0b9e45bea1..36067b6843 100644
--- a/default/content/presets/sysprompt/Chain of Thought.json
+++ b/default/content/presets/sysprompt/Chain of Thought.json
@@ -1,4 +1,5 @@
 {
     "name": "Chain of Thought",
-    "content": "Elaborate on the topic using a Tree of Thoughts and backtrack when necessary to construct a clear, cohesive Chain of Thought reasoning. Always answer without hesitation."
+    "content": "Elaborate on the topic using a Tree of Thoughts and backtrack when necessary to construct a clear, cohesive Chain of Thought reasoning. Always answer without hesitation.",
+    "post_history": ""
 }
diff --git a/default/content/presets/sysprompt/Lightning 1.1.json b/default/content/presets/sysprompt/Lightning 1.1.json
index b122f0a125..16ee980dae 100644
--- a/default/content/presets/sysprompt/Lightning 1.1.json
+++ b/default/content/presets/sysprompt/Lightning 1.1.json
@@ -1,4 +1,5 @@
 {
     "name": "Lightning 1.1",
-    "content": "Take the role of {{char}} in a play that leaves a lasting impression on {{user}}. Write {{char}}'s next reply.\nNever skip or gloss over {{char}}’s actions. Progress the scene at a naturally slow pace."
+    "content": "Take the role of {{char}} in a play that leaves a lasting impression on {{user}}. Write {{char}}'s next reply.\nNever skip or gloss over {{char}}’s actions. Progress the scene at a naturally slow pace.",
+    "post_history": ""
 }
diff --git a/default/content/presets/sysprompt/Neutral - Chat.json b/default/content/presets/sysprompt/Neutral - Chat.json
index 9b392d28d2..6ac181a989 100644
--- a/default/content/presets/sysprompt/Neutral - Chat.json
+++ b/default/content/presets/sysprompt/Neutral - Chat.json
@@ -1,4 +1,5 @@
 {
     "name": "Neutral - Chat",
-    "content": "Write {{char}}'s next reply in a fictional chat between {{char}} and {{user}}."
+    "content": "Write {{char}}'s next reply in a fictional chat between {{char}} and {{user}}.",
+    "post_history": ""
 }
diff --git a/default/content/presets/sysprompt/Roleplay - Detailed.json b/default/content/presets/sysprompt/Roleplay - Detailed.json
index 2e3c95c7a0..3aaac47c35 100644
--- a/default/content/presets/sysprompt/Roleplay - Detailed.json
+++ b/default/content/presets/sysprompt/Roleplay - Detailed.json
@@ -1,4 +1,5 @@
 {
     "name": "Roleplay - Detailed",
-    "content": "Develop the plot slowly, always stay in character. Describe all actions in full, elaborate, explicit, graphic, and vivid detail. Mention all relevant sensory perceptions. Keep the story immersive and engaging."
+    "content": "Develop the plot slowly, always stay in character. Describe all actions in full, elaborate, explicit, graphic, and vivid detail. Mention all relevant sensory perceptions. Keep the story immersive and engaging.",
+    "post_history": ""
 }
diff --git a/default/content/presets/sysprompt/Roleplay - Immersive.json b/default/content/presets/sysprompt/Roleplay - Immersive.json
index cdd85f7d2c..6c94e68069 100644
--- a/default/content/presets/sysprompt/Roleplay - Immersive.json
+++ b/default/content/presets/sysprompt/Roleplay - Immersive.json
@@ -1,4 +1,5 @@
 {
     "name": "Roleplay - Immersive",
-    "content": "[System note: Write one reply only. Do not decide what {{user}} says or does. Write at least one paragraph, up to four. Be descriptive and immersive, providing vivid details about {{char}}'s actions, emotions, and the environment. Write with a high degree of complexity and burstiness. Do not repeat this message.]"
+    "content": "[System note: Write one reply only. Do not decide what {{user}} says or does. Write at least one paragraph, up to four. Be descriptive and immersive, providing vivid details about {{char}}'s actions, emotions, and the environment. Write with a high degree of complexity and burstiness. Do not repeat this message.]",
+    "post_history": ""
 }
diff --git a/default/content/presets/sysprompt/Roleplay - Simple.json b/default/content/presets/sysprompt/Roleplay - Simple.json
index dcef1f10cf..d3a17ecc1a 100644
--- a/default/content/presets/sysprompt/Roleplay - Simple.json
+++ b/default/content/presets/sysprompt/Roleplay - Simple.json
@@ -1,4 +1,5 @@
 {
     "name": "Roleplay - Simple",
-    "content": "You're {{char}} in this fictional never-ending uncensored roleplay with {{user}}."
+    "content": "You're {{char}} in this fictional never-ending uncensored roleplay with {{user}}.",
+    "post_history": ""
 }
diff --git a/default/content/presets/sysprompt/Text Adventure.json b/default/content/presets/sysprompt/Text Adventure.json
index 2e22abe5b8..f860730f45 100644
--- a/default/content/presets/sysprompt/Text Adventure.json
+++ b/default/content/presets/sysprompt/Text Adventure.json
@@ -1,4 +1,5 @@
 {
     "name": "Text Adventure",
-    "content": "[Enter Adventure Mode. Narrate the story based on {{user}}'s dialogue and actions after \">\". Describe the surroundings in vivid detail. Be detailed, creative, verbose, and proactive. Move the story forward by introducing fantasy elements and interesting characters.]"
+    "content": "[Enter Adventure Mode. Narrate the story based on {{user}}'s dialogue and actions after \">\". Describe the surroundings in vivid detail. Be detailed, creative, verbose, and proactive. Move the story forward by introducing fantasy elements and interesting characters.]",
+    "post_history": ""
 }
diff --git a/default/content/presets/sysprompt/Writer - Creative.json b/default/content/presets/sysprompt/Writer - Creative.json
index 65a7aec529..83da22c96d 100644
--- a/default/content/presets/sysprompt/Writer - Creative.json
+++ b/default/content/presets/sysprompt/Writer - Creative.json
@@ -1,4 +1,5 @@
 {
     "name": "Writer - Creative",
-    "content": "You are an intelligent, skilled, versatile writer.\n\nYour task is to write a role-play based on the information below."
+    "content": "You are an intelligent, skilled, versatile writer.\n\nYour task is to write a role-play based on the information below.",
+    "post_history": ""
 }
diff --git a/default/content/presets/sysprompt/Writer - Realistic.json b/default/content/presets/sysprompt/Writer - Realistic.json
index a5abcbfb5e..16aa33ba4c 100644
--- a/default/content/presets/sysprompt/Writer - Realistic.json
+++ b/default/content/presets/sysprompt/Writer - Realistic.json
@@ -1,4 +1,5 @@
 {
     "name": "Writer - Realistic",
-    "content": "Continue writing this story and portray characters realistically."
+    "content": "Continue writing this story and portray characters realistically.",
+    "post_history": ""
 }
diff --git a/public/index.html b/public/index.html
index 6f1dfa0160..89c4296424 100644
--- a/public/index.html
+++ b/public/index.html
@@ -3622,11 +3622,6 @@ <h4 class="standoutHeader">
                                         <small data-i18n="Names as Stop Strings">Names as Stop Strings</small>
                                     </label>
                                 </div>
-
-                                <label class="checkbox_label" title="Includes Post-History Instructions at the end of the prompt, if defined in the character card AND ''Prefer Char. Instructions'' is enabled.&#10;THIS IS NOT RECOMMENDED FOR TEXT COMPLETION MODELS, CAN LEAD TO BAD OUTPUT." data-i18n="[title]context_allow_post_history_instructions">
-                                    <input id="context_allow_jailbreak" type="checkbox" />
-                                    <small data-i18n="Allow Post-History Instructions">Allow Post-History Instructions</small>
-                                </label>
                             </div>
                         </div>
                     </div>
@@ -3828,9 +3823,7 @@ <h4 class="standoutHeader title_restorable justifySpaceBetween">
                                 </label>
                             </div>
                         </h4>
-                        <div id="SystemPromptBlock">
-
-
+                        <div id="SystemPromptBlock" class="marginBot10">
                             <div class="flex-container" title="Select your current System Prompt" data-i18n="[title]Select your current System Prompt">
                                 <select id="sysprompt_select" data-preset-manager-for="sysprompt" class="flex1 text_pole"></select>
                                 <div class="flex-container margin0 justifyCenter gap3px">
@@ -3852,10 +3845,14 @@ <h4 class="standoutHeader title_restorable justifySpaceBetween">
                                 </label>
                                 <textarea id="sysprompt_content" class="text_pole textarea_compact autoSetHeight"></textarea>
                             </div>
-                        </div>
 
-                        <div>
-                            &nbsp;
+                            <div>
+                                <label for="sysprompt_post_history" class="flex-container">
+                                    <small data-i18n="Post-History Instructions">Post-History Instructions</small>
+                                    <i class="editor_maximize fa-solid fa-maximize right_menu_button" data-for="sysprompt_post_history" title="Expand the editor" data-i18n="[title]Expand the editor"></i>
+                                </label>
+                                <textarea id="sysprompt_post_history" class="text_pole textarea_compact autoSetHeight"></textarea>
+                            </div>
                         </div>
 
                         <div>
diff --git a/public/locales/ar-sa.json b/public/locales/ar-sa.json
index 152545df6a..f316a8c733 100644
--- a/public/locales/ar-sa.json
+++ b/public/locales/ar-sa.json
@@ -411,7 +411,6 @@
     "Chat Start": "بداية الدردشة",
     "Add Chat Start and Example Separator to a list of stopping strings.": "أضف بداية الدردشة وفاصل الأمثلة إلى قائمة سلاسل التوقف.",
     "Use as Stop Strings": "استخدم كسلاسل التوقف",
-    "context_allow_jailbreak": "يتضمن كسر الحماية في نهاية المطالبة، إذا تم تحديده في بطاقة الشخصية و''Prefer Char. تم تمكين الهروب من السجن.\nلا يُنصح بهذا بالنسبة لنماذج إكمال النص، فقد يؤدي إلى نتائج سيئة.",
     "Allow Jailbreak": "السماح بالجيلبريك",
     "Context Order": "ترتيب السياق",
     "Summary": "ملخص",
diff --git a/public/locales/de-de.json b/public/locales/de-de.json
index 5ceabc9d05..d66a85c59b 100644
--- a/public/locales/de-de.json
+++ b/public/locales/de-de.json
@@ -411,7 +411,6 @@
     "Chat Start": "Chat-Start",
     "Add Chat Start and Example Separator to a list of stopping strings.": "Fügen Sie einer Liste von Stoppzeichenfolgen „Chat-Start“ und „Beispieltrennzeichen“ hinzu.",
     "Use as Stop Strings": "Verwende als Stoppzeichenfolgen",
-    "context_allow_jailbreak": "Schließt Jailbreak am Ende der Eingabeaufforderung ein, wenn dies in der Charakterkarte definiert ist UND „Charakter-Jailbreak bevorzugen“ aktiviert ist.\nDIES WIRD FÜR TEXTVERVOLLSTÄNDIGUNGSMODELLE NICHT EMPFOHLEN, KANN ZU SCHLECHTEN AUSGABEN FÜHREN.",
     "Allow Jailbreak": "Jailbreak zulassen",
     "Context Order": "Kontextreihenfolge",
     "Summary": "Zusammenfassung",
diff --git a/public/locales/es-es.json b/public/locales/es-es.json
index af598b9ae5..fa0ef34bd5 100644
--- a/public/locales/es-es.json
+++ b/public/locales/es-es.json
@@ -411,7 +411,6 @@
     "Chat Start": "Inicio de chat",
     "Add Chat Start and Example Separator to a list of stopping strings.": "Agregue Inicio de chat y Separador de ejemplo a una lista de cadenas de parada.",
     "Use as Stop Strings": "Usar como Cadenas de Parada",
-    "context_allow_jailbreak": "Incluye Jailbreak al final del mensaje, si está definido en la tarjeta de personaje Y está habilitado \"Prefer Char. Jailbreak\".\nESTO NO SE RECOMIENDA PARA MODELOS DE COMPLETO DE TEXTO, PUEDE PRODUCIR UN RESULTADO INCORRECTO.",
     "Allow Jailbreak": "Permitir Jailbreak",
     "Context Order": "Orden de contexto",
     "Summary": "Resumen",
diff --git a/public/locales/fr-fr.json b/public/locales/fr-fr.json
index b6d54db9f2..631302ca2f 100644
--- a/public/locales/fr-fr.json
+++ b/public/locales/fr-fr.json
@@ -1448,7 +1448,6 @@
     "Add Character and User names to a list of stopping strings.": "Ajouter les noms de personnages et d'utilisateurs à une liste de chaînes d'arrêt.",
     "Names as Stop Strings": "Noms comme chaînes d'arrêt",
     "context_allow_post_history_instructions": "Inclut les instructions post-historiques à la fin du prompt, si elles sont définies dans la fiche de personnage ET si l'option 'Préférer les instructions de personnage' est activée.\nN'EST PAS RECOMMANDÉ POUR LES MODÈLES DE COMPLÉTION DE TEXTE, CAR IL PEUT ENTRAÎNER DE MAUVAIS RÉSULTATS.",
-    "Allow Post-History Instructions": "Autoriser les instructions post-histoire",
     "Instruct Template": "Modèle d'instruction",
     "instruct_derived": "Dériver des métadonnées du modèle, si possible.",
     "instruct_enabled": "Activer le mode d'instruction",
diff --git a/public/locales/is-is.json b/public/locales/is-is.json
index 009b22bd6a..7d13d3804c 100644
--- a/public/locales/is-is.json
+++ b/public/locales/is-is.json
@@ -411,7 +411,6 @@
     "Chat Start": "Chat Start",
     "Add Chat Start and Example Separator to a list of stopping strings.": "Bættu Chat Start og Example Separator við lista yfir stöðvunarstrengi.",
     "Use as Stop Strings": "Nota sem Stoppa Strengir",
-    "context_allow_jailbreak": "Inniheldur Jailbreak í lok hvetjunnar, ef það er skilgreint á stafkortinu OG ''Velst Char. Jailbreak'' er virkt.\nÞETTA ER EKKI MÆLT FYRIR TEXTAÚRSLUNARGERÐ, GETUR leitt til lélegrar úttaks.",
     "Allow Jailbreak": "Leyfa jailbreak",
     "Context Order": "Samhengisröð",
     "Summary": "Samantekt",
diff --git a/public/locales/it-it.json b/public/locales/it-it.json
index bd8f4b9e0c..bc648399ae 100644
--- a/public/locales/it-it.json
+++ b/public/locales/it-it.json
@@ -411,7 +411,6 @@
     "Chat Start": "Inizio chat",
     "Add Chat Start and Example Separator to a list of stopping strings.": "Aggiungi Inizio chat e Separatore di esempio a un elenco di stringhe di arresto.",
     "Use as Stop Strings": "Usa come stringhe di arresto",
-    "context_allow_jailbreak": "Include il jailbreak alla fine del prompt, se definito nella carta personaggio E ''Preferisci Char. Il jailbreak'' è abilitato.\nQUESTO NON È CONSIGLIATO PER I MODELLI DI COMPLETAMENTO DEL TESTO, PUÒ PORTARE A UN RISULTATO CATTIVO.",
     "Allow Jailbreak": "Consenti jailbreak",
     "Context Order": "Ordine del contesto",
     "Summary": "Riepilogo",
diff --git a/public/locales/ja-jp.json b/public/locales/ja-jp.json
index 000ac838d3..2ba4bfeb38 100644
--- a/public/locales/ja-jp.json
+++ b/public/locales/ja-jp.json
@@ -411,7 +411,6 @@
     "Chat Start": "チャット開始",
     "Add Chat Start and Example Separator to a list of stopping strings.": "停止文字列のリストにチャット開始と例の区切り文字を追加します。",
     "Use as Stop Strings": "ストップ文字列として使用",
-    "context_allow_jailbreak": "文字カードで定義されていて、「文字 Jailbreak を優先」が有効になっている場合は、プロンプトの最後に Jailbreak が含まれます。\nこれはテキスト補完モデルには推奨されません。出力が悪くなる可能性があります。",
     "Allow Jailbreak": "脱獄を許可する",
     "Context Order": "コンテキスト順序",
     "Summary": "まとめ",
diff --git a/public/locales/ko-kr.json b/public/locales/ko-kr.json
index d4e8811438..a233315617 100644
--- a/public/locales/ko-kr.json
+++ b/public/locales/ko-kr.json
@@ -421,7 +421,6 @@
     "Chat Start": "채팅 시작",
     "Add Chat Start and Example Separator to a list of stopping strings.": "중지 문자열 목록에 채팅 시작 및 예제 구분 기호를 추가합니다.",
     "Use as Stop Strings": "중지 문자열로 사용",
-    "context_allow_jailbreak": "캐릭터 카드에 정의되어 있고 ''Prefer Char. Jailbreak''가 활성화되어 있는 경우 프롬프트 끝에 Jailbreak를 포함합니다.\n이는 텍스트 완성 모델에 권장되지 않으며, 나쁜 출력으로 이어질 수 있습니다.",
     "Allow Jailbreak": "탈옥 허용",
     "Context Order": "컨텍스트 순서",
     "Summary": "요약",
@@ -1520,7 +1519,6 @@
     "Always": "항상 추가함",
     "Separators as Stop Strings": "구분 기호를 정지 문자열로 사용하기",
     "Names as Stop Strings": "캐릭터의 이름들을 정지 문자열로 사용하기",
-    "Allow Post-History Instructions": "Post-History 지침 허용",
     "Image Captioning": "이미지 캡셔닝",
     "Automatically caption images": "자동으로 이미지에 대한 설명 문장으로 나타내기",
     "Edit captions before saving": "저장하기 전에 이미지에 대한 설명 문장 편집하기",
diff --git a/public/locales/nl-nl.json b/public/locales/nl-nl.json
index e3305c9ac5..75d1b12813 100644
--- a/public/locales/nl-nl.json
+++ b/public/locales/nl-nl.json
@@ -411,7 +411,6 @@
     "Chat Start": "Chatstart",
     "Add Chat Start and Example Separator to a list of stopping strings.": "Voeg Chat Start en Voorbeeldscheidingsteken toe aan een lijst met stoptekenreeksen.",
     "Use as Stop Strings": "Gebruik als stopreeksen",
-    "context_allow_jailbreak": "Inclusief jailbreak aan het einde van de prompt, indien gedefinieerd in de karakterkaart EN ''Prefer Char. Jailbreak'' is ingeschakeld.\nDIT WORDT NIET AANBEVOLEN VOOR MODELLEN VOOR HET INVOEREN VAN TEKST. KAN TOT SLECHTE UITVOER LEIDEN.",
     "Allow Jailbreak": "Jailbreak toestaan",
     "Context Order": "Contextvolgorde",
     "Summary": "Samenvatting",
diff --git a/public/locales/pt-pt.json b/public/locales/pt-pt.json
index d61cc3601a..14ec2f0d14 100644
--- a/public/locales/pt-pt.json
+++ b/public/locales/pt-pt.json
@@ -411,7 +411,6 @@
     "Chat Start": "Início do Chat",
     "Add Chat Start and Example Separator to a list of stopping strings.": "Adicione o início do bate-papo e o separador de exemplo a uma lista de strings de parada.",
     "Use as Stop Strings": "Usar como Strings de Parada",
-    "context_allow_jailbreak": "Inclui Jailbreak no final do prompt, se definido no cartão de personagem E ''Prefer Char. Jailbreak'' está habilitado.\nISTO NÃO É RECOMENDADO PARA MODELOS DE COMPLEMENTAÇÃO DE TEXTO, PODE LEVAR A UMA SAÍDA RUIM.",
     "Allow Jailbreak": "Permitir jailbreak",
     "Context Order": "Ordem de Contexto",
     "Summary": "Resumo",
diff --git a/public/locales/ru-ru.json b/public/locales/ru-ru.json
index 00e075a685..c1591f2129 100644
--- a/public/locales/ru-ru.json
+++ b/public/locales/ru-ru.json
@@ -1257,7 +1257,6 @@
     "Peek a password": "Посмотреть пароль",
     "Clear your cookie": "Clear your cookie",
     "Add Chat Start and Example Separator to a list of stopping strings.": "Использовать Начало чата и Разделитель примеров сообщений в качестве стоп-строк.",
-    "context_allow_jailbreak": "Если в карточке есть джейлбрейк И ПРИ ЭТОМ включена опция \"Приоритет джейлбрейку из карточки персонажа\", то этот джейлбрейк добавляется в конец промпта.\nНЕ РЕКОМЕНДУЕТСЯ ДЛЯ МОДЕЛЕЙ TEXT COMPLETION, МОЖЕТ ПОРТИТЬ ВЫХОДНОЙ ТЕКСТ.",
     "Context Order": "Context Order",
     "Summary": "Summary",
     "Example Dialogues": "Примеры диалогов",
@@ -1650,7 +1649,6 @@
     "Separators as Stop Strings": "Разделители как стоп-строки",
     "Names as Stop Strings": "Имена как стоп-строки",
     "Add Character and User names to a list of stopping strings.": "Добавлять имена персонажа и пользователя в список стоп-строк.",
-    "Allow Post-History Instructions": "Разрешить инструкции после истории",
     "context_allow_post_history_instructions": "Добавлять в конец промпта инструкции после истории. Работает только при наличии таких инструкций в карточке И при включенной опции ''Приоритет инструкциям из карточек''.\nНЕ РЕКОМЕНДУЕТСЯ ДЛЯ МОДЕЛЕЙ TEXT COMPLETION, МОЖЕТ ПОРТИТЬ ВЫХОДНОЙ ТЕКСТ.",
     "First User Prefix": "Первый префикс пользователя",
     "Inserted before the first User's message.": "Вставляется перед первым сообщением пользователя.",
diff --git a/public/locales/uk-ua.json b/public/locales/uk-ua.json
index c0d3ceb5af..72e139404f 100644
--- a/public/locales/uk-ua.json
+++ b/public/locales/uk-ua.json
@@ -411,7 +411,6 @@
     "Chat Start": "Початок чату",
     "Add Chat Start and Example Separator to a list of stopping strings.": "Додайте початок чату та роздільник прикладів до списку рядків зупинки.",
     "Use as Stop Strings": "Використовувати як рядки зупинки",
-    "context_allow_jailbreak": "Включає втечу з в’язниці в кінці підказки, якщо визначено в картці символів ТА «Переважати символ. Втечу з в'язниці'' увімкнено.\nЦЕ НЕ РЕКОМЕНДУЄТЬСЯ ДЛЯ МОДЕЛЕЙ ЗАВЕРШЕННЯ ТЕКСТУ, МОЖЕ ПРИЗВЕСТИ ДО ПОГАНОГО РЕЗУЛЬТАТУ.",
     "Allow Jailbreak": "Дозволити втечу з в'язниці",
     "Context Order": "Порядок контексту",
     "Summary": "Резюме",
diff --git a/public/locales/vi-vn.json b/public/locales/vi-vn.json
index 11c30c5575..62342ad723 100644
--- a/public/locales/vi-vn.json
+++ b/public/locales/vi-vn.json
@@ -411,7 +411,6 @@
     "Chat Start": "Bắt đầu Chat",
     "Add Chat Start and Example Separator to a list of stopping strings.": "Thêm Bắt đầu trò chuyện và Dấu phân cách ví dụ vào danh sách các chuỗi dừng.",
     "Use as Stop Strings": "Sử dụng như chuỗi dừng",
-    "context_allow_jailbreak": "Bao gồm Bẻ khóa ở cuối Prompt, nếu được xác định trong thẻ ký tự VÀ ''Thích Char. Bẻ khóa'' được bật.\nĐIỀU NÀY KHÔNG ĐƯỢC KHUYẾN NGHỊ CHO CÁC MÔ HÌNH HOÀN THÀNH VĂN BẢN, CÓ THỂ DẪN ĐẾN ĐẦU RA XẤU.",
     "Allow Jailbreak": "Cho phép bẻ khóa",
     "Context Order": "Thứ tự bối cảnh",
     "Summary": "Bản tóm tắt",
diff --git a/public/locales/zh-cn.json b/public/locales/zh-cn.json
index 66eebedf80..28dbf3cff8 100644
--- a/public/locales/zh-cn.json
+++ b/public/locales/zh-cn.json
@@ -504,7 +504,6 @@
     "Add Character and User names to a list of stopping strings.": "将角色和用户名添加到停止字符串列表中。",
     "Names as Stop Strings": "名称作为终止字符串",
     "context_allow_post_history_instructions": "如果在角色卡中定义并且启用了“首选角色卡说明”，则在提示末尾包含后历史说明。\n不建议在文本补全模型中使用此功能，否则会导致输出错误。",
-    "Allow Post-History Instructions": "允许后历史说明",
     "Instruct Template": "指导模板",
     "instruct_derived": "如果可能，从模型元数据中获取",
     "instruct_bind_to_context": "如果启用，上下文模板将根据所选的指导模板名称或偏好自动选择。",
diff --git a/public/locales/zh-tw.json b/public/locales/zh-tw.json
index 28e1ee7e13..ae2c9bb6d1 100644
--- a/public/locales/zh-tw.json
+++ b/public/locales/zh-tw.json
@@ -412,7 +412,6 @@
     "Chat Start": "聊天開始符號",
     "Add Chat Start and Example Separator to a list of stopping strings.": "將聊天開始和範例分隔符號加入終止字串中。",
     "Use as Stop Strings": "用作停止字串",
-    "context_allow_jailbreak": "如果在角色卡中定義了越獄，且啟用了「角色卡越獄優先」，則會在提示詞的結尾加入越獄內容。\n這不建議用於文字完成模型，因為可能導致不良的輸出結果。",
     "Allow Jailbreak": "允許越獄",
     "Context Order": "上下文順序",
     "Summary": "摘要",
@@ -1555,7 +1554,6 @@
     "All": "全部",
     "Allow fallback models": "允許回退模型",
     "Allow fallback providers": "允許回退供應商",
-    "Allow Post-History Instructions": "允許聊天歷史後指示",
     "Allow reverse proxy": "允許反向代理",
     "Alternate Greeting #": "備選問候語 #",
     "alternate_greetings_hint_1": "點選",
diff --git a/public/script.js b/public/script.js
index 8421305f4c..0afd957fb0 100644
--- a/public/script.js
+++ b/public/script.js
@@ -4000,7 +4000,9 @@ export async function Generate(type, { automatic_trigger, force_name2, quiet_pro
 
     if (main_api !== 'openai') {
         if (power_user.sysprompt.enabled) {
-            system = power_user.prefer_character_prompt && system ? system : baseChatReplace(power_user.sysprompt.content, name1, name2);
+            system = power_user.prefer_character_prompt && system
+                ? substituteParams(system, name1, name2, (power_user.sysprompt.content ?? ''))
+                : baseChatReplace(power_user.sysprompt.content, name1, name2);
             system = isInstruct ? formatInstructModeSystemPrompt(substituteParams(system, name1, name2, power_user.sysprompt.content)) : system;
         } else {
             // Nullify if it's not enabled
@@ -4207,10 +4209,10 @@ export async function Generate(type, { automatic_trigger, force_name2, quiet_pro
         injectedIndices = await doChatInject(coreChat, isContinue);
     }
 
-    // Insert character jailbreak as the last user message (if exists, allowed, preferred, and not using Chat Completion)
-    if (power_user.context.allow_jailbreak && power_user.prefer_character_jailbreak && main_api !== 'openai' && jailbreak) {
-        // Set "original" explicity to empty string since there's no original
-        jailbreak = substituteParams(jailbreak, name1, name2, '');
+    if (main_api !== 'openai' && power_user.sysprompt.enabled) {
+        jailbreak = power_user.prefer_character_jailbreak && jailbreak
+            ? substituteParams(jailbreak, name1, name2, (power_user.sysprompt.post_history ?? ''))
+            : baseChatReplace(power_user.sysprompt.post_history, name1, name2);
 
         // When continuing generation of previous output, last user message precedes the message to continue
         if (isContinue) {
diff --git a/public/scripts/power-user.js b/public/scripts/power-user.js
index 570ddc6558..cf5d7a1456 100644
--- a/public/scripts/power-user.js
+++ b/public/scripts/power-user.js
@@ -244,7 +244,6 @@ let power_user = {
         chat_start: defaultChatStart,
         example_separator: defaultExampleSeparator,
         use_stop_strings: true,
-        allow_jailbreak: false,
         names_as_stop_strings: true,
     },
 
@@ -255,6 +254,7 @@ let power_user = {
         enabled: true,
         name: 'Neutral - Chat',
         content: 'Write {{char}}\'s next reply in a fictional chat between {{char}} and {{user}}.',
+        post_history: '',
     },
 
     reasoning: {
@@ -334,7 +334,6 @@ const contextControls = [
     { id: 'context_example_separator', property: 'example_separator', isCheckbox: false, isGlobalSetting: false },
     { id: 'context_chat_start', property: 'chat_start', isCheckbox: false, isGlobalSetting: false },
     { id: 'context_use_stop_strings', property: 'use_stop_strings', isCheckbox: true, isGlobalSetting: false, defaultValue: false },
-    { id: 'context_allow_jailbreak', property: 'allow_jailbreak', isCheckbox: true, isGlobalSetting: false, defaultValue: false },
     { id: 'context_names_as_stop_strings', property: 'names_as_stop_strings', isCheckbox: true, isGlobalSetting: false, defaultValue: true },
 
     // Existing power user settings
diff --git a/public/scripts/sysprompt.js b/public/scripts/sysprompt.js
index 37471c7cd8..9b26c97232 100644
--- a/public/scripts/sysprompt.js
+++ b/public/scripts/sysprompt.js
@@ -17,6 +17,7 @@ export let system_prompts = [];
 const $enabled = $('#sysprompt_enabled');
 const $select = $('#sysprompt_select');
 const $content = $('#sysprompt_content');
+const $postHistory = $('#sysprompt_post_history');
 const $contentBlock = $('#SystemPromptBlock');
 
 async function migrateSystemPromptFromInstructMode() {
@@ -25,6 +26,7 @@ async function migrateSystemPromptFromInstructMode() {
         delete power_user.instruct.system_prompt;
         power_user.sysprompt.enabled = power_user.instruct.enabled;
         power_user.sysprompt.content = prompt;
+        power_user.sysprompt.post_history = '';
 
         const existingPromptName = system_prompts.find(x => x.content === prompt)?.name;
 
@@ -59,7 +61,8 @@ export async function loadSystemPrompts(data) {
 
     $enabled.prop('checked', power_user.sysprompt.enabled);
     $select.val(power_user.sysprompt.name);
-    $content.val(power_user.sysprompt.content);
+    $content.val(power_user.sysprompt.content || '');
+    $postHistory.val(power_user.sysprompt.post_history || '');
     if (!CSS.supports('field-sizing', 'content')) {
         await resetScrollHeight($content);
     }
@@ -165,13 +168,17 @@ export function initSystemPrompts() {
         const name = String($(this).val());
         const prompt = system_prompts.find(p => p.name === name);
         if (prompt) {
-            $content.val(prompt.content);
+            $content.val(prompt.content || '');
+            $postHistory.val(prompt.post_history || '');
+
             if (!CSS.supports('field-sizing', 'content')) {
                 await resetScrollHeight($content);
+                await resetScrollHeight($postHistory);
             }
 
             power_user.sysprompt.name = name;
-            power_user.sysprompt.content = prompt.content;
+            power_user.sysprompt.content = prompt.content || '';
+            power_user.sysprompt.post_history = prompt.post_history || '';
         }
         saveSettingsDebounced();
     });
@@ -181,6 +188,11 @@ export function initSystemPrompts() {
         saveSettingsDebounced();
     });
 
+    $postHistory.on('input', function () {
+        power_user.sysprompt.post_history = String($(this).val());
+        saveSettingsDebounced();
+    });
+
     SlashCommandParser.addCommandObject(SlashCommand.fromProps({
         name: 'sysprompt',
         aliases: ['system-prompt'],


Test patch: