mirror of
https://github.com/SillyTavern/SillyTavern.git
synced 2025-06-05 21:59:27 +02:00
Feature renamed to Max Recursion Steps
This commit is contained in:
@@ -3637,11 +3637,11 @@
|
||||
</div>
|
||||
<div class="alignitemscenter flex-container flexFlowColumn flexGrow flexShrink gap0 flexBasis48p" title="Cap the number of entry activation recursions" data-i18n="[title]Cap the number of entry activation recursions">
|
||||
<small>
|
||||
<span data-i18n="Max Recursion Depth">Max Recursion Depth</span>
|
||||
<span data-i18n="Max Recursion Depth">Max Recursion Steps</span>
|
||||
<div class="fa-solid fa-circle-info opacity50p" data-i18n="[title](0 = unlimited, 1 = scans once and doesn't recurse, 2 = scans once and recurses once, etc)" title="(0 = unlimited, 1 = scans once and doesn't recurse, 2 = scans once and recurses once, etc)"></div>
|
||||
</small>
|
||||
<input class="neo-range-slider" type="range" id="world_info_max_recursion_depth" name="world_info_max_recursion_depth" min="0" max="10" step="1">
|
||||
<input class="neo-range-input" type="number" min="0" max="10" step="1" data-for="world_info_max_recursion_depth" id="world_info_max_recursion_depth_counter">
|
||||
<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">
|
||||
<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">
|
||||
</div>
|
||||
|
||||
<div class="alignitemscenter flex-container flexFlowColumn flexGrow flexShrink flexBasis48p">
|
||||
|
@@ -73,7 +73,7 @@ export let world_info_match_whole_words = false;
|
||||
export let world_info_use_group_scoring = false;
|
||||
export let world_info_character_strategy = world_info_insertion_strategy.character_first;
|
||||
export let world_info_budget_cap = 0;
|
||||
export let world_info_max_recursion_depth = 0;
|
||||
export let world_info_max_recursion_steps = 0;
|
||||
const saveWorldDebounced = debounce(async (name, data) => await _save(name, data), debounce_timeout.relaxed);
|
||||
const saveSettingsDebounced = debounce(() => {
|
||||
Object.assign(world_info, { globalSelect: selected_world_info });
|
||||
@@ -711,7 +711,7 @@ export function getWorldInfoSettings() {
|
||||
world_info_character_strategy,
|
||||
world_info_budget_cap,
|
||||
world_info_use_group_scoring,
|
||||
world_info_max_recursion_depth,
|
||||
world_info_max_recursion_steps,
|
||||
};
|
||||
}
|
||||
|
||||
@@ -798,8 +798,8 @@ export function setWorldInfoSettings(settings, data) {
|
||||
world_info_budget_cap = Number(settings.world_info_budget_cap);
|
||||
if (settings.world_info_use_group_scoring !== undefined)
|
||||
world_info_use_group_scoring = Boolean(settings.world_info_use_group_scoring);
|
||||
if (settings.world_info_max_recursion_depth !== undefined)
|
||||
world_info_max_recursion_depth = Number(settings.world_info_max_recursion_depth);
|
||||
if (settings.world_info_max_recursion_steps !== undefined)
|
||||
world_info_max_recursion_steps = Number(settings.world_info_max_recursion_steps);
|
||||
|
||||
// Migrate old settings
|
||||
if (world_info_budget > 100) {
|
||||
@@ -848,8 +848,8 @@ export function setWorldInfoSettings(settings, data) {
|
||||
$('#world_info_budget_cap').val(world_info_budget_cap);
|
||||
$('#world_info_budget_cap_counter').val(world_info_budget_cap);
|
||||
|
||||
$('#world_info_max_recursion_depth').val(world_info_max_recursion_depth);
|
||||
$('#world_info_max_recursion_depth_counter').val(world_info_max_recursion_depth);
|
||||
$('#world_info_max_recursion_steps').val(world_info_max_recursion_steps);
|
||||
$('#world_info_max_recursion_steps_counter').val(world_info_max_recursion_steps);
|
||||
|
||||
world_names = data.world_names?.length ? data.world_names : [];
|
||||
|
||||
@@ -3730,8 +3730,8 @@ export async function checkWorldInfo(chat, maxContext, isDryRun) {
|
||||
console.debug(`[WI] --- SEARCHING ENTRIES (on ${sortedEntries.length} entries) ---`);
|
||||
|
||||
while (scanState) {
|
||||
//if world_info_max_recursion_depth is non-zero min activations are disabled, and vice versa
|
||||
if (world_info_max_recursion_depth && world_info_max_recursion_depth <= count) {
|
||||
//if world_info_max_recursion_steps is non-zero min activations are disabled, and vice versa
|
||||
if (world_info_max_recursion_steps && world_info_max_recursion_steps <= count) {
|
||||
break;
|
||||
}
|
||||
|
||||
@@ -4777,7 +4777,7 @@ jQuery(() => {
|
||||
$('#world_info_min_activations_counter').val(world_info_min_activations);
|
||||
|
||||
if (world_info_min_activations !== 0) {
|
||||
$('#world_info_max_recursion_depth').val(0).trigger("input");
|
||||
$('#world_info_max_recursion_steps').val(0).trigger("input");
|
||||
} else {
|
||||
saveSettings();
|
||||
}
|
||||
@@ -4836,10 +4836,10 @@ jQuery(() => {
|
||||
saveSettings();
|
||||
});
|
||||
|
||||
$('#world_info_max_recursion_depth').on('input', function () {
|
||||
world_info_max_recursion_depth = Number($(this).val());
|
||||
$('#world_info_max_recursion_depth_counter').val(world_info_max_recursion_depth);
|
||||
if (world_info_max_recursion_depth !== 0) {
|
||||
$('#world_info_max_recursion_steps').on('input', function () {
|
||||
world_info_max_recursion_steps = Number($(this).val());
|
||||
$('#world_info_max_recursion_steps_counter').val(world_info_max_recursion_steps);
|
||||
if (world_info_max_recursion_steps !== 0) {
|
||||
$('#world_info_min_activations').val(0).trigger("input");
|
||||
} else {
|
||||
saveSettings();
|
||||
|
Reference in New Issue
Block a user