Add regex processing for reasoning blocks

This commit is contained in:
Cohee
2025-01-27 23:06:07 +02:00
parent 3b8fd6f62f
commit 6fc342d446
3 changed files with 49 additions and 17 deletions

View File

@@ -94,6 +94,12 @@
<span data-i18n="World Info">World Info</span>
</label>
</div>
<div data-i18n="[title]ext_regex_reasoning_desc" title="Reasoning block contents. When 'Only Format Prompt' is checked, it will also affect the reasoning contents added to the prompt.">
<label class="checkbox flex-container">
<input type="checkbox" name="replace_position" value="6">
<span data-i18n="Reasoning">Reasoning</span>
</label>
</div>
<div class="flex-container wide100p marginTop5">
<div class="flex1 flex-container flexNoGap">
<small data-i18n="[title]ext_regex_min_depth_desc" title="When applied to prompts or display, only affect messages that are at least N levels deep. 0 = last message, 1 = penultimate message, etc. Only counts WI entries @Depth and usable messages, i.e. not hidden or system.">

View File

@@ -20,6 +20,7 @@ const regex_placement = {
SLASH_COMMAND: 3,
// 4 - sendAs (legacy)
WORLD_INFO: 5,
REASONING: 6,
};
export const substitute_find_regex = {