initial reversion commit

8e1dad680033c1bfb9e2c169b0eaecfb36643801

RossAscends <124905043+RossAscends@users.noreply.github.com>

6 files changed, +68 -42Ignore whitespace
public/index.html+22 -22
@@ -3089,14 +3089,14 @@
3089 <small data-i18n="Story String">Story String</small>3089 <small data-i18n="Story String">Story String</small>
3090 <i class="editor_maximize fa-solid fa-maximize right_menu_button" data-for="context_story_string" title="Expand the editor" data-i18n="[title]Expand the editor"></i>3090 <i class="editor_maximize fa-solid fa-maximize right_menu_button" data-for="context_story_string" title="Expand the editor" data-i18n="[title]Expand the editor"></i>
3091 </label>3091 </label>
3092 <div contenteditable="true" id="context_story_string" class="text_pole textarea_compact"></div>3092 <textarea id="context_story_string" class="text_pole textarea_compact autoSetHeight"></textarea>
3093 <div class="flex-container">3093 <div class="flex-container">
3094 <div class="flex1">3094 <div class="flex1">
3095 <label for="context_example_separator">3095 <label for="context_example_separator">
3096 <small data-i18n="Example Separator">Example Separator</small>3096 <small data-i18n="Example Separator">Example Separator</small>
3097 </label>3097 </label>
3098 <div>3098 <div>
3099 <div contenteditable="true" id="context_example_separator" class="text_pole textarea_compact"></div>3099 <textarea id="context_example_separator" class="text_pole textarea_compact autoSetHeight"></textarea>
3100 </div>3100 </div>
3101 </div>3101 </div>
3102 <div class="flex1">3102 <div class="flex1">
@@ -3104,7 +3104,7 @@
3104 <small data-i18n="Chat Start">Chat Start</small>3104 <small data-i18n="Chat Start">Chat Start</small>
3105 </label>3105 </label>
3106 <div>3106 <div>
3107 <div contenteditable="true" id="context_chat_start" class="text_pole textarea_compact"></div>3107 <textarea id="context_chat_start" class="text_pole textarea_compact autoSetHeight"></textarea>
3108 </div>3108 </div>
3109 </div>3109 </div>
3110 </div>3110 </div>
@@ -3182,7 +3182,7 @@
3182 </small>3182 </small>
3183 </div>3183 </div>
3184 <div>3184 <div>
3185 <div contenteditable="true" id="custom_stopping_strings" class="text_pole textarea_compact monospace"></div>3185 <textarea id="custom_stopping_strings" class="text_pole textarea_compact monospace autoSetHeight"></textarea>
3186 </div>3186 </div>
3187 <label class="checkbox_label" for="custom_stopping_strings_macro">3187 <label class="checkbox_label" for="custom_stopping_strings_macro">
3188 <input id="custom_stopping_strings_macro" type="checkbox" checked>3188 <input id="custom_stopping_strings_macro" type="checkbox" checked>
@@ -3241,7 +3241,7 @@
3241 <small data-i18n="System Prompt">System Prompt</small>3241 <small data-i18n="System Prompt">System Prompt</small>
3242 <i class="editor_maximize fa-solid fa-maximize right_menu_button" data-for="instruct_system_prompt" title="Expand the editor" data-i18n="[title]Expand the editor"></i>3242 <i class="editor_maximize fa-solid fa-maximize right_menu_button" data-for="instruct_system_prompt" title="Expand the editor" data-i18n="[title]Expand the editor"></i>
3243 </label>3243 </label>
3244 <div contenteditable="true" id="instruct_system_prompt" class="text_pole textarea_compact"></div>3244 <textarea id="instruct_system_prompt" class="text_pole textarea_compact autoSetHeight"></textarea>
3245 </div>3245 </div>
32463246
3247 <div>3247 <div>
@@ -3323,7 +3323,7 @@
3323 </span>3323 </span>
3324 </small>3324 </small>
3325 <div>3325 <div>
3326 <div contenteditable="true" id="start_reply_with" class="text_pole textarea_compact"></div>3326 <textarea id="start_reply_with" class="text_pole textarea_compact autoSetHeight"></textarea>
3327 </div>3327 </div>
3328 <label class="checkbox_label" for="chat-show-reply-prefix-checkbox">3328 <label class="checkbox_label" for="chat-show-reply-prefix-checkbox">
3329 <input id="chat-show-reply-prefix-checkbox" type="checkbox" />3329 <input id="chat-show-reply-prefix-checkbox" type="checkbox" />
@@ -3353,7 +3353,7 @@
3353 <small data-i18n="System Prompt Prefix">System Prompt Prefix</small>3353 <small data-i18n="System Prompt Prefix">System Prompt Prefix</small>
3354 </label>3354 </label>
3355 <div>3355 <div>
3356 <div contenteditable="true" id="instruct_system_sequence_prefix" class="text_pole textarea_compact"></div>3356 <textarea id="instruct_system_sequence_prefix" class="text_pole textarea_compact autoSetHeight"></textarea>
3357 </div>3357 </div>
3358 </div>3358 </div>
3359 <div class="flexAuto" title="Inserted after a System prompt." data-i18n="[title]Inserted after a System prompt.">3359 <div class="flexAuto" title="Inserted after a System prompt." data-i18n="[title]Inserted after a System prompt.">
@@ -3361,38 +3361,38 @@
3361 <small data-i18n="System Prompt Suffix">System Prompt Suffix</small>3361 <small data-i18n="System Prompt Suffix">System Prompt Suffix</small>
3362 </label>3362 </label>
3363 <div>3363 <div>
3364 <div contenteditable="true" id="instruct_system_sequence_suffix" class="text_pole wide100p textarea_compact"></div>3364 <textarea id="instruct_system_sequence_suffix" class="text_pole wide100p textarea_compact autoSetHeight"></textarea>
3365 </div>3365 </div>
3366 </div>3366 </div>
3367 </div>3367 </div>
3368 <div class="flex-container">3368 <div class="flex-container">
3369 <div class="flexAuto" title="Inserted before a User message and as a last prompt line when impersonating." data-i18n="[title]Inserted before a User message and as a last prompt line when impersonating.">3369 <div class="flexAuto" title="Inserted before a User message and as a last prompt line when impersonating." data-i18n="[title]Inserted before a User message and as a last prompt line when impersonating.">
3370 <small data-i18n="User Prefix">User Message Prefix</small>3370 <small data-i18n="User Prefix">User Message Prefix</small>
3371 <div contenteditable="true" id="instruct_input_sequence" class="text_pole textarea_compact"></div>3371 <textarea id="instruct_input_sequence" class="text_pole textarea_compact autoSetHeight"></textarea>
3372 </div>3372 </div>
3373 <div class="flexAuto" title="Inserted after a User message." data-i18n="[title]Inserted after a User message.">3373 <div class="flexAuto" title="Inserted after a User message." data-i18n="[title]Inserted after a User message.">
3374 <small data-i18n="User Suffix">User Message Suffix</small>3374 <small data-i18n="User Suffix">User Message Suffix</small>
3375 <div contenteditable="true" id="instruct_input_suffix" class="text_pole wide100p textarea_compact"></div>3375 <textarea id="instruct_input_suffix" class="text_pole wide100p textarea_compact autoSetHeight"></textarea>
3376 </div>3376 </div>
3377 </div>3377 </div>
3378 <div class="flex-container">3378 <div class="flex-container">
3379 <div class="flexAuto" title="Inserted before an Assistant message and as a last prompt line when generating an AI reply." data-i18n="[title]Inserted before an Assistant message and as a last prompt line when generating an AI reply.">3379 <div class="flexAuto" title="Inserted before an Assistant message and as a last prompt line when generating an AI reply." data-i18n="[title]Inserted before an Assistant message and as a last prompt line when generating an AI reply.">
3380 <small data-i18n="Assistant Prefix">Assistant Message Prefix</small>3380 <small data-i18n="Assistant Prefix">Assistant Message Prefix</small>
3381 <div contenteditable="true" id="instruct_output_sequence" class="text_pole wide100p textarea_compact"></div>3381 <textarea id="instruct_output_sequence" class="text_pole wide100p textarea_compact autoSetHeight"></textarea>
3382 </div>3382 </div>
3383 <div class="flexAuto" title="Inserted after an Assistant message." data-i18n="[title]Inserted after an Assistant message.">3383 <div class="flexAuto" title="Inserted after an Assistant message." data-i18n="[title]Inserted after an Assistant message.">
3384 <small data-i18n="Assistant Suffix">Assistant Message Suffix</small>3384 <small data-i18n="Assistant Suffix">Assistant Message Suffix</small>
3385 <div contenteditable="true" id="instruct_output_suffix" class="text_pole wide100p textarea_compact"></div>3385 <textarea id="instruct_output_suffix" class="text_pole wide100p textarea_compact autoSetHeight"></textarea>
3386 </div>3386 </div>
3387 </div>3387 </div>
3388 <div class="flex-container">3388 <div class="flex-container">
3389 <div class="flexAuto" id="instruct_system_sequence_block" title="Inserted before a System (added by slash commands or extensions) message." data-i18n="[title]Inserted before a System (added by slash commands or extensions) message.">3389 <div class="flexAuto" id="instruct_system_sequence_block" title="Inserted before a System (added by slash commands or extensions) message." data-i18n="[title]Inserted before a System (added by slash commands or extensions) message.">
3390 <small data-i18n="System Prefix">System Message Prefix</small>3390 <small data-i18n="System Prefix">System Message Prefix</small>
3391 <div contenteditable="true" id="instruct_system_sequence" class="text_pole textarea_compact"></div>3391 <textarea id="instruct_system_sequence" class="text_pole textarea_compact autoSetHeight"></textarea>
3392 </div>3392 </div>
3393 <div class="flexAuto" id="instruct_system_suffix_block" title="Inserted after a System message." data-i18n="[title]Inserted after a System message.">3393 <div class="flexAuto" id="instruct_system_suffix_block" title="Inserted after a System message." data-i18n="[title]Inserted after a System message.">
3394 <small data-i18n="System Suffix">System Message Suffix</small>3394 <small data-i18n="System Suffix">System Message Suffix</small>
3395 <div contenteditable="true" id="instruct_system_suffix" class="text_pole wide100p textarea_compact"></div>3395 <textarea id="instruct_system_suffix" class="text_pole wide100p textarea_compact autoSetHeight"></textarea>
3396 </div>3396 </div>
3397 </div>3397 </div>
3398 <div class="flexBasis100p" title="If enabled, System Sequences will be the same as User Sequences." data-i18n="[title]If enabled, System Sequences will be the same as User Sequences.">3398 <div class="flexBasis100p" title="If enabled, System Sequences will be the same as User Sequences." data-i18n="[title]If enabled, System Sequences will be the same as User Sequences.">
@@ -3408,37 +3408,37 @@
3408 <div class="flex-container">3408 <div class="flex-container">
3409 <div class="flexAuto" title="Inserted before the first Assistant's message." data-i18n="[title]Inserted before the first Assistant's message.">3409 <div class="flexAuto" title="Inserted before the first Assistant's message." data-i18n="[title]Inserted before the first Assistant's message.">
3410 <small data-i18n="First Assistant Prefix">First Assistant Prefix</small>3410 <small data-i18n="First Assistant Prefix">First Assistant Prefix</small>
3411 <div contenteditable="true" id="instruct_first_output_sequence" class="text_pole textarea_compact"></div>3411 <textarea id="instruct_first_output_sequence" class="text_pole textarea_compact autoSetHeight"></textarea>
3412 </div>3412 </div>
3413 <div class="flexAuto" title="Inserted before the last Assistant's message or as a last prompt line when generating an AI reply (except a neutral/system role)." data-i18n="[title]instruct_last_output_sequence">3413 <div class="flexAuto" title="Inserted before the last Assistant's message or as a last prompt line when generating an AI reply (except a neutral/system role)." data-i18n="[title]instruct_last_output_sequence">
3414 <small data-i18n="Last Assistant Prefix">Last Assistant Prefix</small>3414 <small data-i18n="Last Assistant Prefix">Last Assistant Prefix</small>
3415 <div contenteditable="true" id="instruct_last_output_sequence" class="text_pole wide100p textarea_compact"></div>3415 <textarea id="instruct_last_output_sequence" class="text_pole wide100p textarea_compact autoSetHeight"></textarea>
3416 </div>3416 </div>
3417 </div>3417 </div>
3418 <div class="flex-container">3418 <div class="flex-container">
3419 <div class="flexAuto" title="Inserted before the first User's message." data-i18n="[title]Inserted before the first User's message.">3419 <div class="flexAuto" title="Inserted before the first User's message." data-i18n="[title]Inserted before the first User's message.">
3420 <small data-i18n="First User Prefix">First User Prefix</small>3420 <small data-i18n="First User Prefix">First User Prefix</small>
3421 <div contenteditable="true" id="instruct_first_input_sequence" class="text_pole textarea_compact"></div>3421 <textarea id="instruct_first_input_sequence" class="text_pole textarea_compact autoSetHeight"></textarea>
3422 </div>3422 </div>
3423 <div class="flexAuto" title="Inserted before the last User's message." data-i18n="[title]instruct_last_input_sequence">3423 <div class="flexAuto" title="Inserted before the last User's message." data-i18n="[title]instruct_last_input_sequence">
3424 <small data-i18n="Last User Prefix">Last User Prefix</small>3424 <small data-i18n="Last User Prefix">Last User Prefix</small>
3425 <div contenteditable="true" id="instruct_last_input_sequence" class="text_pole wide100p textarea_compact"></div>3425 <textarea id="instruct_last_input_sequence" class="text_pole wide100p textarea_compact autoSetHeight"></textarea>
3426 </div>3426 </div>
3427 </div>3427 </div>
3428 <div class="flex-container">3428 <div class="flex-container">
3429 <div class="flexAuto" title="Will be inserted as a last prompt line when using system/neutral generation." data-i18n="[title]Will be inserted as a last prompt line when using system/neutral generation.">3429 <div class="flexAuto" title="Will be inserted as a last prompt line when using system/neutral generation." data-i18n="[title]Will be inserted as a last prompt line when using system/neutral generation.">
3430 <small data-i18n="System Instruction Prefix">System Instruction Prefix</small>3430 <small data-i18n="System Instruction Prefix">System Instruction Prefix</small>
3431 <div contenteditable="true" id="instruct_last_system_sequence" class="text_pole textarea_compact"></div>3431 <textarea id="instruct_last_system_sequence" class="text_pole textarea_compact autoSetHeight"></textarea>
3432 </div>3432 </div>
3433 <div class="flexAuto" title="If a stop sequence is generated, everything past it will be removed from the output (inclusive)." data-i18n="[title]If a stop sequence is generated, everything past it will be removed from the output (inclusive).">3433 <div class="flexAuto" title="If a stop sequence is generated, everything past it will be removed from the output (inclusive)." data-i18n="[title]If a stop sequence is generated, everything past it will be removed from the output (inclusive).">
3434 <small data-i18n="Stop Sequence">Stop Sequence</small>3434 <small data-i18n="Stop Sequence">Stop Sequence</small>
3435 <div contenteditable="true" id="instruct_stop_sequence" class="text_pole textarea_compact"></div>3435 <textarea id="instruct_stop_sequence" class="text_pole textarea_compact autoSetHeight"></textarea>
3436 </div>3436 </div>
3437 </div>3437 </div>
3438 <div class="flex-container">3438 <div class="flex-container">
3439 <div class="flexAuto" title="Will be inserted at the start of the chat history if it doesn't start with a User message." data-i18n="[title]Will be inserted at the start of the chat history if it doesn't start with a User message.">3439 <div class="flexAuto" title="Will be inserted at the start of the chat history if it doesn't start with a User message." data-i18n="[title]Will be inserted at the start of the chat history if it doesn't start with a User message.">
3440 <small data-i18n="User Filler Message">User Filler Message</small>3440 <small data-i18n="User Filler Message">User Filler Message</small>
3441 <div contenteditable="true" id="instruct_user_alignment_message" class="text_pole textarea_compact"></div>3441 <textarea id="instruct_user_alignment_message" class="text_pole textarea_compact autoSetHeight"></textarea>
3442 </div>3442 </div>
3443 </div>3443 </div>
3444 </div>3444 </div>
@@ -6504,4 +6504,4 @@
6504 </script>6504 </script>
6505</body>6505</body>
65066506
6507</html>6507</html>
\ No newline at end of file6507 \ No newline at end of file
public/script.js+16 -8
@@ -10577,6 +10577,9 @@ jQuery(async function () {
10577 stopScriptExecution();10577 stopScriptExecution();
10578 });10578 });
1057910579
10580 const chromeUaIdx = navigator.userAgent.lastIndexOf('Chrome/');
10581 const chromeVersion = navigator.userAgent.substring(chromeUaIdx + 7, navigator.userAgent.indexOf('.', chromeUaIdx));
10582
10580 $('.drawer-toggle').on('click', function () {10583 $('.drawer-toggle').on('click', function () {
10581 var icon = $(this).find('.drawer-icon');10584 var icon = $(this).find('.drawer-icon');
10582 var drawer = $(this).parent().find('.drawer-content');10585 var drawer = $(this).parent().find('.drawer-content');
@@ -10616,10 +10619,13 @@ jQuery(async function () {
10616 }10619 }
1061710620
10618 // Set the height of "autoSetHeight" textareas within the drawer to their scroll height10621 // Set the height of "autoSetHeight" textareas within the drawer to their scroll height
10619 $(this).closest('.drawer').find('.drawer-content textarea.autoSetHeight').each(async function () {10622
10620 await resetScrollHeight($(this));10623 if (chromeUaIdx == -1 || Number(chromeVersion) < 123) {
10621 return;10624 $(this).closest('.drawer').find('.drawer-content textarea.autoSetHeight').each(async function () {
10622 });10625 await resetScrollHeight($(this));
10626 return;
10627 });
10628 }
1062310629
10624 } else if (drawerWasOpenAlready) { //to close manually10630 } else if (drawerWasOpenAlready) { //to close manually
10625 icon.toggleClass('closedIcon openIcon');10631 icon.toggleClass('closedIcon openIcon');
@@ -10691,10 +10697,12 @@ jQuery(async function () {
10691 $(this).closest('.inline-drawer').find('.inline-drawer-content').stop().slideToggle();10697 $(this).closest('.inline-drawer').find('.inline-drawer-content').stop().slideToggle();
1069210698
10693 // Set the height of "autoSetHeight" textareas within the inline-drawer to their scroll height10699 // Set the height of "autoSetHeight" textareas within the inline-drawer to their scroll height
10694 $(this).closest('.inline-drawer').find('.inline-drawer-content textarea.autoSetHeight').each(async function () {10700 if (chromeUaIdx == -1 || Number(chromeVersion) < 123) {
10695 await resetScrollHeight($(this));10701 $(this).closest('.inline-drawer').find('.inline-drawer-content textarea.autoSetHeight').each(async function () {
10696 return;10702 await resetScrollHeight($(this));
10697 });10703 return;
10704 });
10705 }
10698 });10706 });
1069910707
10700 $(document).on('click', '.inline-drawer-maximize', function () {10708 $(document).on('click', '.inline-drawer-maximize', function () {
public/scripts/instruct-mode.js+10 -4
@@ -7,7 +7,7 @@ import {
7 power_user,7 power_user,
8 context_presets,8 context_presets,
9} from './power-user.js';9} from './power-user.js';
10import { regexFromString } from './utils.js';10import { regexFromString, resetScrollHeight } from './utils.js';
1111
12/**12/**
13 * @type {any[]} Instruct mode presets.13 * @type {any[]} Instruct mode presets.
@@ -42,6 +42,9 @@ const controls = [
42 { id: 'instruct_system_same_as_user', property: 'system_same_as_user', isCheckbox: true, trigger: true },42 { id: 'instruct_system_same_as_user', property: 'system_same_as_user', isCheckbox: true, trigger: true },
43];43];
4444
45const chromeUaIdx = navigator.userAgent.lastIndexOf('Chrome/');
46const chromeVersion = navigator.userAgent.substring(chromeUaIdx + 7, navigator.userAgent.indexOf('.', chromeUaIdx));
47
45/**48/**
46 * Migrates instruct mode settings into the evergreen format.49 * Migrates instruct mode settings into the evergreen format.
47 * @param {object} settings Instruct mode settings.50 * @param {object} settings Instruct mode settings.
@@ -95,11 +98,14 @@ export async function loadInstructMode(data) {
95 if (control.isCheckbox) {98 if (control.isCheckbox) {
96 $element.prop('checked', power_user.instruct[control.property]);99 $element.prop('checked', power_user.instruct[control.property]);
97 } else {100 } else {
98 $element[0].innerText = (power_user.instruct[control.property]);101 $element.val(power_user.instruct[control.property]);
99 }102 }
100103
101 $element.on('input', async function () {104 $element.on('input', async function () {
102 power_user.instruct[control.property] = control.isCheckbox ? !!$(this).prop('checked') : $(this)[0].innerText;105 power_user.instruct[control.property] = control.isCheckbox ? !!$(this).prop('checked') : $(this).val;
106 if (chromeUaIdx == -1 || Number(chromeVersion) < 123) {
107 await resetScrollHeight($(this));
108 }
103 saveSettingsDebounced();109 saveSettingsDebounced();
104 });110 });
105111
@@ -663,7 +669,7 @@ jQuery(() => {
663 if (control.isCheckbox) {669 if (control.isCheckbox) {
664 $element.prop('checked', power_user.instruct[control.property]).trigger('input');670 $element.prop('checked', power_user.instruct[control.property]).trigger('input');
665 } else {671 } else {
666 $element[0].innerText = (power_user.instruct[control.property]);672 $element.val(power_user.instruct[control.property]);
667 $element.trigger('input');673 $element.trigger('input');
668 }674 }
669 }675 }
public/scripts/power-user.js+13 -7
@@ -105,6 +105,9 @@ export const persona_description_positions = {
105 NONE: 9,105 NONE: 9,
106};106};
107107
108const chromeUaIdx = navigator.userAgent.lastIndexOf('Chrome/');
109const chromeVersion = navigator.userAgent.substring(chromeUaIdx + 7, navigator.userAgent.indexOf('.', chromeUaIdx));
110
108let power_user = {111let power_user = {
109 tokenizer: tokenizers.BEST_MATCH,112 tokenizer: tokenizers.BEST_MATCH,
110 token_padding: 64,113 token_padding: 64,
@@ -1740,20 +1743,23 @@ async function loadContextSettings() {
1740 if (control.isCheckbox) {1743 if (control.isCheckbox) {
1741 $element.prop('checked', power_user.context[control.property]);1744 $element.prop('checked', power_user.context[control.property]);
1742 } else {1745 } else {
1743 $element[0].innerText = power_user.context[control.property];1746 $element.val(power_user.context[control.property]);
1744 }1747 }
1745 console.log(`Setting ${$element.prop('id')} to ${power_user.context[control.property]}`);1748 console.log(`Setting ${$element.prop('id')} to ${power_user.context[control.property]}`);
17461749
1747 // If the setting already exists, no need to duplicate it1750 // If the setting already exists, no need to duplicate it
1748 // TODO: Maybe check the power_user object for the setting instead of a flag?1751 // TODO: Maybe check the power_user object for the setting instead of a flag?
1749 $element.on('input keyup', async function () {1752 $element.on('input', async function () {
1750 const value = control.isCheckbox ? !!$(this).prop('checked') : $(this)[0].innerText;1753 const value = control.isCheckbox ? !!$(this).prop('checked') : $(this).val();
1751 if (control.isGlobalSetting) {1754 if (control.isGlobalSetting) {
1752 power_user[control.property] = value;1755 power_user[control.property] = value;
1753 } else {1756 } else {
1754 power_user.context[control.property] = value;1757 power_user.context[control.property] = value;
1755 }1758 }
17561759 console.log(`Setting ${$element.prop('id')} to ${value}`);
1760 if (chromeUaIdx == -1 || Number(chromeVersion) < 123) {
1761 await resetScrollHeight($(this));
1762 }
1757 saveSettingsDebounced();1763 saveSettingsDebounced();
1758 });1764 });
1759 });1765 });
@@ -1793,7 +1799,7 @@ async function loadContextSettings() {
1793 .prop('checked', control.isGlobalSetting ? power_user[control.property] : power_user.context[control.property])1799 .prop('checked', control.isGlobalSetting ? power_user[control.property] : power_user.context[control.property])
1794 .trigger('input');1800 .trigger('input');
1795 } else {1801 } else {
1796 $element[0].innerText = (control.isGlobalSetting ? power_user[control.property] : power_user.context[control.property]);1802 $element.val(control.isGlobalSetting ? power_user[control.property] : power_user.context[control.property]);
1797 $element.trigger('input');1803 $element.trigger('input');
1798 }1804 }
1799 }1805 }
@@ -3096,7 +3102,7 @@ $(document).ready(() => {
3096 });3102 });
30973103
3098 $('#start_reply_with').on('input', function () {3104 $('#start_reply_with').on('input', function () {
3099 power_user.user_prompt_bias = String($(this)[0].innerText);3105 power_user.user_prompt_bias = String($(this).val);
3100 saveSettingsDebounced();3106 saveSettingsDebounced();
3101 });3107 });
31023108
@@ -3628,7 +3634,7 @@ $(document).ready(() => {
3628 });3634 });
36293635
3630 $('#custom_stopping_strings').on('input', function () {3636 $('#custom_stopping_strings').on('input', function () {
3631 power_user.custom_stopping_strings = String($(this)[0].innerText).trim();3637 power_user.custom_stopping_strings = String($(this).val).trim();
3632 saveSettingsDebounced();3638 saveSettingsDebounced();
3633 });3639 });
36343640
public/scripts/utils.js+6 -1
@@ -2027,8 +2027,13 @@ export function toggleDrawer(drawer, expand = true) {
2027 content.style.display = 'none';2027 content.style.display = 'none';
2028 }2028 }
20292029
2030 const chromeUaIdx = navigator.userAgent.lastIndexOf('Chrome/');
2031 const chromeVersion = navigator.userAgent.substring(chromeUaIdx + 7, navigator.userAgent.indexOf('.', chromeUaIdx));
2032
2030 // Set the height of "autoSetHeight" textareas within the inline-drawer to their scroll height2033 // Set the height of "autoSetHeight" textareas within the inline-drawer to their scroll height
2031 content.querySelectorAll('textarea.autoSetHeight').forEach(resetScrollHeight);2034 if (chromeUaIdx == -1 || Number(chromeVersion) < 123) {
2035 content.querySelectorAll('textarea.autoSetHeight').forEach(resetScrollHeight);
2036 }
2032}2037}
20332038
2034export async function fetchFaFile(name) {2039export async function fetchFaFile(name) {
public/style.css+1 -0
@@ -1176,6 +1176,7 @@ textarea {
1176textarea.autoSetHeight {1176textarea.autoSetHeight {
1177 max-height: 50vh;1177 max-height: 50vh;
1178 max-height: 50dvh;1178 max-height: 50dvh;
1179 field-sizing: content;
1179}1180}
11801181
1181input,1182input,