AF panel 3column reshuffle, autoComplete to UserSettings, collaspify Auto* settings

a764e2d6bf68758af6191cf9bd02b2bda6ae99c5

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

5 files changed, +347 -372Showing whitespace changes
public/css/mobile-styles.css+0 -1
@@ -344,7 +344,6 @@
344344
345345@media screen and (min-width: 1001px) {
346346
347- #PygOverrides,
348347 #ContextFormatting,
349348 #UI-Theme-Block,
350349 #UI-Customization,
public/css/st-tailwind.css+6 -1
@@ -360,6 +360,10 @@
360360 margin-right: 2px;
361361}
362362
363+.flexAuto {
364+ flex: auto;
365+}
366+
363367.flex0 {
364368 flex: 0;
365369}
@@ -490,7 +494,8 @@
490494}
491495
492496input:disabled,
493497textarea:disabled {,
498+.disabled {
494499 cursor: not-allowed;
495500 filter: brightness(0.5);
496501}
public/index.html+294 -365
@@ -3033,8 +3033,8 @@
30333033 <h3 class="margin0" data-i18n="Advanced Formatting">
30343034 Advanced Formatting
30353035 </h3>
30363036 <div class="flex-container spaceEvenly">
30373037 <div id="PygOverridesContextSettings" class="flex-container flexNoGap flexFlowColumn flex1">
30383038 <div>
30393039 <h4 class="standoutHeader title_restorable">
30403040 <div>
@@ -3043,19 +3043,21 @@
30433043 <span class="fa-solid fa-circle-question note-link-span"></span>
30443044 </a>
30453045 </div>
3046- <div class="flex-container">
3046+
3047- <i data-newbie-hidden data-preset-manager-import="context" class="margin0 menu_button fa-solid fa-file-import" title="Import preset" data-i18n="[title]Import preset"></i>
3048- <i data-newbie-hidden data-preset-manager-export="context" class="margin0 menu_button fa-solid fa-file-export" title="Export preset" data-i18n="[title]Export preset"></i>
3049- <i data-newbie-hidden data-preset-manager-restore="context" class="margin0 menu_button fa-solid fa-recycle" title="Restore current preset" data-i18n="[title]Restore current preset"></i>
3050- <i data-newbie-hidden id="context_delete_preset" data-preset-manager-delete="context" class="margin0 menu_button fa-solid fa-trash-can" title="Delete the preset" data-i18n="[title]Delete the preset"></i>
3051- </div>
30523047 </h4>
30533048 <div class="flex-container">
3054- <select id="context_presets" data-preset-manager-for="context" class="flex1 text_pole"></select>
3049+
30553050 <input type="file" hidden data-preset-manager-file="context" accept=".json, .settings">
30563051 <i id="context_set_default" class="menu_button fa-solid fa-heart" title="Auto-select this preset for Instruct Mode." data-i18n="[title]Auto-select this preset for Instruct Mode"></i>
30573052 <i data-newbie-hidden data-preset-manager-update="context" class="menu_button fa-solid fa-save" title="Update current preset" data-i18n="[title]Update current preset"></i>
30583053 <i data-newbie-hidden data-preset-manager-new="context" class="menu_button fa-solid fa-file-circle-plus" title="Save preset as" data-i18n="[title]Save preset as"></i>
3054+ <i data-newbie-hidden data-preset-manager-import="context" class="menu_button fa-solid fa-file-import" title="Import preset" data-i18n="[title]Import preset"></i>
3055+ <i data-newbie-hidden data-preset-manager-export="context" class="menu_button fa-solid fa-file-export" title="Export preset" data-i18n="[title]Export preset"></i>
3056+ <i data-newbie-hidden data-preset-manager-restore="context" class="menu_button fa-solid fa-recycle" title="Restore current preset" data-i18n="[title]Restore current preset"></i>
3057+ <i data-newbie-hidden id="context_delete_preset" data-preset-manager-delete="context" class="menu_button fa-solid fa-trash-can" title="Delete the preset" data-i18n="[title]Delete the preset"></i>
3058+ </div>
3059+ <div class="flex-container">
3060+ <select id="context_presets" data-preset-manager-for="context" class="flex1 text_pole"></select>
30593061 </div>
30603062 <div data-newbie-hidden>
30613063 <label for="context_story_string">
@@ -3080,6 +3082,48 @@
30803082 </div>
30813083 </div>
30823084 </div>
3085+ <div>
3086+ <h4 data-i18n="Context Formatting">
3087+ Context Formatting
3088+ <small data-i18n="(Saves to Template)">
3089+ &nbsp;(Saves to Template)
3090+ </small>
3091+ </h4>
3092+
3093+
3094+ <label class="checkbox_label" for="always-force-name2-checkbox">
3095+ <input id="always-force-name2-checkbox" type="checkbox" />
3096+ <small data-i18n="Always add character's name to prompt">
3097+ Always add character's name to prompt
3098+ </small>
3099+ </label>
3100+ <label class="checkbox_label" for="single_line">
3101+ <input id="single_line" type="checkbox" />
3102+ <small data-i18n="Generate only one line per request">
3103+ Generate only one line per request
3104+ </small>
3105+ </label>
3106+ <label class="checkbox_label" for="collapse-newlines-checkbox">
3107+ <input id="collapse-newlines-checkbox" type="checkbox" />
3108+ <small data-i18n="Collapse Consecutive Newlines">
3109+ Collapse Consecutive Newlines
3110+ </small>
3111+ </label>
3112+ <label data-newbie-hidden class="checkbox_label" for="trim_spaces">
3113+ <input id="trim_spaces" type="checkbox" />
3114+ <small data-i18n="Trim spaces">Trim spaces</small>
3115+ </label>
3116+ <label class="checkbox_label" for="trim_sentences_checkbox">
3117+ <input id="trim_sentences_checkbox" type="checkbox" />
3118+ <small data-i18n="Trim Incomplete Sentences">
3119+ Trim Incomplete Sentences
3120+ </small>
3121+ </label>
3122+ <!-- Add margin since this is a child of above -->
3123+ <label data-newbie-hidden class="checkbox_label indent20p" for="include_newline_checkbox">
3124+ <input id="include_newline_checkbox" type="checkbox" />
3125+ <small data-i18n="Include Newline">Include Newline</small>
3126+ </label>
30833127 <label class="checkbox_label" title="Add Chat Start and Example Separator to a list of stopping strings." data-i18n="[title]Add Chat Start and Example Separator to a list of stopping strings.">
30843128 <input id="context_use_stop_strings" type="checkbox" />
30853129 <small data-i18n="Separators as Stop Strings">Separators as Stop Strings</small>
@@ -3088,131 +3132,186 @@
30883132 <input id="context_names_as_stop_strings" type="checkbox" />
30893133 <small data-i18n="Names as Stop Strings">Names as Stop Strings</small>
30903134 </label>
3135+ </div>
3136+
30913137 <label class="checkbox_label" title="Includes Post-History Instructions at the end of the prompt, if defined in the character card AND ''Prefer Char. Instructions'' is enabled.&#10;THIS IS NOT RECOMMENDED FOR TEXT COMPLETION MODELS, CAN LEAD TO BAD OUTPUT." data-i18n="[title]context_allow_post_history_instructions">
30923138 <input id="context_allow_jailbreak" type="checkbox" />
30933139 <small data-i18n="Allow Post-History Instructions">Allow Post-History Instructions</small>
30943140 </label>
30953141 </div>
3142+ <hr>
3143+ <div>
3144+ <h4 class="range-block-title justifyLeft">
3145+ <span data-i18n="Custom Stopping Strings">
3146+ Custom Stopping Strings
3147+ </span>
3148+ <a href="https://docs.sillytavern.app/usage/core-concepts/advancedformatting/#custom-stopping-strings" class="notes-link" target="_blank">
3149+ <span class="fa-solid fa-circle-question note-link-span"></span>
3150+ </a>
3151+ </h4>
3152+ <div>
3153+
3154+ <small data-i18n="JSON serialized array of strings">JSON serialized array of strings</small>
30963155
3097- <div data-newbie-hidden class="inline-drawer wide100p flexFlowColumn margin-bot-10px" style="display:none;">
3098- <div class="inline-drawer-toggle inline-drawer-header">
3099- <b><span data-i18n="Context Order">Context Order</span></b>
3100- <div class="fa-solid fa-circle-chevron-down inline-drawer-icon down"></div>
3101- </div>
3102- <div class="inline-drawer-content">
3103- <div id="context_order" class="prompt_order">
3104- <div data-id="0">
3105- <span data-i18n="Story String">Story String</span>
3106- <small>0</small>
3107- </div>
3108- <div data-id="1">
3109- <span data-i18n="Summary">Summary</span>
3110- <small>1</small>
3111- </div>
3112- <div data-id="2">
3113- <span data-i18n="Author's Note">Author's Note</span>
3114- <small>2</small>
3115- </div>
3116- <div data-id="3">
3117- <span data-i18n="Example Dialogues">Example Dialogues</span>
3118- <small>3</small>
3119- </div>
3120- <div data-id="4">
3121- <span data-i18n="Chat Start">Chat History</span>
3122- <small>4</small>
31233156 </div>
3157+ <div>
3158+ <div contenteditable="true" id="custom_stopping_strings" rows="2" class="text_pole textarea_compact monospace" placeholder="[&quot;Ford&quot;, &quot;BMW&quot;, &quot;Fiat&quot;]"></div>
31243159 </div>
3125- <small>
3160+ <label class="checkbox_label" for="custom_stopping_strings_macro">
3126- <b data-i18n="Hint">Hint:</b>
3161+ <input id="custom_stopping_strings_macro" type="checkbox" checked>
31273162 <spansmall data-i18n="In-ChatReplace PositionMacro notin affectedCustom Stopping Strings">
3128- Summary and Author's Note orders are only affected when they don't have an In-Chat position set.
3163+ Replace Macro in Custom Stopping Strings
3129- </span>
31303164 </small>
3165+ </label>
3166+
31313167 </div>
31323168 </div>
3169+
3170+
31333171 </div>
3134- <div>
3172+ <div id="InstructSettingsColumn" class="flex-container flexNoGap flexFlowColumn flex1">
31353173 <h4div classname="standoutHeader title_restorableinstructSettingsBlock">
3136- <div>
3174+ <h4 class="standoutHeader title_restorable justifySpaceBetween">
3175+ <div class="flex-container">
31373176 <span data-i18n="Instruct Mode">Instruct Mode</span>
31383177 <a href="https://docs.sillytavern.app/usage/core-concepts/instructmode/" class="notes-link" target="_blank">
31393178 <span class="fa-solid fa-circle-question note-link-span"></span>
31403179 </a>
31413180 </div>
31423181 <div class="flex-container">
3143- <i data-newbie-hidden data-preset-manager-import="instruct" class="margin0 menu_button fa-solid fa-file-import" title="Import preset" data-i18n="[title]Import preset"></i>
3144- <i data-newbie-hidden data-preset-manager-export="instruct" class="margin0 menu_button fa-solid fa-file-export" title="Export preset" data-i18n="[title]Export preset"></i>
3145- <i data-newbie-hidden data-preset-manager-restore="instruct" class="margin0 menu_button fa-solid fa-recycle" title="Restore current preset" data-i18n="[title]Restore current preset"></i>
3146- <i data-newbie-hidden data-preset-manager-delete="instruct" class="margin0 menu_button fa-solid fa-trash-can" title="Delete the preset" data-i18n="[title]Delete the preset"></i>
3147- </div>
3148- </h4>
3149- <div class="flex-container">
31503182 <label for="instruct_enabled" class="checkbox_label flex1">
31513183 <input id="instruct_enabled" type="checkbox" />
3152- <span data-i18n="Enabled">Enabled</span>
3184+ <small data-i18n="Enabled"><i class="fa-solid fa-power-off"></i></small>
31533185 </label>
31543186 <label for="instruct_bind_to_context" class="checkbox_label flex1" title="If enabled, Context templates will be automatically selected based on selected Instruct template name or by preference." data-i18n="[title]instruct_bind_to_context">
31553187 <input id="instruct_bind_to_context" type="checkbox" />
31563188 <spansmall data-i18n="Bind to Context">Bind<i toclass="fa-solid Contextfa-link"></spani></small>
31573189 </label>
31583190 </div>
3159- <label for="instruct_presets">
3191+ </h4>
3160- <span data-i18n="Presets">Presets</span>
3192+ <div class="flex-container margin0">
3161- </label>
3162- <div class="flex-container">
3163- <select id="instruct_presets" data-preset-manager-for="instruct" class="flex1 text_pole"></select>
31643193 <input type="file" hidden data-preset-manager-file="instruct" accept=".json, .settings">
31653194 <i id="instruct_set_default" class="menu_button fa-solid fa-heart" title="Auto-select this preset on API connection." data-i18n="[title]Auto-select this preset on API connection"></i>
31663195 <i data-newbie-hidden data-preset-manager-update="instruct" class="menu_button fa-solid fa-save" title="Update current preset" data-i18n="[title]Update current preset"></i>
31673196 <i data-newbie-hidden data-preset-manager-new="instruct" class="menu_button fa-solid fa-file-circle-plus" title="Save preset as" data-i18n="[title]Save preset as"></i>
3197+ <i data-newbie-hidden data-preset-manager-import="instruct" class=" menu_button fa-solid fa-file-import" title="Import preset" data-i18n="[title]Import preset"></i>
3198+ <i data-newbie-hidden data-preset-manager-export="instruct" class=" menu_button fa-solid fa-file-export" title="Export preset" data-i18n="[title]Export preset"></i>
3199+ <i data-newbie-hidden data-preset-manager-restore="instruct" class=" menu_button fa-solid fa-recycle" title="Restore current preset" data-i18n="[title]Restore current preset"></i>
3200+ <i data-newbie-hidden data-preset-manager-delete="instruct" class=" menu_button fa-solid fa-trash-can" title="Delete the preset" data-i18n="[title]Delete the preset"></i>
3201+ </div>
3202+
3203+ <div class="flex-container">
3204+ <select id="instruct_presets" data-preset-manager-for="instruct" class="flex1 text_pole"></select>
3205+ </div>
3206+ <div data-newbie-hidden>
3207+ <label>
3208+ <small data-i18n="System Prompt">System Prompt</small>
3209+ </label>
3210+ <div contenteditable="true" id="instruct_system_prompt" class="text_pole textarea_compact autoSetHeight" rows="1"></div>
31683211 </div>
31693212 <label data-newbie-hidden>
31703213 <small data-i18n="Activation Regex">
3171- Activation Regex
3214+ Activation Regex <span class="fa-solid fa-circle-question" title="When connecting to an API or choosing a model, automatically activate this Instruct Mode template if the model name matches the provided regular expression."></span>
31723215 </small>
31733216 </label>
31743217 <div data-newbie-hidden>
31753218 <divinput type="text" contenteditable="true" id="instruct_activation_regex" class="text_pole textarea_compact autoSetHeight" maxlength="5000" rows="1" placeholder="e.g. /llama(-)?[3|3.1]/i"></divinput>
31763219 </div>
31773220 <div data-newbie-hidden>
31783221 <label for="instruct_wrap" class="checkbox_label">
31793222 <input id="instruct_wrap" type="checkbox" />
31803223 <spansmall data-i18n="Wrap Sequences with Newline">Wrap Sequences with Newline</spansmall>
31813224 </label>
31823225 <label for="instruct_macro" class="checkbox_label">
31833226 <input id="instruct_macro" type="checkbox" />
31843227 <spansmall data-i18n="Replace Macro in Sequences">Replace Macro in Sequences</spansmall>
31853228 </label>
31863229 <label for="instruct_skip_examples" class="checkbox_label">
31873230 <input id="instruct_skip_examples" type="checkbox" />
31883231 <spansmall data-i18n="Skip Example Dialogues Formatting">Skip Example Dialogues Formatting</spansmall>
31893232 </label>
31903233 <label for="instruct_names" class="checkbox_label">
31913234 <input id="instruct_names" type="checkbox" />
31923235 <spansmall data-i18n="Include Names">Include Names</spansmall>
31933236 </label>
31943237 <label for="instruct_names_force_groups" class="checkbox_label indent20p">
31953238 <input id="instruct_names_force_groups" type="checkbox" />
31963239 <spansmall data-i18n="Force for Groups and Personas">Force for Groups and Personas</spansmall>
31973240 </label>
31983241 </div>
3199- <div data-newbie-hidden>
3242+ <hr>
3200- <label>
3243+ <div name="tokenizerSettingsBlock">
3201- <small data-i18n="System Prompt">System Prompt</small>
3244+ <div data-newbie-hidden name="tokenizerSelectorBlock">
3245+ <h4><span data-i18n="Tokenizer">Tokenizer</span>
3246+ <a href="https://docs.sillytavern.app/usage/core-concepts/advancedformatting/#tokenizer" class="notes-link" target="_blank">
3247+ <span class="fa-solid fa-circle-question note-link-span"></span>
3248+ </a>
3249+ </h4>
3250+ <select id="tokenizer">
3251+ <option value="99">Best match (recommended)</option>
3252+ <option value="0">None / Estimated</option>
3253+ <option value="1">GPT-2</option>
3254+ <!-- Option #2 was a legacy GPT-2/3 tokenizer -->
3255+ <option value="3">Llama 1/2</option>
3256+ <option value="12">Llama 3</option>
3257+ <option value="4">NerdStash (NovelAI Clio)</option>
3258+ <option value="5">NerdStash v2 (NovelAI Kayra)</option>
3259+ <option value="7">Mistral</option>
3260+ <option value="8">Yi</option>
3261+ <option value="11">Claude 1/2</option>
3262+ <option value="6">API (WebUI / koboldcpp)</option>
3263+ </select>
3264+ </div>
3265+ <div class="range-block flex-container flexnowrap" data-newbie-hidden name="tokenPaddingBlock">
3266+ <div class="range-block-title justifyLeft">
3267+ <small data-i18n="Token Padding" class="flex-container">Token Padding
3268+ <a href="https://docs.sillytavern.app/usage/core-concepts/advancedformatting/#token-padding" class="notes-link" target="_blank">
3269+ <span class="fa-solid fa-circle-question note-link-span"></span>
3270+ </a>
3271+ </small>
3272+ </div>
3273+ <input id="token_padding" class="text_pole textarea_compact" type="number" min="-2048" max="2048" />
3274+ </div>
3275+ </div>
3276+
3277+ <div>
3278+ <h4 class="range-block-title justifyLeft">
3279+ <span data-i18n="Non-markdown strings">
3280+ Non-markdown strings
3281+ </span>
3282+ </h4>
3283+ <div>
3284+ <input id="markdown_escape_strings" class="text_pole textarea_compact" type="text" data-i18n="[placeholder]separate with commas w/o space between" placeholder="separate with commas w/o space between" maxlength="100" />
3285+ </div>
3286+ </div>
3287+
3288+ <div class="flex-container flexFlowColumn" data-newbie-hidden name="startReplyWithBlock">
3289+ <div>
3290+ <h4 class="range-block-title justifyLeft">
3291+ <span data-i18n="Start Reply With">
3292+ Start Reply With
3293+ </span>
3294+ </h4>
3295+ <div>
3296+ <div contenteditable="true" id="start_reply_with" rows="2" class="text_pole textarea_compact" data-i18n="[placeholder]AI reply prefix" placeholder="AI reply prefix"></div>
3297+ </div>
3298+ <label class="checkbox_label" for="chat-show-reply-prefix-checkbox">
3299+ <input id="chat-show-reply-prefix-checkbox" type="checkbox" />
3300+ <small data-i18n="Show reply prefix in chat">
3301+ Show reply prefix in chat
3302+ </small>
32023303 </label>
3203- <div contenteditable="true" id="instruct_system_prompt" class="text_pole textarea_compact autoSetHeight" rows="1"></div>
32043304 </div>
3205- <div data-newbie-hidden class="inline-drawer wide100p flexFlowColumn">
3206- <div class="inline-drawer-toggle inline-drawer-header">
3207- <b><span data-i18n="Instruct Mode Sequences">Instruct Mode Sequences</span></b>
3208- <div class="fa-solid fa-circle-chevron-down inline-drawer-icon down"></div>
32093305 </div>
3210- <div class="inline-drawer-content">
3306+ </div>
3211- <h5 class="textAlignCenter" data-i18n="System Prompt Wrapping">
3307+ </div>
3212- System Prompt Wrapping
3308+ <div id="InstructSequencesColumn" class="flex-container flexNoGap flexFlowColumn flex1">
3213- </h5>
3309+ <div data-newbie-hidden class="inline-drawer wide100p flexFlowColumn">
3310+ <h4 class="standoutHeader title_restorable">
3311+ <b><span data-i18n="Instruct Mode Sequences">Instruct Sequences</span></b>
3312+ </h4>
32143313 <div class="flex-container">
32153314 <div class="flex1flexAuto" title="Inserted before a System prompt." data-i18n="[title]Inserted before a System prompt.">
32163315 <label for="instruct_system_sequence_prefix">
32173316 <small data-i18n="System Prompt Prefix">System Prompt Prefix</small>
32183317 </label>
@@ -3220,7 +3319,7 @@
32203319 <div contenteditable="true" id="instruct_system_sequence_prefix" class="text_pole textarea_compact autoSetHeight" maxlength="2000" placeholder="&mdash;" rows="1"></div>
32213320 </div>
32223321 </div>
32233322 <div class="flex1flexAuto" title="Inserted after a System prompt." data-i18n="[title]Inserted after a System prompt.">
32243323 <label for="instruct_system_sequence_suffix">
32253324 <small data-i18n="System Prompt Suffix">System Prompt Suffix</small>
32263325 </label>
@@ -3229,59 +3328,33 @@
32293328 </div>
32303329 </div>
32313330 </div>
3232- <h5 class="textAlignCenter" data-i18n="Chat Messages Wrapping">
3233- Chat Messages Wrapping
3234- </h5>
32353331 <div class="flex-container">
32363332 <div class="flex1flexAuto" 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.">
3237- <label for="instruct_input_sequence">
3333+ <small data-i18n="User Prefix">User Message Prefix</small>
3238- <small data-i18n="User Message Prefix">User Message Prefix</small>
3239- </label>
3240- <div>
32413334 <div contenteditable="true" id="instruct_input_sequence" class="text_pole textarea_compact autoSetHeight" maxlength="2000" placeholder="&mdash;" rows="1"></div>
32423335 </div>
3243- </div>
3336+ <div class="flexAuto" title="Inserted after a User message." data-i18n="[title]Inserted after a User message.">
3244- <div class="flex1" title="Inserted after a User message." data-i18n="[title]Inserted after a User message.">
3337+ <small data-i18n="User Suffix">User Message Suffix</small>
3245- <label for="instruct_input_suffix">
3246- <small data-i18n="User Message Suffix">User Message Suffix</small>
3247- </label>
3248- <div>
32493338 <div contenteditable="true" id="instruct_input_suffix" class="text_pole wide100p textarea_compact autoSetHeight" maxlength="2000" placeholder="&mdash;" rows="1"></div>
32503339 </div>
32513340 </div>
3252- </div>
32533341 <div class="flex-container">
32543342 <div class="flex1flexAuto" 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.">
3255- <label for="instruct_output_sequence">
3343+ <small data-i18n="Assistant Prefix">Assistant Message Prefix</small>
3256- <small data-i18n="Assistant Message Prefix">Assistant Message Prefix</small>
3257- </label>
3258- <div>
32593344 <div contenteditable="true" id="instruct_output_sequence" class="text_pole wide100p textarea_compact autoSetHeight" maxlength="2000" placeholder="&mdash;" rows="1"></div>
32603345 </div>
3261- </div>
3346+ <div class="flexAuto" title="Inserted after an Assistant message." data-i18n="[title]Inserted after an Assistant message.">
3262- <div class="flex1" title="Inserted after an Assistant message." data-i18n="[title]Inserted after an Assistant message.">
3347+ <small data-i18n="Assistant Suffix">Assistant Message Suffix</small>
3263- <label for="instruct_output_suffix">
3264- <small data-i18n="Assistant Message Suffix">Assistant Message Suffix</small>
3265- </label>
3266- <div>
32673348 <div contenteditable="true" id="instruct_output_suffix" class="text_pole wide100p textarea_compact autoSetHeight" maxlength="2000" placeholder="&mdash;" rows="1"></div>
32683349 </div>
32693350 </div>
3270- </div>
32713351 <div class="flex-container">
32723352 <div class="flex1flexAuto" 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.">
3273- <label for="instruct_system_sequence">
3353+ <small data-i18n="System Prefix">System Message Prefix</small>
3274- <small data-i18n="System Message Prefix">System Message Prefix</small>
3275- </label>
3276- <div>
32773354 <div contenteditable="true" id="instruct_system_sequence" class="text_pole textarea_compact autoSetHeight" maxlength="2000" placeholder="&mdash;" rows="1"></div>
32783355 </div>
3279- </div>
3356+ <div class="flexAuto" id="instruct_system_suffix_block" title="Inserted after a System message." data-i18n="[title]Inserted after a System message.">
3280- <div class="flex1" title="Inserted after a System message." data-i18n="[title]Inserted after a System message.">
3357+ <small data-i18n="System Suffix">System Message Suffix</small>
3281- <label for="instruct_system_suffix">
3282- <small data-i18n="System Message Suffix">System Message Suffix</small>
3283- </label>
3284- <div>
32853358 <div contenteditable="true" id="instruct_system_suffix" class="text_pole wide100p textarea_compact autoSetHeight" maxlength="2000" placeholder="&mdash;" rows="1"></div>
32863359 </div>
32873360 </div>
@@ -3291,236 +3364,53 @@
32913364 <small data-i18n="System same as User">System same as User</small>
32923365 </label>
32933366 </div>
3294- </div>
3367+
32953368 <h5 class="textAlignCenter" data-i18n="Misc. Sequences">
32963369 Misc. Sequences
32973370 </h5>
32983371 <div class="flex-container">
32993372 <div class="flex1flexAuto" title="Inserted before the first Assistant's message." data-i18n="[title]Inserted before the first Assistant's message.">
3300- <label for="instruct_first_output_sequence">
33013373 <small data-i18n="First Assistant Prefix">First Assistant Prefix</small>
3302- </label>
3303- <div>
33043374 <div contenteditable="true" id="instruct_first_output_sequence" class="text_pole textarea_compact autoSetHeight" maxlength="2000" placeholder="&mdash;" rows="1"></div>
33053375 </div>
3306- </div>
3376+ <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">
3307- <div class="flex1" 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">
3308- <label for="instruct_last_output_sequence">
33093377 <small data-i18n="Last Assistant Prefix">Last Assistant Prefix</small>
3310- </label>
3311- <div>
33123378 <div contenteditable="true" id="instruct_last_output_sequence" class="text_pole wide100p textarea_compact autoSetHeight" maxlength="2000" placeholder="&mdash;" rows="1"></div>
33133379 </div>
33143380 </div>
3315- </div>
33163381 <div class="flex-container">
33173382 <div class="flex1flexAuto" title="Inserted before the first User's message." data-i18n="[title]Inserted before the first User's message.">
3318- <label for="instruct_first_input_sequence">
33193383 <small data-i18n="First User Prefix">First User Prefix</small>
3320- </label>
3321- <div>
33223384 <div contenteditable="true" id="instruct_first_input_sequence" class="text_pole textarea_compact autoSetHeight" maxlength="2000" placeholder="&mdash;" rows="1"></div>
33233385 </div>
3324- </div>
3386+ <div class="flexAuto" title="Inserted before the last User's message." data-i18n="[title]instruct_last_input_sequence">
3325- <div class="flex1" title="Inserted before the last User's message." data-i18n="[title]instruct_last_input_sequence">
3387+
3326- <label for="instruct_last_input_sequence">
33273388 <small data-i18n="Last User Prefix">Last User Prefix</small>
3328- </label>
3329- <div>
33303389 <div contenteditable="true" id="instruct_last_input_sequence" class="text_pole wide100p textarea_compact autoSetHeight" maxlength="2000" placeholder="&mdash;" rows="1"></div>
33313390 </div>
33323391 </div>
3333- </div>
33343392 <div class="flex-container">
33353393 <div class="flex1flexAuto" 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.">
3336- <label for="instruct_last_system_sequence">
33373394 <small data-i18n="System Instruction Prefix">System Instruction Prefix</small>
3338- </label>
3339- <div>
33403395 <div contenteditable="true" id="instruct_last_system_sequence" class="text_pole textarea_compact autoSetHeight" maxlength="2000" placeholder="&mdash;" rows="1"></div>
33413396 </div>
3342- </div>
3397+ <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).">
3343- <div class="flex1" 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).">
3344- <label for="instruct_stop_sequence">
33453398 <small data-i18n="Stop Sequence">Stop Sequence</small>
3346- </label>
3347- <div>
33483399 <div contenteditable="true" id="instruct_stop_sequence" class="text_pole textarea_compact autoSetHeight" maxlength="2000" placeholder="&mdash;" rows="1"></div>
33493400 </div>
33503401 </div>
3351- </div>
33523402 <div class="flex-container">
33533403 <div class="flex1flexAuto" 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.">
3354- <label for="instruct_user_alignment_message">
33553404 <small data-i18n="User Filler Message">User Filler Message</small>
3356- </label>
3357- <div>
33583405 <div contenteditable="true" id="instruct_user_alignment_message" class="text_pole textarea_compact autoSetHeight" maxlength="2000" placeholder="&mdash;" rows="1"></div>
33593406 </div>
33603407 </div>
3361- </div>
3362- </div>
3363- </div>
3364- </div>
3365- </div>
3366- <div id="ContextFormatting">
3367- <div>
3368- <div class="flex-container alignItemsBaseline">
3369- <h4 data-i18n="Context Formatting">
3370- Context Formatting
3371- </h4>
3372- <small data-i18n="(Saved to Context Template)">
3373- &nbsp;(Saved to Context Template)
3374- </small>
3375- </div>
3376- <label class="checkbox_label" for="always-force-name2-checkbox">
3377- <input id="always-force-name2-checkbox" type="checkbox" />
3378- <span data-i18n="Always add character's name to prompt">
3379- Always add character's name to prompt
3380- </span>
3381- </label>
3382- <label class="checkbox_label" for="single_line">
3383- <input id="single_line" type="checkbox" />
3384- <span data-i18n="Generate only one line per request">
3385- Generate only one line per request
3386- </span>
3387- </label>
3388- <label class="checkbox_label" for="trim_sentences_checkbox">
3389- <input id="trim_sentences_checkbox" type="checkbox" />
3390- <span data-i18n="Trim Incomplete Sentences">
3391- Trim Incomplete Sentences
3392- </span>
3393- </label>
3394- <!-- Add margin since this is a child of above -->
3395- <label data-newbie-hidden class="checkbox_label indent20p" for="include_newline_checkbox">
3396- <input id="include_newline_checkbox" type="checkbox" />
3397- <span data-i18n="Include Newline">Include Newline</span>
3398- </label>
3399- </div>
3400- <h4 data-i18n="Misc. Settings">
3401- Misc. Settings
3402- </h4>
3403- <label class="checkbox_label" for="collapse-newlines-checkbox">
3404- <input id="collapse-newlines-checkbox" type="checkbox" />
3405- <span data-i18n="Collapse Consecutive Newlines">
3406- Collapse Consecutive Newlines
3407- </span>
3408- </label>
3409- <label data-newbie-hidden class="checkbox_label" for="trim_spaces">
3410- <input id="trim_spaces" type="checkbox" />
3411- <span data-i18n="Trim spaces">Trim spaces</span>
3412- </label>
3413- <div data-newbie-hidden>
3414- <h4><span data-i18n="Tokenizer">Tokenizer</span>
3415- <a href="https://docs.sillytavern.app/usage/core-concepts/advancedformatting/#tokenizer" class="notes-link" target="_blank">
3416- <span class="fa-solid fa-circle-question note-link-span"></span>
3417- </a>
3418- </h4>
3419- <select id="tokenizer">
3420- <option value="99">Best match (recommended)</option>
3421- <option value="0">None / Estimated</option>
3422- <option value="1">GPT-2</option>
3423- <!-- Option #2 was a legacy GPT-2/3 tokenizer -->
3424- <option value="3">Llama 1/2</option>
3425- <option value="12">Llama 3</option>
3426- <option value="4">NerdStash (NovelAI Clio)</option>
3427- <option value="5">NerdStash v2 (NovelAI Kayra)</option>
3428- <option value="7">Mistral</option>
3429- <option value="8">Yi</option>
3430- <option value="11">Claude 1/2</option>
3431- <option value="6">API (WebUI / koboldcpp)</option>
3432- </select>
3433- </div>
3434- <div class="range-block" data-newbie-hidden>
3435- <div class="range-block-title justifyLeft">
3436- <span data-i18n="Token Padding">Token Padding</span>
3437- <a href="https://docs.sillytavern.app/usage/core-concepts/advancedformatting/#token-padding" class="notes-link" target="_blank">
3438- <span class="fa-solid fa-circle-question note-link-span"></span>
3439- </a>
3440- </div>
3441- <input id="token_padding" class="text_pole textarea_compact" type="number" min="-2048" max="2048" />
3442- </div>
3443- <div class="flex-container flexFlowColumn" data-newbie-hidden>
3444- <div>
3445- <h4 class="range-block-title justifyLeft">
3446- <span data-i18n="Start Reply With">
3447- Start Reply With
3448- </span>
3449- </h4>
3450- <div>
3451- <div contenteditable="true" id="start_reply_with" rows="2" class="text_pole textarea_compact" data-i18n="[placeholder]AI reply prefix" placeholder="AI reply prefix"></div>
3452- </div>
3453- <label class="checkbox_label" for="chat-show-reply-prefix-checkbox">
3454- <input id="chat-show-reply-prefix-checkbox" type="checkbox" />
3455- <span data-i18n="Show reply prefix in chat">
3456- Show reply prefix in chat
3457- </span>
3458- </label>
3459- </div>
3460- <div>
3461- <h4 class="range-block-title justifyLeft">
3462- <span data-i18n="Non-markdown strings">
3463- Non-markdown strings
3464- </span>
3465- </h4>
3466- <div>
3467- <input id="markdown_escape_strings" class="text_pole textarea_compact" type="text" data-i18n="[placeholder]separate with commas w/o space between" placeholder="separate with commas w/o space between" maxlength="100" />
3468- </div>
3469- </div>
3470- <div>
3471- <h4 class="range-block-title justifyLeft">
3472- <span data-i18n="Custom Stopping Strings">
3473- Custom Stopping Strings
3474- </span>
3475- <a href="https://docs.sillytavern.app/usage/core-concepts/advancedformatting/#custom-stopping-strings" class="notes-link" target="_blank">
3476- <span class="fa-solid fa-circle-question note-link-span"></span>
3477- </a>
3478- </h4>
3479- <div>
3480- <small>
3481- <span data-i18n="JSON serialized array of strings">JSON serialized array of strings</span>
3482- </small>
3483- </div>
3484- <div>
3485- <div contenteditable="true" id="custom_stopping_strings" rows="2" class="text_pole textarea_compact monospace" placeholder="[&quot;Ford&quot;, &quot;BMW&quot;, &quot;Fiat&quot;]"></div>
3486- </div>
3487- <label class="checkbox_label" for="custom_stopping_strings_macro">
3488- <input id="custom_stopping_strings_macro" type="checkbox" checked>
3489- <span data-i18n="Replace Macro in Custom Stopping Strings">
3490- Replace Macro in Custom Stopping Strings
3491- </span>
3492- </label>
3493- </div>
3494- </div>
3495- <div data-newbie-hidden>
3496- <h4>
3497- <span data-i18n="Auto-Continue">Auto-Continue</span>
3498- </h4>
3499- <div class="flex-container">
3500- <label class="checkbox_label" for="auto_continue_enabled">
3501- <input id="auto_continue_enabled" type="checkbox" />
3502- <span data-i18n="Enabled">
3503- Enabled
3504- </span>
3505- </label>
3506- <label class="checkbox_label" for="auto_continue_allow_chat_completions">
3507- <input id="auto_continue_allow_chat_completions" type="checkbox" />
3508- <span data-i18n="Allow for Chat Completion APIs">
3509- Allow for Chat Completion APIs
3510- </span>
3511- </label>
3512- </div>
35133408
3514- <div class="auto_continue_settings_block">
3515- <label for="auto_continue_target_length">
3516- <span data-i18n="Target length (tokens)">Target length (tokens)</span>
3517- <input id="auto_continue_target_length" type="number" class="text_pole textarea_compact" min="0" max="1024" />
3518- </label>
3519- </div>
35203409 </div>
35213410 </div>
35223411 </div>
35233412 </div>
3413+
35243414 </div>
35253415 <div id="WI-SP-button" class="drawer">
35263416 <div class="drawer-toggle drawer-header">
@@ -4259,9 +4149,43 @@
42594149 </div>
42604150 </div>
42614151 </div>
4152+ <div data-newbie-hidden nane="AutoContiueBlock" class="inline-drawer wide100p flexFlowColumn">
4153+ <div class="inline-drawer-toggle inline-drawer-header userSettingsInnerExpandable" title="Automatically 'continue' a response if the model stopped before reaching a certain amount of tokens.">
4154+ <b><span data-i18n="Auto-swipe">Auto-Continue</span></b>
4155+ <div class="fa-solid fa-circle-chevron-down inline-drawer-icon down"></div>
42624156 </div>
42634157 <div nameclass="AutoCompleteToggleinline-drawer-content">
4264- <h4 data-i18n="AutoComplete Settings">AutoComplete Settings</h4>
4158+ <div class="flex-container">
4159+ <label class="checkbox_label" for="auto_continue_enabled">
4160+ <input id="auto_continue_enabled" type="checkbox" />
4161+ <small data-i18n="Enabled">
4162+ Enabled
4163+ </small>
4164+ </label>
4165+ <label class="checkbox_label" for="auto_continue_allow_chat_completions">
4166+ <input id="auto_continue_allow_chat_completions" type="checkbox" />
4167+ <small data-i18n="Allow for Chat Completion APIs">
4168+ Allow for Chat Completion APIs
4169+ </small>
4170+ </label>
4171+ </div>
4172+ <div class="auto_continue_settings_block">
4173+ <label for="auto_continue_target_length">
4174+ <small data-i18n="Target length (tokens)">Target length (tokens)</small>
4175+ <input id="auto_continue_target_length" type="number" class="text_pole textarea_compact" min="0" max="1024" />
4176+ </label>
4177+ </div>
4178+ </div>
4179+
4180+
4181+ </div>
4182+ </div>
4183+ <div name="AutoCompleteToggle" class="inline-drawer wide100p flexFlowColumn">
4184+ <div class="inline-drawer-toggle inline-drawer-header userSettingsInnerExpandable" title="Options for the various autocompelte input boxes.">
4185+ <b><span data-i18n="AutoComplete Settings">AutoComplete Settings</span></b>
4186+ <div class="fa-solid fa-circle-chevron-down inline-drawer-icon down"></div>
4187+ </div>
4188+ <div class="inline-drawer-content">
42654189 <label data-newbie-hidden class="checkbox_label" for="stscript_autocomplete_autoHide">
42664190 <input id="stscript_autocomplete_autoHide" type="checkbox" />
42674191 <small data-i18n="Automatically hide details">
@@ -4326,6 +4250,7 @@
43264250 </div>
43274251 </div>
43284252 </div>
4253+ </div>
43294254 <div name="STscriptToggles">
43304255 <h4 data-i18n="STscript Settings">STscript Settings</h4>
43314256 <div title="Sets default flags for the STscript parser." data-i18n="[title]Sets default flags for the STscript parser.">
@@ -4949,6 +4874,61 @@
49494874 </div>
49504875 </div>
49514876 <!-- various fullscreen popups -->
4877+ <div name="templatesAndPopupsWrapper"> <!--this div is just for IDE sanity for quick collapsing-->
4878+ <div id="export_format_popup" class="list-group">
4879+ <div class="export_format list-group-item" data-format="png">PNG</div>
4880+ <div class="export_format list-group-item" data-format="json">JSON</div>
4881+ </div>
4882+ <div id="zoomed_avatar_template" class="template_element">
4883+ <div class="zoomed_avatar">
4884+ <div class="panelControlBar flex-container">
4885+ <div class="fa-fw fa-solid fa-grip drag-grabber"></div>
4886+ <div class="fa-fw fa-solid fa-circle-xmark dragClose" id="closeZoom"></div>
4887+ </div>
4888+ <div class="zoomed_avatar_container">
4889+ <img class="zoomed_avatar_img" src="" data-izoomify-url="" data-izoomify-magnify="1.8" data-izoomify-duration="300" alt="">
4890+ </div>
4891+ </div>
4892+ </div>
4893+ <template id="generic_draggable_template">
4894+ <div class="draggable">
4895+ <div class="dragTitle"></div>
4896+ <div class="panelControlBar flex-container">
4897+ <div class="fa-fw fa-solid fa-grip drag-grabber"></div>
4898+ <div class="fa-fw fa-solid fa-circle-xmark dragClose"></div>
4899+ </div>
4900+ </div>
4901+ </template>
4902+ <div id="user_avatar_template" class="template_element">
4903+ <div class="avatar-container">
4904+ <div imgfile="" class="avatar">
4905+ <img src="" alt="User Avatar">
4906+ </div>
4907+ <div class="flex-container wide100pLess70px character_select_container">
4908+ <div class="wide100p character_name_block">
4909+ <span class="ch_name flex1"></span>
4910+ <div class="avatar-buttons">
4911+ <button class="menu_button bind_user_name" title="Bind user name to that avatar" data-i18n="[title]Bind user name to that avatar">
4912+ <i class="fa-fw fa-solid fa-user-edit"></i>
4913+ </button>
4914+ <button class="menu_button set_persona_image" title="Change persona image" data-i18n="[title]Change persona image">
4915+ <i class="fa-fw fa-solid fa-image"></i>
4916+ </button>
4917+ <button class="menu_button set_default_persona" title="Select this as default persona for the new chats." data-i18n="[title]Select this as default persona for the new chats.">
4918+ <i class="fa-fw fa-solid fa-crown"></i>
4919+ </button>
4920+ <button class="menu_button duplicate_persona" title="Duplicate persona" data-i18n="[title]Duplicate persona">
4921+ <i class="fa-fw fa-solid fa-clone"></i>
4922+ </button>
4923+ <button class="menu_button delete_avatar" title="Delete persona" data-i18n="[title]Delete persona">
4924+ <i class="fa-fw fa-solid fa-trash-alt"></i>
4925+ </button>
4926+ </div>
4927+ </div>
4928+ <div class="ch_description"></div>
4929+ </div>
4930+ </div>
4931+ </div>
49524932 <template id="popup_template" data-i18n="[popup-button-save]popup-button-save;[popup-button-yes]popup-button-yes;[popup-button-no]popup-button-no;[popup-button-cancel]popup-button-cancel;[popup-button-import]popup-button-import;[popup-button-crop]popup-button-crop" popup-button-save="Save" popup-button-yes="Yes" popup-button-no="No" popup-button-cancel="Cancel" popup-button-import="Import" popup-button-crop="Crop"> <!-- localization data holder for popups -->
49534933 <dialog class="popup">
49544934 <div class="popup-body">
@@ -5157,6 +5137,7 @@
51575137 </div>
51585138 <div id="character_popup_ok" class="menu_button" data-i18n="Save">Save</div>
51595139 </div>
5140+
51605141 <div id="shadow_select_chat_popup">
51615142 <div id="select_chat_popup">
51625143 <div name="selectChatPopupHeader" class="flex-container alignitemscenter justifySpaceBetween flexGap10">
@@ -5999,6 +5980,7 @@
59995980 <div class="right_menu_button mes_file_delete fa-solid fa-trash-can" title="Remove the file" data-i18n="[title]Remove the file"></div>
60005981 </div>
60015982 </div>
5983+ </div>
60025984 <div id="movingDivs">
60035985 <div id="floatingPrompt" class="drawer-content flexGap5">
60045986 <div class="panelControlBar flex-container alignItemsBaseline">
@@ -6454,60 +6436,7 @@
64546436 </a>
64556437 </div>
64566438 </div>
6457- <div id="export_format_popup" class="list-group">
6439+
6458- <div class="export_format list-group-item" data-format="png">PNG</div>
6459- <div class="export_format list-group-item" data-format="json">JSON</div>
6460- </div>
6461- <div id="zoomed_avatar_template" class="template_element">
6462- <div class="zoomed_avatar">
6463- <div class="panelControlBar flex-container">
6464- <div class="fa-fw fa-solid fa-grip drag-grabber"></div>
6465- <div class="fa-fw fa-solid fa-circle-xmark dragClose" id="closeZoom"></div>
6466- </div>
6467- <div class="zoomed_avatar_container">
6468- <img class="zoomed_avatar_img" src="" data-izoomify-url="" data-izoomify-magnify="1.8" data-izoomify-duration="300" alt="">
6469- </div>
6470- </div>
6471- </div>
6472- <template id="generic_draggable_template">
6473- <div class="draggable">
6474- <div class="dragTitle"></div>
6475- <div class="panelControlBar flex-container">
6476- <div class="fa-fw fa-solid fa-grip drag-grabber"></div>
6477- <div class="fa-fw fa-solid fa-circle-xmark dragClose"></div>
6478- </div>
6479- </div>
6480- </template>
6481- <div id="user_avatar_template" class="template_element">
6482- <div class="avatar-container">
6483- <div imgfile="" class="avatar">
6484- <img src="" alt="User Avatar">
6485- </div>
6486- <div class="flex-container wide100pLess70px character_select_container">
6487- <div class="wide100p character_name_block">
6488- <span class="ch_name flex1"></span>
6489- <div class="avatar-buttons">
6490- <button class="menu_button bind_user_name" title="Bind user name to that avatar" data-i18n="[title]Bind user name to that avatar">
6491- <i class="fa-fw fa-solid fa-user-edit"></i>
6492- </button>
6493- <button class="menu_button set_persona_image" title="Change persona image" data-i18n="[title]Change persona image">
6494- <i class="fa-fw fa-solid fa-image"></i>
6495- </button>
6496- <button class="menu_button set_default_persona" title="Select this as default persona for the new chats." data-i18n="[title]Select this as default persona for the new chats.">
6497- <i class="fa-fw fa-solid fa-crown"></i>
6498- </button>
6499- <button class="menu_button duplicate_persona" title="Duplicate persona" data-i18n="[title]Duplicate persona">
6500- <i class="fa-fw fa-solid fa-clone"></i>
6501- </button>
6502- <button class="menu_button delete_avatar" title="Delete persona" data-i18n="[title]Delete persona">
6503- <i class="fa-fw fa-solid fa-trash-alt"></i>
6504- </button>
6505- </div>
6506- </div>
6507- <div class="ch_description"></div>
6508- </div>
6509- </div>
6510- </div>
65116440 <!-- Script includes -->
65126441 <script src="lib/diff_match_patch.js"></script>
65136442 <script src="lib/object-hasown.js"></script>
public/scripts/instruct-mode.js+31 -2
@@ -85,6 +85,12 @@ export function loadInstructMode(data) {
8585
8686 migrateInstructModeSettings(power_user.instruct);
8787
88+ if (power_user.instruct.enabled) {
89+ $('#instruct_enabled').parent().find('i').addClass('toggleEnabled');
90+ } else {
91+ $('#instruct_enabled').parent().find('i').removeClass('toggleEnabled');
92+ }
93+
8894 controls.forEach(control => {
8995 const $element = $(`#${control.id}`);
9096
@@ -606,11 +612,34 @@ jQuery(() => {
606612
607613 $('#instruct_system_same_as_user').on('input', function () {
608614 const state = !!$(this).prop('checked');
609- $('#instruct_system_sequence').prop('disabled', state);
615+ if (state == true) {
610616 let tempHeightForDisabled = $('#instruct_system_suffixinstruct_system_sequence').propcss('disabledheight', state);
617+ $('#instruct_system_sequence_block').addClass('disabled');
618+ $('#instruct_system_suffix_block').addClass('disabled');
619+ $('#instruct_system_sequence').css('height', tempHeightForDisabled);
620+ $('#instruct_system_suffix').css('height', tempHeightForDisabled);
621+
622+ $('#instruct_system_sequence').prop('contenteditable', false);
623+ $('#instruct_system_suffix').prop('contenteditable', false);
624+ } else {
625+ $('#instruct_system_sequence_block').removeClass('disabled');
626+ $('#instruct_system_suffix_block').removeClass('disabled');
627+ $('#instruct_system_sequence').css('height', '');
628+ $('#instruct_system_sequence').css('height', '');
629+ $('#instruct_system_sequence').prop('contenteditable', true);
630+ $('#instruct_system_suffix').prop('contenteditable', true);
631+ }
632+
611633 });
612634
613635 $('#instruct_enabled').on('change', function () {
636+ //color toggle for the main switch
637+ if (power_user.instruct.enabled) {
638+ $('#instruct_enabled').parent().find('i').addClass('toggleEnabled');
639+ } else {
640+ $('#instruct_enabled').parent().find('i').removeClass('toggleEnabled');
641+ }
642+
614643 if (!power_user.instruct.bind_to_context) {
615644 return;
616645 }
public/style.css+16 -3
@@ -1602,6 +1602,7 @@ body[data-stscript-style] .hljs.language-stscript {
16021602 .hljs-pipe {
16031603 color: var(--ac-style-color-punctuation);
16041604 }
1605+
16051606 .hljs-pipebreak {
16061607 color: var(--ac-style-color-type);
16071608 }
@@ -1695,6 +1696,7 @@ body[data-stscript-style] .hljs.language-stscript {
16951696 background-color: var(--ac-color-selectedBackground);
16961697 color: var(--ac-color-selectedText);
16971698 }
1699+
16981700 &.selected.not-selectable>* {
16991701 background-color: var(--ac-color-notSelectableBackground);
17001702 color: var(--ac-color-notSelectableText);
@@ -1780,7 +1782,9 @@ body[data-stscript-style] .hljs.language-stscript {
17801782 display: flex;
17811783 gap: 0.5em;
17821784 }
1783- > .head > .name, > .name {
1785+
1786+ >.head>.name,
1787+ >.name {
17841788 flex: 1 1 auto;
17851789 font-weight: bold;
17861790 color: var(--ac-color-text);
@@ -1790,20 +1794,25 @@ body[data-stscript-style] .hljs.language-stscript {
17901794 text-decoration: 1px dotted underline;
17911795 }
17921796 }
1797+
17931798 >.head>.source {
17941799 padding: 0 0.5em;
17951800 cursor: help;
17961801 display: flex;
17971802 align-items: center;
17981803 gap: 0.5em;
1804+
17991805 &.isThirdParty.isExtension {
18001806 color: #F89406;
18011807 }
1808+
18021809 &.isCore {
18031810 color: transparent;
1811+
18041812 &.isExtension {
18051813 color: #51A351;
18061814 }
1815+
18071816 &:after {
18081817 content: '';
18091818 order: -1;
@@ -2606,7 +2615,8 @@ select option:not(:checked) {
26062615 color: var(--golden) !important;
26072616}
26082617
26092618.world_set {,
2619+.toggleEnabled {
26102620 color: var(--active) !important;
26112621}
26122622
@@ -5374,6 +5384,7 @@ body:not(.movingUI) .drawer-content.maximized {
53745384.popup:has(.faPicker) {
53755385 /* Fix height for fa picker popup, otherwise search is making it resize weirdly */
53765386 height: 70%;
5387+
53775388 .popup-content {
53785389 display: flex;
53795390 flex-direction: column;
@@ -5383,7 +5394,8 @@ body:not(.movingUI) .drawer-content.maximized {
53835394.faPicker-container {
53845395 display: flex;
53855396 flex-direction: column;
53865397 overflow: hidden;;
5398+ ;
53875399}
53885400
53895401.faQuery-container {
@@ -5405,6 +5417,7 @@ body:not(.movingUI) .drawer-content.maximized {
54055417 padding: 0.25em;
54065418 width: unset;
54075419 box-sizing: content-box;
5420+
54085421 &.hidden {
54095422 display: none;
54105423 }