mirror of
https://github.com/SillyTavern/SillyTavern.git
synced 2025-06-05 21:59:27 +02:00
Set rep pen range unlocked for bigger max context
This commit is contained in:
@ -878,13 +878,16 @@ function loadMaxContextUnlocked() {
|
||||
}
|
||||
|
||||
function switchMaxContextSize() {
|
||||
const element = $('#max_context');
|
||||
const elements = [$('#max_context'), $('#rep_pen_range'), $('#rep_pen_range_textgenerationwebui')];
|
||||
const maxValue = power_user.max_context_unlocked ? MAX_CONTEXT_UNLOCKED : MAX_CONTEXT_DEFAULT;
|
||||
element.attr('max', maxValue);
|
||||
const value = Number(element.val());
|
||||
|
||||
if (value >= maxValue) {
|
||||
element.val(maxValue).trigger('input');
|
||||
for (const element of elements) {
|
||||
element.attr('max', maxValue);
|
||||
const value = Number(element.val());
|
||||
|
||||
if (value >= maxValue) {
|
||||
element.val(maxValue).trigger('input');
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user