Add controls for different WI matching targets To accomodate new settings, the WI Entry panels were reworked slightly to add a drawer. Both Global and Entry settings are present.

5bed367a32d0b96843920f8cb17728e6ebe88332

Crow <bismuthglass@protonmail.com>

2 files changed, +195 -79Showing whitespace changes
public/css/world-info.css+1 -1
@@ -275,6 +275,6 @@ select.keyselect+span.select2-container .select2-selection--multiple {
275275 width: 100%;
276276}
277277
278278.world_entry:has(input[name="delay_until_recursion"]:not(:checked)) .world_entry_form_controlworld_entry_form_control_recursion_delay:has(input[name="delayUntilRecursionLevel"]) {
279279 display: none;
280280}
public/index.html+194 -78
@@ -4079,7 +4079,7 @@
40794079 <div class="fa-solid fa-circle-chevron-down inline-drawer-icon down"></div>
40804080 </div>
40814081 <div class="inline-drawer-content">
40824082 <div id="wiActivationSettings" class="flex-container">
40834083 <div id="wiSliders" class="flex2 flex-container">
40844084 <div class="alignitemscenter flex-container flexFlowColumn flexGrow flexShrink gap0 flexBasis48p">
40854085 <small>
@@ -4131,31 +4131,12 @@
41314131 <input class="neo-range-slider" type="range" id="world_info_max_recursion_steps" name="world_info_max_recursion_steps" min="0" max="10" step="1">
41324132 <input class="neo-range-input" type="number" min="0" max="10" step="1" data-for="world_info_max_recursion_steps" id="world_info_max_recursion_steps_counter">
41334133 </div>
4134-
4135- <div class="alignitemscenter flex-container flexFlowColumn flexGrow flexShrink flexBasis48p">
4136- <small data-i18n="Insertion Strategy">
4137- Insertion Strategy
4138- </small>
4139- <select id="world_info_character_strategy" class="flexGrow margin0">
4140- <option value="0" data-i18n="Sorted Evenly">Sorted Evenly</option>
4141- <option value="1" data-i18n="Character Lore First">Character Lore First</option>
4142- <option value="2" data-i18n="Global Lore First">Global Lore First</option>
4143- </select>
41444134 </div>
4145- </div>
4135+ <hr class="width100p">
41464136 <div id="wiCheckboxes" class="flex1 flex-container flexFlowColumn flexGrow flexShrink flexBasis48p">
4147- <label title="Include names with each message into the context for scanning" data-i18n="[title]Include names with each message into the context for scanning" class="checkbox_label flex1">
4137+ <small class="textAlignCenter" data-i18n="Matching Strategy">
4148- <input id="world_info_include_names" type="checkbox" />
4138+ Matching Strategy
4149- <small data-i18n="Include Names" class="whitespacenowrap flex1">
4150- Include Names
4151- </small>
4152- </label>
4153- <label title="Entries can activate other entries by mentioning their keywords" data-i18n="[title]Entries can activate other entries by mentioning their keywords" class="checkbox_label flex1">
4154- <input id="world_info_recursive" type="checkbox" />
4155- <small data-i18n="Recursive Scan" class="whitespacenowrap flex1">
4156- Recursive Scan
41574139 </small>
4158- </label>
41594140 <label title="Lookup for the entry keys in the context will respect the case" data-i18n="[title]Lookup for the entry keys in the context will respect the case" class="checkbox_label flex1">
41604141 <input id="world_info_case_sensitive" type="checkbox" />
41614142 <small data-i18n="Case Sensitive" class="whitespacenowrap flex1">
@@ -4168,6 +4149,61 @@
41684149 Match Whole Words
41694150 </small>
41704151 </label>
4152+ <label title="If the entry key consists of only one word, it would not be matched as part of other words" data-i18n="[title]If the entry key consists of only one word, it would not be matched as part of other words" class="checkbox_label flex1">
4153+ <input id="world_info_match_whole_words" type="checkbox" />
4154+ <small data-i18n="Match Whole Words" class="whitespacenowrap flex1">
4155+ Match Persona Description
4156+ </small>
4157+ </label>
4158+ <label title="If the entry key consists of only one word, it would not be matched as part of other words" data-i18n="[title]If the entry key consists of only one word, it would not be matched as part of other words" class="checkbox_label flex1">
4159+ <input id="world_info_match_whole_words" type="checkbox" />
4160+ <small data-i18n="Match Whole Words" class="whitespacenowrap flex1">
4161+ Match Character Description
4162+ </small>
4163+ </label>
4164+ <label title="If the entry key consists of only one word, it would not be matched as part of other words" data-i18n="[title]If the entry key consists of only one word, it would not be matched as part of other words" class="checkbox_label flex1">
4165+ <input id="world_info_match_whole_words" type="checkbox" />
4166+ <small data-i18n="Match Whole Words" class="whitespacenowrap flex1">
4167+ Match Character Personality
4168+ </small>
4169+ </label>
4170+ <label title="If the entry key consists of only one word, it would not be matched as part of other words" data-i18n="[title]If the entry key consists of only one word, it would not be matched as part of other words" class="checkbox_label flex1">
4171+ <input id="world_info_match_whole_words" type="checkbox" />
4172+ <small data-i18n="Match Whole Words" class="whitespacenowrap flex1">
4173+ Match Character Note
4174+ </small>
4175+ </label>
4176+ <label title="If the entry key consists of only one word, it would not be matched as part of other words" data-i18n="[title]If the entry key consists of only one word, it would not be matched as part of other words" class="checkbox_label flex1">
4177+ <input id="world_info_match_whole_words" type="checkbox" />
4178+ <small data-i18n="Match Whole Words" class="whitespacenowrap flex1">
4179+ Match Scenario
4180+ </small>
4181+ </label>
4182+ <label title="If the entry key consists of only one word, it would not be matched as part of other words" data-i18n="[title]If the entry key consists of only one word, it would not be matched as part of other words" class="checkbox_label flex1">
4183+ <input id="world_info_match_characters_metadata" type="checkbox" />
4184+ <small data-i18n="Match Characters Metadata" class="whitespacenowrap flex1">
4185+ Match Characters Metadata
4186+ </small>
4187+ </label>
4188+ </div>
4189+
4190+ <hr class="width100p">
4191+ <div class="flex-container flexFlowColumn flexGrow flexShrink flexBasis48p">
4192+ <small class="textAlignCenter" data-i18n="Miscelaneous">
4193+ Miscelaneous
4194+ </small>
4195+ <label title="Include names with each message into the context for scanning" data-i18n="[title]Include names with each message into the context for scanning" class="checkbox_label flex1">
4196+ <input id="world_info_include_names" type="checkbox" />
4197+ <small data-i18n="Include Names" class="whitespacenowrap flex1">
4198+ Include Names
4199+ </small>
4200+ </label>
4201+ <label title="Entries can activate other entries by mentioning their keywords" data-i18n="[title]Entries can activate other entries by mentioning their keywords" class="checkbox_label flex1">
4202+ <input id="world_info_recursive" type="checkbox" />
4203+ <small data-i18n="Recursive Scan" class="whitespacenowrap flex1">
4204+ Recursive Scan
4205+ </small>
4206+ </label>
41714207 <label title="Only the entries with the most number of key matches will be selected for Inclusion Group filtering" data-i18n="[title]Only the entries with the most number of key matches will be selected for Inclusion Group filtering" class="checkbox_label flex1">
41724208 <input id="world_info_use_group_scoring" type="checkbox" />
41734209 <small data-i18n="Use Group Scoring" class="whitespacenowrap flex1">
@@ -4181,6 +4217,19 @@
41814217 </small>
41824218 </label>
41834219 </div>
4220+
4221+ <hr class="width100p">
4222+ <div class="alignitemscenter flex-container flexFlowColumn flexGrow flexShrink flexBasis48p">
4223+ <small data-i18n="Insertion Strategy">
4224+ Insertion Strategy
4225+ </small>
4226+ <select id="world_info_character_strategy" class="flexGrow margin0">
4227+ <option value="0" data-i18n="Sorted Evenly">Sorted Evenly</option>
4228+ <option value="1" data-i18n="Character Lore First">Character Lore First</option>
4229+ <option value="2" data-i18n="Global Lore First">Global Lore First</option>
4230+ </select>
4231+ </div>
4232+
41844233 </div>
41854234 </div>
41864235 </div>
@@ -6087,47 +6136,9 @@
60876136 </button>
60886137 </div>
60896138 </div>
6090- <div name="perEntryOverridesBlock" class="flex-container wide100p alignitemscenter">
6139+
6091- <div class="world_entry_form_control flex1">
6140+
6092- <small class="textAlignCenter" data-i18n="Scan Depth">Scan Depth</small>
6141+
6093- <input class="text_pole margin0" name="scanDepth" type="number" placeholder="Use global setting" data-i18n="[placeholder]Use global setting" max="1000">
6094- </div>
6095- <div class="world_entry_form_control flex1">
6096- <small class="textAlignCenter" data-i18n="Case-Sensitive">Case-Sensitive</small>
6097- <select name="caseSensitive" class="text_pole widthNatural margin0">
6098- <option value="null" data-i18n="Use global">Use global</option>
6099- <option value="true" data-i18n="Yes">Yes</option>
6100- <option value="false" data-i18n="No">No</option>
6101- </select>
6102- </div>
6103- <div class="world_entry_form_control flex1">
6104- <small class="textAlignCenter" data-i18n="Whole Words">Whole Words</small>
6105- <select name="matchWholeWords" class="text_pole widthNatural margin0">
6106- <option value="null" data-i18n="Use global">Use global</option>
6107- <option value="true" data-i18n="Yes">Yes</option>
6108- <option value="false" data-i18n="No">No</option>
6109- </select>
6110- </div>
6111- <div class="world_entry_form_control flex1">
6112- <small class="textAlignCenter" data-i18n="Group Scoring">Group Scoring</small>
6113- <select name="useGroupScoring" class="text_pole widthNatural margin0">
6114- <option value="null" data-i18n="Use global">Use global</option>
6115- <option value="true" data-i18n="Yes">Yes</option>
6116- <option value="false" data-i18n="No">No</option>
6117- </select>
6118- </div>
6119- <div class="world_entry_form_control flex1" title="Can be used to automatically activate Quick Replies" data-i18n="[title]Can be used to automatically activate Quick Replies">
6120- <small class="textAlignCenter" data-i18n="Automation ID">Automation ID</small>
6121- <input class="text_pole margin0" name="automationId" type="text" placeholder="( None )" data-i18n="[placeholder]( None )">
6122- </div>
6123- <div class="world_entry_form_control flex1" title="Defines delay levels for recursive scans.&#13;&#13;Initially, only the first level (smallest number) will match.&#13;Once no matches are found, the next level becomes eligible for matching.&#13;This repeats until all levels are checked.&#13;&#13;Tied to the &quot;Delay until recursion&quot; setting." data-i18n="[title]delay_until_recursion_level">
6124- <small class="textAlignCenter">
6125- <span data-i18n="Recursion Level">Recursion Level</span>
6126- <div class="fa-solid fa-circle-info opacity50p"></div>
6127- </small>
6128- <input class="text_pole margin0" name="delayUntilRecursionLevel" type="text" placeholder="1">
6129- </div>
6130- </div>
61316142 <div name="contentAndCharFilterBlock" class="world_entry_thin_controls flex2">
61326143 <div class="world_entry_form_control flex1">
61336144 <label for="content ">
@@ -6143,40 +6154,145 @@
61436154 (<span data-i18n="extension_token_counter">Tokens:</span>&nbsp; <span class="world_entry_form_token_counter" data-first-run="true">counting...</span>)&nbsp;
61446155 <span class="world_entry_form_uid_value" data-first-run="true"></span>
61456156 </span>
6146- <div>
6157+ </span>
6147- <label class="checkbox flex-container alignitemscenter flexNoGap">
6158+ </small>
6159+ <small class="displayNone">
6160+ <span data-i18n="What this keyword should mean to the AI, sent verbatim">
6161+ What this keyword should mean to the AI, sent verbatim
6162+ </span>
6163+ </small>
6164+ </label>
6165+ <textarea class="text_pole mdHotkeys" name="content" rows="8" data-i18n="[placeholder]What this keyword should mean to the AI, sent verbatim" placeholder="What this keyword should mean to the AI, sent verbatim"></textarea>
6166+ </div>
6167+ </div>
6168+ <div class="world_entry_thin_controls commentContainer">
6169+ </div>
6170+ </div>
6171+
6172+ <div class="inline-drawer wide100p flexFlowColumn">
6173+ <div class="inline-drawer-toggle inline-drawer-header userSettingsInnerExpandable">
6174+ <strong>Activation Settings</strong>
6175+ <div class="fa-solid fa-circle-chevron-down inline-drawer-icon down"></div>
6176+ </div>
6177+ <div class="inline-drawer-content flex-container flexFlowRow flexGap10">
6178+ <div class="flex1 flex-container flexFlowColumn flexGap10">
6179+ <div class="flex-container flexFlowRow alignItemsCenter justifySpaceBetween" title="Can be used to automatically activate Quick Replies" data-i18n="[title]Can be used to automatically activate Quick Replies">
6180+ <small class="flex1" data-i18n="Automation ID">Automation ID</small>
6181+ <input class="flex1 text_pole margin0" name="automationId" type="text" placeholder="( None )" data-i18n="[placeholder]( None )">
6182+ </div>
6183+ <small>
6184+ <label class="checkbox flex-container alignItemsCenter flexNoGap">
61486185 <input type="checkbox" name="exclude_recursion" />
61496186 <span data-i18n="Non-recursable (will not be activated by another)">
61506187 Non-recursable (will not be activated by another)
61516188 </span>
61526189 </label>
61536190 <label class="checkbox flex-container alignitemscenteralignItemsCenter flexNoGap">
61546191 <input type="checkbox" name="prevent_recursion" />
61556192 <span data-i18n="Prevent further recursion (this entry will not activate others)">
61566193 Prevent further recursion (will not activate others)
61576194 </span>
61586195 </label>
6159- <label class="checkbox flex-container alignitemscenter flexNoGap">
6196+ </small>
6197+ <div class="flex-container alignItemsCenter flexNoGap">
6198+ <small class="flex1" data-i18n="Scan Depth">Scan Depth</small>
6199+ <input class="text_pole margin0 flex1" name="scanDepth" type="number" placeholder="Use global setting" data-i18n="[placeholder]Use global setting" max="1000">
6200+ </div>
6201+ <div class="checkbox flex-container alignItemsCenter flexNoGap">
6202+ <small class="flex1" data-i18n="Case-Sensitive">Case-Sensitive</small>
6203+ <select name="caseSensitive" class="text_pole widthNatural margin0 flex1">
6204+ <option value="null" data-i18n="Use global">Use global</option>
6205+ <option value="true" data-i18n="Yes">Yes</option>
6206+ <option value="false" data-i18n="No">No</option>
6207+ </select>
6208+ </div>
6209+ <div class="checkbox flex-container alignItemsCenter flexNoGap">
6210+ <small class="flex1" data-i18n="Whole Words">Whole Words</small>
6211+ <select name="matchWholeWords" class="text_pole widthNatural margin0 flex1">
6212+ <option value="null" data-i18n="Use global">Use global</option>
6213+ <option value="true" data-i18n="Yes">Yes</option>
6214+ <option value="false" data-i18n="No">No</option>
6215+ </select>
6216+ </div>
6217+ <div class="checkbox flex-container alignItemsCenter flexNoGap">
6218+ <small class="flex1" data-i18n="Group Scoring">Group Scoring</small>
6219+ <select name="useGroupScoring" class="text_pole widthNatural margin0 flex1">
6220+ <option value="null" data-i18n="Use global">Use global</option>
6221+ <option value="true" data-i18n="Yes">Yes</option>
6222+ <option value="false" data-i18n="No">No</option>
6223+ </select>
6224+ </div>
6225+
6226+ <small>
6227+ <label class="checkbox flex-container alignItemsCenter flexNoGap">
61606228 <input type="checkbox" name="delay_until_recursion" />
61616229 <span data-i18n="Delay until recursion (can only be activated on recursive checking)">
61626230 Delay until recursion (can only be activated on recursive checking)
61636231 </span>
61646232 </label>
6165- </div>
6166- </span>
61676233 </small>
6168- <small class="displayNone">
6234+ <div class="world_entry_form_control_recursion_delay flex-container alignItemsCenter" title="Defines delay levels for recursive scans.&#13;&#13;Initially, only the first level (smallest number) will match.&#13;Once no matches are found, the next level becomes eligible for matching.&#13;This repeats until all levels are checked.&#13;&#13;Tied to the &quot;Delay until recursion&quot; setting." data-i18n="[title]delay_until_recursion_level">
6169- <span data-i18n="What this keyword should mean to the AI, sent verbatim">
6235+ <small class="flex1">
6170- What this keyword should mean to the AI, sent verbatim
6236+ <span data-i18n="Recursion Level">Recursion Level</span>
6171- </span>
6237+ <div class="fa-solid fa-circle-info opacity50p"></div>
61726238 </small>
6173- </label>
6239+ <input class="flex1 text_pole margin0" name="delayUntilRecursionLevel" type="text" placeholder="1">
6174- <textarea class="text_pole mdHotkeys" name="content" rows="8" data-i18n="[placeholder]What this keyword should mean to the AI, sent verbatim" placeholder="What this keyword should mean to the AI, sent verbatim"></textarea>
61756240 </div>
61766241 </div>
6177- <div class="world_entry_thin_controls commentContainer">
6242+
6243+ <div class="flex1 flex-container flexFlowColumn flexGap10">
6244+ <div class="checkbox flex-container alignItemsCenter flexNoGap">
6245+ <small class="flex1" data-i18n="Match Persona Description">Match Persona Description</small>
6246+ <select name="matchPersonaDescription" class="text_pole widthNatural margin0 flex1">
6247+ <option value="null" data-i18n="Use global">Use global</option>
6248+ <option value="true" data-i18n="Yes">Yes</option>
6249+ <option value="false" data-i18n="No">No</option>
6250+ </select>
6251+ </div>
6252+ <div class="checkbox flex-container alignItemsCenter flexNoGap">
6253+ <small class="flex1" data-i18n="Match Character Description">Match Character Description</small>
6254+ <select name="matchCharacterDescription" class="text_pole widthNatural margin0 flex1">
6255+ <option value="null" data-i18n="Use global">Use global</option>
6256+ <option value="true" data-i18n="Yes">Yes</option>
6257+ <option value="false" data-i18n="No">No</option>
6258+ </select>
6259+ </div>
6260+ <div class="checkbox flex-container alignItemsCenter flexNoGap">
6261+ <small class="flex1" data-i18n="Match Character Personality">Match Character Personality</small>
6262+ <select name="matchCharacterPersonality" class="text_pole widthNatural margin0 flex1">
6263+ <option value="null" data-i18n="Use global">Use global</option>
6264+ <option value="true" data-i18n="Yes">Yes</option>
6265+ <option value="false" data-i18n="No">No</option>
6266+ </select>
6267+ </div>
6268+ <div class="checkbox flex-container alignItemsCenter flexNoGap">
6269+ <small class="flex1" data-i18n="Match Character Note">Match Character Note</small>
6270+ <select name="matchCharacterNote" class="text_pole widthNatural margin0 flex1">
6271+ <option value="null" data-i18n="Use global">Use global</option>
6272+ <option value="true" data-i18n="Yes">Yes</option>
6273+ <option value="false" data-i18n="No">No</option>
6274+ </select>
6275+ </div>
6276+ <div class="checkbox flex-container alignItemsCenter flexNoGap">
6277+ <small class="flex1" data-i18n="Match Scenario">Match Scenario</small>
6278+ <select name="matchScenario" class="text_pole widthNatural margin0 flex1">
6279+ <option value="null" data-i18n="Use global">Use global</option>
6280+ <option value="true" data-i18n="Yes">Yes</option>
6281+ <option value="false" data-i18n="No">No</option>
6282+ </select>
6283+ </div>
6284+ <div class="checkbox flex-container alignItemsCenter flexNoGap">
6285+ <small class="flex1" data-i18n="Match Character Metadata">Match Character Metadata</small>
6286+ <select name="matchCharacterMetadata" class="text_pole widthNatural margin0 flex1">
6287+ <option value="null" data-i18n="Use global">Use global</option>
6288+ <option value="true" data-i18n="Yes">Yes</option>
6289+ <option value="false" data-i18n="No">No</option>
6290+ </select>
61786291 </div>
61796292 </div>
6293+ </div>
6294+ </div>
6295+
61806296 <div class="flex-container wide100p flexGap10">
61816297 <div class="flex4 flex-container flexFlowColumn flexNoGap">
61826298 <div class="flex-container justifySpaceBetween">