Merge pull request #3593 from SillyTavern/tc-missing-samplers-on-restore Add missing samplers to TC restore preset

155956f45b4a892c74f4f471b72c7e99eda3218e

Cohee <18619528+Cohee1207@users.noreply.github.com>

Signed
1 files changed, +4 -2Showing whitespace changes
public/scripts/textgen-settings.js+4 -2
@@ -803,16 +803,18 @@ jQuery(function () {
803 'dry_penalty_last_n_textgenerationwebui': 0,803 'dry_penalty_last_n_textgenerationwebui': 0,
804 'xtc_threshold_textgenerationwebui': 0.1,804 'xtc_threshold_textgenerationwebui': 0.1,
805 'xtc_probability_textgenerationwebui': 0,805 'xtc_probability_textgenerationwebui': 0,
806 'nsigma_textgenerationwebui': 0,
806 };807 };
807808
808 for (const [id, value] of Object.entries(inputs)) {809 for (const [id, value] of Object.entries(inputs)) {
809 const inputElement = $(`#${id}`);810 const inputElement = $(`#${id}`);
811 const valueToSet = typeof value === 'boolean' ? String(value) : value;
810 if (inputElement.prop('type') === 'checkbox') {812 if (inputElement.prop('type') === 'checkbox') {
811 inputElement.prop('checked', value).trigger('input');813 inputElement.prop('checked', value).trigger('input');
812 } else if (inputElement.prop('type') === 'number') {814 } else if (inputElement.prop('type') === 'number') {
813 inputElement.val(value).trigger('input');815 inputElement.val(valueToSet).trigger('input');
814 } else {816 } else {
815 inputElement.val(value).trigger('input');817 inputElement.val(valueToSet).trigger('input');
816 if (power_user.enableZenSliders) {818 if (power_user.enableZenSliders) {
817 let masterElementID = inputElement.prop('id');819 let masterElementID = inputElement.prop('id');
818 console.log(masterElementID);820 console.log(masterElementID);