CC: Add advanced formatting null settings notice (#4661)

47765b620532ff620c80de6beaefc31c4e0e4765

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

Signed
2 files changed, +40 -14Showing whitespace changes
public/css/toggle-dependent.css+18 -0
@@ -544,3 +544,21 @@ label[for="bind_preset_to_connection"]:has(input:checked) {
544544#openai_settings [data-cc-toggle="false"]>.icon-unsupported {
545545 color: var(--golden);
546546}
547+
548+#advanced-formatting-cc-notice {
549+ display: none;
550+ gap: 5px;
551+ align-items: baseline;
552+ margin: 5px 0;
553+ padding: 5px 10px;
554+}
555+
556+#top-settings-holder:has(#main_api option[value="openai"]:checked) #advanced-formatting-cc-notice {
557+ display: flex;
558+}
559+
560+#top-settings-holder:has(#main_api option[value="openai"]:checked) #AdvancedFormatting [data-cc-null] {
561+ opacity: 0.5;
562+ filter: grayscale(0.5);
563+ cursor: not-allowed;
564+}
public/index.html+22 -14
@@ -3779,7 +3779,7 @@
37793779 <span class="fa-solid fa-circle-question note-link-span"></span>
37803780 </a>
37813781 </h3>
37823782 <div class="flex-container" data-cc-null>
37833783 <input id="af_master_import_file" type="file" hidden accept=".json" class="displayNone">
37843784 <div id="af_master_import" class="menu_button menu_button_icon" title="Import Advanced Formatting settings&#10;&#10;You can also provide legacy files for Instruct and Context templates." data-i18n="[title]Import Advanced Formatting settings">
37853785 <i class="fa-solid fa-file-import"></i>
@@ -3791,10 +3791,16 @@
37913791 </div>
37923792 </div>
37933793 </div>
3794+ <div id="advanced-formatting-cc-notice" class="info-block warning">
3795+ <i class="fa-solid fa-triangle-exclamation"></i>
3796+ <span data-i18n="Grayed-out options have no effect when Chat Completion API is used.">
3797+ Grayed-out options have no effect when Chat Completion API is used.
3798+ </span>
3799+ </div>
37943800 <div class="flex-container spaceEvenly">
37953801 <div id="ContextSettings" class="flex-container flexNoGap flexFlowColumn flex1">
37963802 <div>
37973803 <h4 class="standoutHeader title_restorable" data-cc-null>
37983804 <div>
37993805 <span data-i18n="Context Template">Context Template</span>
38003806 </div>
@@ -3805,7 +3811,7 @@
38053811 </label>
38063812 </div>
38073813 </h4>
38083814 <div class="flex-container" title="Select your current Context Template" data-i18n="[title]Select your current Context Template" data-cc-null>
38093815 <select id="context_presets" data-preset-manager-for="context" class="flex1 text_pole"></select>
38103816 <div class="flex-container justifyCenter gap3px">
38113817 <input type="file" hidden data-preset-manager-file="context" accept=".json, .settings">
@@ -3819,12 +3825,14 @@
38193825 </div>
38203826 </div>
38213827 <div>
3828+ <div data-cc-null>
38223829 <label for="context_story_string" class="flex-container">
38233830 <small data-i18n="Story String">Story String</small>
38243831 <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>
38253832 </label>
38263833 <textarea id="context_story_string" class="text_pole textarea_compact autoSetHeight"></textarea>
3827- <div class="flex-container flexFlowColumn">
3834+ </div>
3835+ <div class="flex-container flexFlowColumn" data-cc-null>
38283836 <div id="context_story_string_position_block">
38293837 <label for="context_story_string_position">
38303838 <small data-i18n="Position:">Position:</small>
@@ -3853,7 +3861,7 @@
38533861 </div>
38543862 </div>
38553863 </div>
38563864 <div class="flex-container" data-cc-null>
38573865 <div class="flex1">
38583866 <label for="context_example_separator">
38593867 <small data-i18n="Example Separator">Example Separator</small>
@@ -3878,13 +3886,13 @@
38783886 </span>
38793887 </h4>
38803888
38813889 <label class="checkbox_label" for="always-force-name2-checkbox" data-cc-null>
38823890 <input id="always-force-name2-checkbox" type="checkbox" />
38833891 <small data-i18n="Always add character's name to prompt">
38843892 Always add character's name to prompt
38853893 </small>
38863894 </label>
38873895 <label class="checkbox_label" for="single_line" data-cc-null>
38883896 <input id="single_line" type="checkbox" />
38893897 <small data-i18n="Generate only one line per request">
38903898 Generate only one line per request
@@ -3907,11 +3915,11 @@
39073915 Trim Incomplete Sentences
39083916 </small>
39093917 </label>
39103918 <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." data-cc-null>
39113919 <input id="context_use_stop_strings" type="checkbox" />
39123920 <small data-i18n="Separators as Stop Strings">Separators as Stop Strings</small>
39133921 </label>
39143922 <label class="checkbox_label" title="Add Character and User names to a list of stopping strings." data-i18n="[title]Add Character and User names to a list of stopping strings." data-cc-null>
39153923 <input id="context_names_as_stop_strings" type="checkbox" />
39163924 <small data-i18n="Names as Stop Strings">Names as Stop Strings</small>
39173925 </label>
@@ -3919,7 +3927,7 @@
39193927 </div>
39203928 </div>
39213929 </div>
39223930 <div id="InstructSettingsColumn" class="flex-container flexNoGap flexFlowColumn flex1" data-cc-null>
39233931 <h4 class="standoutHeader title_restorable justifySpaceBetween">
39243932 <div class="flex-container">
39253933 <span data-i18n="Instruct Template">Instruct Template</span>
@@ -4113,7 +4121,7 @@
41134121 </div>
41144122 </div>
41154123 <div id="SystemPromptColumn" class="flex-container flexNoGap flexFlowColumn flex1">
41164124 <h4 class="standoutHeader title_restorable justifySpaceBetween" data-cc-null>
41174125 <div class="flex-container">
41184126 <span data-i18n="System Prompt">System Prompt</span>
41194127 </div>
@@ -4124,7 +4132,7 @@
41244132 </label>
41254133 </div>
41264134 </h4>
41274135 <div id="SystemPromptBlock" class="marginBot10" data-cc-null>
41284136 <div class="flex-container" title="Select your current System Prompt" data-i18n="[title]Select your current System Prompt">
41294137 <select id="sysprompt_select" data-preset-manager-for="sysprompt" class="flex1 text_pole"></select>
41304138 <div class="flex-container margin0 justifyCenter gap3px">
@@ -4182,7 +4190,7 @@
41824190 </label>
41834191 </div>
41844192
41854193 <div name="tokenizerSettingsBlock" data-cc-null>
41864194 <div name="tokenizerSelectorBlock">
41874195 <h4 class="standoutHeader"><span data-i18n="Tokenizer">Tokenizer</span>
41884196 <a href="https://docs.sillytavern.app/usage/prompts/tokenizer/" class="notes-link" target="_blank">
@@ -4295,7 +4303,7 @@
42954303 </div>
42964304 <div>
42974305 <h4 class="standoutHeader" data-i18n="Miscellaneous">Miscellaneous</h4>
42984306 <div name="bindModelPresetBlock" data-cc-null>
42994307 <label for="bind_model_templates" class="checkbox_label">
43004308 <input id="bind_model_templates" type="checkbox" />
43014309 <small data-i18n="Bind Model to Templates">Bind Model to Templates</small>