Merge branch 'staging' into delete-newbie-mode

4de3b10af2d1ffb792f1c65ec282e3c743ae2ff9

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

14 files changed, +689 -581Showing whitespace changes
public/css/mobile-styles.css+0 -1
@@ -344,7 +344,6 @@
344344
345@media screen and (min-width: 1001px) {345@media screen and (min-width: 1001px) {
346346
347 #PygOverrides,
348 #ContextFormatting,347 #ContextFormatting,
349 #UI-Theme-Block,348 #UI-Theme-Block,
350 #UI-Customization,349 #UI-Customization,
public/css/st-tailwind.css+6 -1
@@ -360,6 +360,10 @@
360 margin-right: 2px;360 margin-right: 2px;
361}361}
362362
363.flexAuto {
364 flex: auto;
365}
366
363.flex0 {367.flex0 {
364 flex: 0;368 flex: 0;
365}369}
@@ -490,7 +494,8 @@
490}494}
491495
492input:disabled,496input:disabled,
493textarea:disabled {497textarea:disabled,
498.disabled {
494 cursor: not-allowed;499 cursor: not-allowed;
495 filter: brightness(0.5);500 filter: brightness(0.5);
496}501}
public/index.html+431 -521
@@ -1488,7 +1488,7 @@
1488 </div>1488 </div>
1489 <div data-tg-type="mancer, ooba, koboldcpp, vllm, aphrodite, llamacpp, ollama, infermaticai, huggingface" data-newbie-hidden class="flex-container flexFlowColumn alignitemscenter flexBasis48p flexGrow flexShrink gap0">1489 <div data-tg-type="mancer, ooba, koboldcpp, vllm, aphrodite, llamacpp, ollama, infermaticai, huggingface" data-newbie-hidden class="flex-container flexFlowColumn alignitemscenter flexBasis48p flexGrow flexShrink gap0">
1490 <small data-i18n="Seed" class="textAlignCenter">Seed</small>1490 <small data-i18n="Seed" class="textAlignCenter">Seed</small>
1491 <input type="number" id="seed_textgenerationwebui" class="text_pole textAlignCenter" min="-1" value="-1" maxlength="100" />1491 <input type="number" id="seed_textgenerationwebui" class="text_pole textAlignCenter" min="-1" value="-1" />
1492 </div>1492 </div>
1493 <div id="banned_tokens_block_ooba" data-newbie-hidden class="wide100p">1493 <div id="banned_tokens_block_ooba" data-newbie-hidden class="wide100p">
1494 <hr data-newbie-hidden class="width100p">1494 <hr data-newbie-hidden class="width100p">
@@ -1820,12 +1820,12 @@
1820 <span id="claude_assistant_prefill_text" data-i18n="Assistant Prefill">Assistant Prefill</span>1820 <span id="claude_assistant_prefill_text" data-i18n="Assistant Prefill">Assistant Prefill</span>
1821 <i class="editor_maximize fa-solid fa-maximize right_menu_button" data-for="claude_assistant_prefill" title="Expand the editor" data-i18n="[title]Expand the editor"></i>1821 <i class="editor_maximize fa-solid fa-maximize right_menu_button" data-for="claude_assistant_prefill" title="Expand the editor" data-i18n="[title]Expand the editor"></i>
1822 </div>1822 </div>
1823 <textarea id="claude_assistant_prefill" class="text_pole textarea_compact" name="assistant_prefill" rows="6" maxlength="100000" data-i18n="[placeholder]Start Claude's answer with..." placeholder="Start Claude's answer with..."></textarea>1823 <textarea id="claude_assistant_prefill" class="text_pole textarea_compact" name="assistant_prefill" rows="6" data-i18n="[placeholder]Start Claude's answer with..." placeholder="Start Claude's answer with..."></textarea>
1824 <div class="flex-container alignItemsCenter">1824 <div class="flex-container alignItemsCenter">
1825 <span id="claude_assistant_impersonation_text" data-i18n="Assistant Impersonation Prefill">Assistant Impersonation Prefill</span>1825 <span id="claude_assistant_impersonation_text" data-i18n="Assistant Impersonation Prefill">Assistant Impersonation Prefill</span>
1826 <i class="editor_maximize fa-solid fa-maximize right_menu_button" data-for="claude_assistant_impersonation" title="Expand the editor" data-i18n="[title]Expand the editor"></i>1826 <i class="editor_maximize fa-solid fa-maximize right_menu_button" data-for="claude_assistant_impersonation" title="Expand the editor" data-i18n="[title]Expand the editor"></i>
1827 </div>1827 </div>
1828 <textarea id="claude_assistant_impersonation" class="text_pole textarea_compact" name="assistant_impersonation" rows="6" maxlength="100000" data-i18n="[placeholder]Start Claude's answer with..." placeholder="Start Claude's answer with..."></textarea>1828 <textarea id="claude_assistant_impersonation" class="text_pole textarea_compact" name="assistant_impersonation" rows="6" data-i18n="[placeholder]Start Claude's answer with..." placeholder="Start Claude's answer with..."></textarea>
1829 </div>1829 </div>
1830 <label for="claude_use_sysprompt" class="checkbox_label widthFreeExpand">1830 <label for="claude_use_sysprompt" class="checkbox_label widthFreeExpand">
1831 <input id="claude_use_sysprompt" type="checkbox" />1831 <input id="claude_use_sysprompt" type="checkbox" />
@@ -1951,7 +1951,7 @@
1951 <a id="horde_kudos" href="javascript:void(0);">View my Kudos</a>1951 <a id="horde_kudos" href="javascript:void(0);">View my Kudos</a>
1952 </div> -->1952 </div> -->
1953 <div class="flex-container">1953 <div class="flex-container">
1954 <input id="horde_api_key" name="horde_api_key" class="text_pole flex1" maxlength="500" type="text" placeholder="0000000000" autocomplete="off">1954 <input id="horde_api_key" name="horde_api_key" class="text_pole flex1" type="text" placeholder="0000000000" autocomplete="off">
1955 <div title="Clear your API key" data-i18n="[title]Clear your API key" class="menu_button fa-solid fa-circle-xmark clear-api-key" data-key="api_key_horde"></div>1955 <div title="Clear your API key" data-i18n="[title]Clear your API key" class="menu_button fa-solid fa-circle-xmark clear-api-key" data-key="api_key_horde"></div>
1956 </div>1956 </div>
1957 <div data-for="horde_api_key" class="neutral_warning" data-i18n="For privacy reasons, your API key will be hidden after you reload the page.">1957 <div data-for="horde_api_key" class="neutral_warning" data-i18n="For privacy reasons, your API key will be hidden after you reload the page.">
@@ -1978,7 +1978,7 @@
1978 <div id="kobold_api_block">1978 <div id="kobold_api_block">
1979 <h4 data-i18n="API url">API url</h4>1979 <h4 data-i18n="API url">API url</h4>
1980 <small data-i18n="Example: http://127.0.0.1:5000/api ">Example: http://127.0.0.1:5000/api </small>1980 <small data-i18n="Example: http://127.0.0.1:5000/api ">Example: http://127.0.0.1:5000/api </small>
1981 <input id="api_url_text" name="api_url" class="text_pole" placeholder="http://127.0.0.1:5000/api" maxlength="500" value="" autocomplete="off" data-server-history="kobold">1981 <input id="api_url_text" name="api_url" class="text_pole" placeholder="http://127.0.0.1:5000/api" value="" autocomplete="off" data-server-history="kobold">
1982 <div id="koboldcpp_hint" class="neutral_warning displayNone">1982 <div id="koboldcpp_hint" class="neutral_warning displayNone">
1983 KoboldCpp works better when you select the Text Completion API and then KoboldCpp as a type!1983 KoboldCpp works better when you select the Text Completion API and then KoboldCpp as a type!
1984 </div>1984 </div>
@@ -2006,7 +2006,7 @@
2006 </ol>2006 </ol>
2007 </span>2007 </span>
2008 <div class="flex-container">2008 <div class="flex-container">
2009 <input id="api_key_novel" name="api_key_novel" class="text_pole flex1 wide100p" maxlength="500" size="35" type="text" autocomplete="off">2009 <input id="api_key_novel" name="api_key_novel" class="text_pole flex1 wide100p" type="text" autocomplete="off">
2010 <div title="Clear your API key" data-i18n="[title]Clear your API key" class="menu_button fa-solid fa-circle-xmark clear-api-key" data-key="api_key_novel">2010 <div title="Clear your API key" data-i18n="[title]Clear your API key" class="menu_button fa-solid fa-circle-xmark clear-api-key" data-key="api_key_novel">
2011 </div>2011 </div>
2012 </div>2012 </div>
@@ -2056,7 +2056,7 @@
2056 <div data-tg-type="togetherai" class="flex-container flexFlowColumn">2056 <div data-tg-type="togetherai" class="flex-container flexFlowColumn">
2057 <h4 data-i18n="TogetherAI API Key">TogetherAI API Key</h4>2057 <h4 data-i18n="TogetherAI API Key">TogetherAI API Key</h4>
2058 <div class="flex-container">2058 <div class="flex-container">
2059 <input id="api_key_togetherai" name="api_key_togetherai" class="text_pole flex1" maxlength="500" value="" type="text" autocomplete="off">2059 <input id="api_key_togetherai" name="api_key_togetherai" class="text_pole flex1" value="" type="text" autocomplete="off">
2060 <div title="Clear your API key" data-i18n="[title]Clear your API key" class="menu_button fa-solid fa-circle-xmark clear-api-key" data-key="api_key_togetherai"></div>2060 <div title="Clear your API key" data-i18n="[title]Clear your API key" class="menu_button fa-solid fa-circle-xmark clear-api-key" data-key="api_key_togetherai"></div>
2061 </div>2061 </div>
2062 <div data-for="api_key_togetherai" class="neutral_warning" data-i18n="For privacy reasons, your API key will be hidden after you reload the page.">2062 <div data-for="api_key_togetherai" class="neutral_warning" data-i18n="For privacy reasons, your API key will be hidden after you reload the page.">
@@ -2080,7 +2080,7 @@
2080 <a href="https://openrouter.ai/account" target="_blank" data-i18n="View Remaining Credits">View Remaining Credits</a>2080 <a href="https://openrouter.ai/account" target="_blank" data-i18n="View Remaining Credits">View Remaining Credits</a>
2081 </div>2081 </div>
2082 <div class="flex-container">2082 <div class="flex-container">
2083 <input id="api_key_openrouter-tg" name="api_key_openrouter" class="text_pole flex1 api_key_openrouter" maxlength="500" value="" type="text" autocomplete="off">2083 <input id="api_key_openrouter-tg" name="api_key_openrouter" class="text_pole flex1 api_key_openrouter" value="" type="text" autocomplete="off">
2084 <div title="Clear your API key" data-i18n="[title]Clear your API key" class="menu_button fa-solid fa-circle-xmark clear-api-key" data-key="api_key_openrouter"></div>2084 <div title="Clear your API key" data-i18n="[title]Clear your API key" class="menu_button fa-solid fa-circle-xmark clear-api-key" data-key="api_key_openrouter"></div>
2085 </div>2085 </div>
2086 <div data-for="api_key_openrouter" class="neutral_warning" data-i18n="For privacy reasons, your API key will be hidden after you reload the page.">2086 <div data-for="api_key_openrouter" class="neutral_warning" data-i18n="For privacy reasons, your API key will be hidden after you reload the page.">
@@ -2107,7 +2107,7 @@
2107 <div data-tg-type="infermaticai" class="flex-container flexFlowColumn">2107 <div data-tg-type="infermaticai" class="flex-container flexFlowColumn">
2108 <h4 data-i18n="InfermaticAI API Key">InfermaticAI API Key</h4>2108 <h4 data-i18n="InfermaticAI API Key">InfermaticAI API Key</h4>
2109 <div class="flex-container">2109 <div class="flex-container">
2110 <input id="api_key_infermaticai" name="api_key_infermaticai" class="text_pole flex1" maxlength="500" value="" type="text" autocomplete="off">2110 <input id="api_key_infermaticai" name="api_key_infermaticai" class="text_pole flex1" value="" type="text" autocomplete="off">
2111 <div title="Clear your API key" data-i18n="[title]Clear your API key" class="menu_button fa-solid fa-circle-xmark clear-api-key" data-key="api_key_infermaticai"></div>2111 <div title="Clear your API key" data-i18n="[title]Clear your API key" class="menu_button fa-solid fa-circle-xmark clear-api-key" data-key="api_key_infermaticai"></div>
2112 </div>2112 </div>
2113 <div data-for="api_key_infermaticai" class="neutral_warning" data-i18n="For privacy reasons, your API key will be hidden after you reload the page.">2113 <div data-for="api_key_infermaticai" class="neutral_warning" data-i18n="For privacy reasons, your API key will be hidden after you reload the page.">
@@ -2130,7 +2130,7 @@
2130 </a>2130 </a>
2131 </h4>2131 </h4>
2132 <div class="flex-container">2132 <div class="flex-container">
2133 <input id="api_key_dreamgen" name="api_key_dreamgen" class="text_pole flex1" maxlength="500" value="" type="text" autocomplete="off">2133 <input id="api_key_dreamgen" name="api_key_dreamgen" class="text_pole flex1" value="" type="text" autocomplete="off">
2134 <div title="Clear your API key" data-i18n="[title]Clear your API key" class="menu_button fa-solid fa-circle-xmark clear-api-key" data-key="api_key_dreamgen"></div>2134 <div title="Clear your API key" data-i18n="[title]Clear your API key" class="menu_button fa-solid fa-circle-xmark clear-api-key" data-key="api_key_dreamgen"></div>
2135 </div>2135 </div>
2136 <div data-for="api_key_dreamgen" class="neutral_warning" data-i18n="For privacy reasons, your API key will be hidden after you reload the page.">2136 <div data-for="api_key_dreamgen" class="neutral_warning" data-i18n="For privacy reasons, your API key will be hidden after you reload the page.">
@@ -2155,7 +2155,7 @@
2155 </a>2155 </a>
2156 </h4>2156 </h4>
2157 <div class="flex-container">2157 <div class="flex-container">
2158 <input id="api_key_mancer" name="api_key_mancer" class="text_pole flex1 wide100p" maxlength="500" size="35" type="text" autocomplete="off">2158 <input id="api_key_mancer" name="api_key_mancer" class="text_pole flex1 wide100p" type="text" autocomplete="off">
2159 <div title="Clear your API key" data-i18n="[title]Clear your API key" class="menu_button fa-solid fa-circle-xmark clear-api-key" data-key="api_key_mancer">2159 <div title="Clear your API key" data-i18n="[title]Clear your API key" class="menu_button fa-solid fa-circle-xmark clear-api-key" data-key="api_key_mancer">
2160 </div>2160 </div>
2161 </div>2161 </div>
@@ -2185,7 +2185,7 @@
2185 </div>2185 </div>
2186 <h4 data-i18n="API key (optional)">API key (optional)</h4>2186 <h4 data-i18n="API key (optional)">API key (optional)</h4>
2187 <div class="flex-container">2187 <div class="flex-container">
2188 <input id="api_key_ooba" name="api_key_ooba" class="text_pole flex1 wide100p" maxlength="500" size="35" type="text" autocomplete="off">2188 <input id="api_key_ooba" name="api_key_ooba" class="text_pole flex1 wide100p" type="text" autocomplete="off">
2189 <div title="Clear your API key" data-i18n="[title]Clear your API key" class="menu_button fa-solid fa-circle-xmark clear-api-key" data-key="api_key_ooba">2189 <div title="Clear your API key" data-i18n="[title]Clear your API key" class="menu_button fa-solid fa-circle-xmark clear-api-key" data-key="api_key_ooba">
2190 </div>2190 </div>
2191 </div>2191 </div>
@@ -2195,9 +2195,9 @@
2195 <div class="flex1">2195 <div class="flex1">
2196 <h4 data-i18n="Server url">Server URL</h4>2196 <h4 data-i18n="Server url">Server URL</h4>
2197 <small data-i18n="Example: 127.0.0.1:5000">Example: http://127.0.0.1:5000</small>2197 <small data-i18n="Example: 127.0.0.1:5000">Example: http://127.0.0.1:5000</small>
2198 <input id="textgenerationwebui_api_url_text" name="textgenerationwebui_api_url" class="text_pole wide100p" maxlength="500" value="" autocomplete="off" data-server-history="ooba_blocking">2198 <input id="textgenerationwebui_api_url_text" name="textgenerationwebui_api_url" class="text_pole wide100p" value="" autocomplete="off" data-server-history="ooba_blocking">
2199 </div>2199 </div>
2200 <input id="custom_model_textgenerationwebui" class="text_pole wide100p" maxlength="500" placeholder="Custom model (optional)" data-i18n="[placeholder]Custom model (optional)" type="text">2200 <input id="custom_model_textgenerationwebui" class="text_pole wide100p" placeholder="Custom model (optional)" data-i18n="[placeholder]Custom model (optional)" type="text">
2201 </div>2201 </div>
2202 <div data-tg-type="featherless" class="flex-container flexFlowColumn">2202 <div data-tg-type="featherless" class="flex-container flexFlowColumn">
2203 <div class="flex-container flexFlowColumn">2203 <div class="flex-container flexFlowColumn">
@@ -2207,7 +2207,7 @@
2207 </div>2207 </div>
2208 <h4 data-i18n="API key (optional)">API key</h4>2208 <h4 data-i18n="API key (optional)">API key</h4>
2209 <div class="flex-container">2209 <div class="flex-container">
2210 <input id="api_key_featherless" name="api_key_featherless" class="text_pole flex1 wide100p" maxlength="500" size="35" type="text" autocomplete="off">2210 <input id="api_key_featherless" name="api_key_featherless" class="text_pole flex1 wide100p" type="text" autocomplete="off">
2211 <div title="Clear your API key" data-i18n="[title]Clear your API key" class="menu_button fa-solid fa-circle-xmark clear-api-key" data-key="api_key_featherless">2211 <div title="Clear your API key" data-i18n="[title]Clear your API key" class="menu_button fa-solid fa-circle-xmark clear-api-key" data-key="api_key_featherless">
2212 </div>2212 </div>
2213 </div>2213 </div>
@@ -2228,7 +2228,7 @@
2228 </div>2228 </div>
2229 <h4 data-i18n="vLLM API key">vLLM API key</h4>2229 <h4 data-i18n="vLLM API key">vLLM API key</h4>
2230 <div class="flex-container">2230 <div class="flex-container">
2231 <input id="api_key_vllm" name="api_key_vllm" class="text_pole flex1 wide100p" maxlength="500" size="35" type="text" autocomplete="off">2231 <input id="api_key_vllm" name="api_key_vllm" class="text_pole flex1 wide100p" type="text" autocomplete="off">
2232 <div title="Clear your API key" data-i18n="[title]Clear your API key" class="menu_button fa-solid fa-circle-xmark clear-api-key" data-key="api_key_vllm">2232 <div title="Clear your API key" data-i18n="[title]Clear your API key" class="menu_button fa-solid fa-circle-xmark clear-api-key" data-key="api_key_vllm">
2233 </div>2233 </div>
2234 </div>2234 </div>
@@ -2238,7 +2238,7 @@
2238 <div class="flex1">2238 <div class="flex1">
2239 <h4 data-i18n="API url">API URL</h4>2239 <h4 data-i18n="API url">API URL</h4>
2240 <small data-i18n="Example: 127.0.0.1:8000">Example: http://127.0.0.1:8000</small>2240 <small data-i18n="Example: 127.0.0.1:8000">Example: http://127.0.0.1:8000</small>
2241 <input id="vllm_api_url_text" class="text_pole wide100p" maxlength="500" value="" autocomplete="off" data-server-history="vllm">2241 <input id="vllm_api_url_text" class="text_pole wide100p" value="" autocomplete="off" data-server-history="vllm">
2242 </div>2242 </div>
2243 <div>2243 <div>
2244 <h4 data-i18n="vLLM Model">vLLM Model</h4>2244 <h4 data-i18n="vLLM Model">vLLM Model</h4>
@@ -2252,7 +2252,7 @@
2252 <div data-tg-type="huggingface">2252 <div data-tg-type="huggingface">
2253 <h4 data-i18n="HuggingFace Token">HuggingFace Token</h4>2253 <h4 data-i18n="HuggingFace Token">HuggingFace Token</h4>
2254 <div class="flex-container">2254 <div class="flex-container">
2255 <input id="api_key_huggingface" name="api_key_huggingface" class="text_pole flex1 wide100p" maxlength="500" size="35" type="text" autocomplete="off">2255 <input id="api_key_huggingface" name="api_key_huggingface" class="text_pole flex1 wide100p" type="text" autocomplete="off">
2256 <div title="Clear your API key" data-i18n="[title]Clear your API key" class="menu_button fa-solid fa-circle-xmark clear-api-key" data-key="api_key_huggingface">2256 <div title="Clear your API key" data-i18n="[title]Clear your API key" class="menu_button fa-solid fa-circle-xmark clear-api-key" data-key="api_key_huggingface">
2257 </div>2257 </div>
2258 </div>2258 </div>
@@ -2262,7 +2262,7 @@
2262 <div class="flex1">2262 <div class="flex1">
2263 <h4 data-i18n="Endpoint URL">Endpoint URL</h4>2263 <h4 data-i18n="Endpoint URL">Endpoint URL</h4>
2264 <small data-i18n="Example: https://****.endpoints.huggingface.cloud">Example: https://****.endpoints.huggingface.cloud</small>2264 <small data-i18n="Example: https://****.endpoints.huggingface.cloud">Example: https://****.endpoints.huggingface.cloud</small>
2265 <input id="huggingface_api_url_text" class="text_pole wide100p" maxlength="500" value="" autocomplete="off" data-server-history="huggingface">2265 <input id="huggingface_api_url_text" class="text_pole wide100p" value="" autocomplete="off" data-server-history="huggingface">
2266 </div>2266 </div>
2267 </div>2267 </div>
22682268
@@ -2274,7 +2274,7 @@
2274 </div>2274 </div>
2275 <h4 data-i18n="Aphrodite API key">Aphrodite API key</h4>2275 <h4 data-i18n="Aphrodite API key">Aphrodite API key</h4>
2276 <div class="flex-container">2276 <div class="flex-container">
2277 <input id="api_key_aphrodite" name="api_key_aphrodite" class="text_pole flex1 wide100p" maxlength="500" size="35" type="text" autocomplete="off">2277 <input id="api_key_aphrodite" name="api_key_aphrodite" class="text_pole flex1 wide100p" type="text" autocomplete="off">
2278 <div title="Clear your API key" data-i18n="[title]Clear your API key" class="menu_button fa-solid fa-circle-xmark clear-api-key" data-key="api_key_aphrodite">2278 <div title="Clear your API key" data-i18n="[title]Clear your API key" class="menu_button fa-solid fa-circle-xmark clear-api-key" data-key="api_key_aphrodite">
2279 </div>2279 </div>
2280 </div>2280 </div>
@@ -2284,7 +2284,7 @@
2284 <div class="flex1">2284 <div class="flex1">
2285 <h4 data-i18n="API url">API URL</h4>2285 <h4 data-i18n="API url">API URL</h4>
2286 <small data-i18n="Example: 127.0.0.1:5000">Example: http://127.0.0.1:5000</small>2286 <small data-i18n="Example: 127.0.0.1:5000">Example: http://127.0.0.1:5000</small>
2287 <input id="aphrodite_api_url_text" class="text_pole wide100p" maxlength="500" value="" autocomplete="off" data-server-history="aphrodite">2287 <input id="aphrodite_api_url_text" class="text_pole wide100p" value="" autocomplete="off" data-server-history="aphrodite">
2288 </div>2288 </div>
2289 <div>2289 <div>
2290 <h4 data-i18n="Aphrodite Model">Aphrodite Model</h4>2290 <h4 data-i18n="Aphrodite Model">Aphrodite Model</h4>
@@ -2303,7 +2303,7 @@
2303 </div>2303 </div>
2304 <h4 data-i18n="API key (optional)">API key (optional)</h4>2304 <h4 data-i18n="API key (optional)">API key (optional)</h4>
2305 <div class="flex-container">2305 <div class="flex-container">
2306 <input id="api_key_llamacpp" name="api_key_llamacpp" class="text_pole flex1 wide100p" maxlength="500" size="35" type="text" autocomplete="off">2306 <input id="api_key_llamacpp" name="api_key_llamacpp" class="text_pole flex1 wide100p" type="text" autocomplete="off">
2307 <div title="Clear your API key" data-i18n="[title]Clear your API key" class="menu_button fa-solid fa-circle-xmark clear-api-key" data-key="api_key_llamacpp">2307 <div title="Clear your API key" data-i18n="[title]Clear your API key" class="menu_button fa-solid fa-circle-xmark clear-api-key" data-key="api_key_llamacpp">
2308 </div>2308 </div>
2309 </div>2309 </div>
@@ -2313,7 +2313,7 @@
2313 <div class="flex1">2313 <div class="flex1">
2314 <h4 data-i18n="API url">API URL</h4>2314 <h4 data-i18n="API url">API URL</h4>
2315 <small data-i18n="Example: 127.0.0.1:8080">Example: http://127.0.0.1:8080</small>2315 <small data-i18n="Example: 127.0.0.1:8080">Example: http://127.0.0.1:8080</small>
2316 <input id="llamacpp_api_url_text" class="text_pole wide100p" maxlength="500" value="" autocomplete="off" data-server-history="llamacpp">2316 <input id="llamacpp_api_url_text" class="text_pole wide100p" value="" autocomplete="off" data-server-history="llamacpp">
2317 </div>2317 </div>
2318 </div>2318 </div>
2319 <div data-tg-type="ollama">2319 <div data-tg-type="ollama">
@@ -2325,7 +2325,7 @@
2325 <div class="flex1">2325 <div class="flex1">
2326 <h4 data-i18n="API url">API URL</h4>2326 <h4 data-i18n="API url">API URL</h4>
2327 <small data-i18n="Example: 127.0.0.1:11434">Example: http://127.0.0.1:11434</small>2327 <small data-i18n="Example: 127.0.0.1:11434">Example: http://127.0.0.1:11434</small>
2328 <input id="ollama_api_url_text" class="text_pole wide100p" maxlength="500" value="" autocomplete="off" data-server-history="ollama">2328 <input id="ollama_api_url_text" class="text_pole wide100p" value="" autocomplete="off" data-server-history="ollama">
2329 </div>2329 </div>
2330 <div class="flex1">2330 <div class="flex1">
2331 <h4>2331 <h4>
@@ -2351,7 +2351,7 @@
2351 </div>2351 </div>
2352 <h4 data-i18n="Tabby API key">Tabby API key</h4>2352 <h4 data-i18n="Tabby API key">Tabby API key</h4>
2353 <div class="flex-container">2353 <div class="flex-container">
2354 <input id="api_key_tabby" name="api_key_tabby" class="text_pole flex1 wide100p" maxlength="500" size="35" type="text" autocomplete="off">2354 <input id="api_key_tabby" name="api_key_tabby" class="text_pole flex1 wide100p" type="text" autocomplete="off">
2355 <div title="Clear your API key" data-i18n="[title]Clear your API key" class="menu_button fa-solid fa-circle-xmark clear-api-key" data-key="api_key_tabby">2355 <div title="Clear your API key" data-i18n="[title]Clear your API key" class="menu_button fa-solid fa-circle-xmark clear-api-key" data-key="api_key_tabby">
2356 </div>2356 </div>
2357 </div>2357 </div>
@@ -2361,7 +2361,7 @@
2361 <div class="flex1">2361 <div class="flex1">
2362 <h4 data-i18n="API url">API URL</h4>2362 <h4 data-i18n="API url">API URL</h4>
2363 <small data-i18n="Example: 127.0.0.1:5000">Example: http://127.0.0.1:5000</small>2363 <small data-i18n="Example: 127.0.0.1:5000">Example: http://127.0.0.1:5000</small>
2364 <input id="tabby_api_url_text" class="text_pole wide100p" maxlength="500" value="" autocomplete="off" data-server-history="tabby">2364 <input id="tabby_api_url_text" class="text_pole wide100p" value="" autocomplete="off" data-server-history="tabby">
2365 </div>2365 </div>
2366 <div class="flex1">2366 <div class="flex1">
2367 <h4>2367 <h4>
@@ -2382,7 +2382,7 @@
2382 </div>2382 </div>
2383 <h4 data-i18n="koboldcpp API key (optional)">koboldcpp API key (optional)</h4>2383 <h4 data-i18n="koboldcpp API key (optional)">koboldcpp API key (optional)</h4>
2384 <div class="flex-container">2384 <div class="flex-container">
2385 <input id="api_key_koboldcpp" name="api_key_koboldcpp" class="text_pole flex1 wide100p" maxlength="500" size="35" type="text" autocomplete="off">2385 <input id="api_key_koboldcpp" name="api_key_koboldcpp" class="text_pole flex1 wide100p" type="text" autocomplete="off">
2386 <div title="Clear your API key" data-i18n="[title]Clear your API key" class="menu_button fa-solid fa-circle-xmark clear-api-key" data-key="api_key_koboldcpp">2386 <div title="Clear your API key" data-i18n="[title]Clear your API key" class="menu_button fa-solid fa-circle-xmark clear-api-key" data-key="api_key_koboldcpp">
2387 </div>2387 </div>
2388 </div>2388 </div>
@@ -2392,7 +2392,7 @@
2392 <div class="flex1">2392 <div class="flex1">
2393 <h4 data-i18n="API url">API URL</h4>2393 <h4 data-i18n="API url">API URL</h4>
2394 <small data-i18n="Example: 127.0.0.1:5001">Example: http://127.0.0.1:5001</small>2394 <small data-i18n="Example: 127.0.0.1:5001">Example: http://127.0.0.1:5001</small>
2395 <input id="koboldcpp_api_url_text" class="text_pole wide100p" maxlength="500" value="" autocomplete="off" data-server-history="koboldcpp">2395 <input id="koboldcpp_api_url_text" class="text_pole wide100p" value="" autocomplete="off" data-server-history="koboldcpp">
2396 </div>2396 </div>
2397 </div>2397 </div>
2398 <div class="flex-container">2398 <div class="flex-container">
@@ -2467,7 +2467,7 @@
2467 </span>2467 </span>
2468 </div>2468 </div>
2469 <div class="wide100p">2469 <div class="wide100p">
2470 <input id="openai_reverse_proxy_name" type="text" class="text_pole" placeholder="..." maxlength="100" />2470 <input id="openai_reverse_proxy_name" type="text" class="text_pole" placeholder="..." />
2471 </div>2471 </div>
2472 <div class="range-block-title justifyLeft" data-i18n="Proxy Server URL">2472 <div class="range-block-title justifyLeft" data-i18n="Proxy Server URL">
2473 Proxy Server URL2473 Proxy Server URL
@@ -2478,7 +2478,7 @@
2478 </span>2478 </span>
2479 </div>2479 </div>
2480 <div class="wide100p">2480 <div class="wide100p">
2481 <input id="openai_reverse_proxy" type="text" class="text_pole" placeholder="https://api.openai.com/v1" maxlength="5000" />2481 <input id="openai_reverse_proxy" type="text" class="text_pole" placeholder="https://api.openai.com/v1" />
2482 <small class="reverse_proxy_warning">2482 <small class="reverse_proxy_warning">
2483 <span data-i18n="Doesn't work? Try adding">Doesn't work? Try adding</span> <code>/v1</code> <span data-i18n="at the end!">at the end!</span>2483 <span data-i18n="Doesn't work? Try adding">Doesn't work? Try adding</span> <code>/v1</code> <span data-i18n="at the end!">at the end!</span>
2484 </small>2484 </small>
@@ -2492,7 +2492,7 @@
2492 </span>2492 </span>
2493 </div>2493 </div>
2494 <div class="flex-container width100p">2494 <div class="flex-container width100p">
2495 <input id="openai_proxy_password" type="password" class="text_pole flex1" placeholder="" maxlength="5000" form="openai_form" autocomplete="off" />2495 <input id="openai_proxy_password" type="password" class="text_pole flex1" placeholder="" form="openai_form" autocomplete="off" />
2496 <div id="openai_proxy_password_show" title="Peek a password" data-i18n="[title]Peek a password" class="menu_button fa-solid fa-eye-slash fa-fw"></div>2496 <div id="openai_proxy_password_show" title="Peek a password" data-i18n="[title]Peek a password" class="menu_button fa-solid fa-eye-slash fa-fw"></div>
2497 </div>2497 </div>
2498 </div>2498 </div>
@@ -2533,7 +2533,7 @@
2533 </ol>2533 </ol>
2534 </span>2534 </span>
2535 <div class="flex-container">2535 <div class="flex-container">
2536 <input id="api_key_openai" name="api_key_openai" class="text_pole flex1" maxlength="500" value="" type="text" autocomplete="off">2536 <input id="api_key_openai" name="api_key_openai" class="text_pole flex1" value="" type="text" autocomplete="off">
2537 <div title="Clear your API key" data-i18n="[title]Clear your API key" class="menu_button fa-solid fa-circle-xmark clear-api-key" data-key="api_key_openai"></div>2537 <div title="Clear your API key" data-i18n="[title]Clear your API key" class="menu_button fa-solid fa-circle-xmark clear-api-key" data-key="api_key_openai"></div>
2538 </div>2538 </div>
2539 <div id="ReverseProxyWarningMessage2" class="reverse_proxy_warning">2539 <div id="ReverseProxyWarningMessage2" class="reverse_proxy_warning">
@@ -2618,7 +2618,7 @@
2618 </b>2618 </b>
2619 </div>2619 </div>
2620 <div class="flex-container">2620 <div class="flex-container">
2621 <input id="api_key_claude" name="api_key_claude" class="text_pole flex1" maxlength="500" value="" type="text" autocomplete="off">2621 <input id="api_key_claude" name="api_key_claude" class="text_pole flex1" value="" type="text" autocomplete="off">
2622 <div title="Clear your API key" data-i18n="[title]Clear your API key" class="menu_button fa-solid fa-circle-xmark clear-api-key" data-key="api_key_claude"></div>2622 <div title="Clear your API key" data-i18n="[title]Clear your API key" class="menu_button fa-solid fa-circle-xmark clear-api-key" data-key="api_key_claude"></div>
2623 </div>2623 </div>
2624 <div data-for="api_key_claude" class="neutral_warning" data-i18n="For privacy reasons, your API key will be hidden after you reload the page.">2624 <div data-for="api_key_claude" class="neutral_warning" data-i18n="For privacy reasons, your API key will be hidden after you reload the page.">
@@ -2670,7 +2670,7 @@
2670 <a href="https://openrouter.ai/account" target="_blank" data-i18n="View Remaining Credits">View Remaining Credits</a>2670 <a href="https://openrouter.ai/account" target="_blank" data-i18n="View Remaining Credits">View Remaining Credits</a>
2671 </div>2671 </div>
2672 <div class="flex-container">2672 <div class="flex-container">
2673 <input id="api_key_openrouter" name="api_key_openrouter" class="text_pole flex1 api_key_openrouter" maxlength="500" value="" type="text" autocomplete="off">2673 <input id="api_key_openrouter" name="api_key_openrouter" class="text_pole flex1 api_key_openrouter" value="" type="text" autocomplete="off">
2674 <div title="Clear your API key" data-i18n="[title]Clear your API key" class="menu_button fa-solid fa-circle-xmark clear-api-key" data-key="api_key_openrouter"></div>2674 <div title="Clear your API key" data-i18n="[title]Clear your API key" class="menu_button fa-solid fa-circle-xmark clear-api-key" data-key="api_key_openrouter"></div>
2675 </div>2675 </div>
2676 <div data-for="api_key_openrouter" class="neutral_warning" data-i18n="For privacy reasons, your API key will be hidden after you reload the page.">2676 <div data-for="api_key_openrouter" class="neutral_warning" data-i18n="For privacy reasons, your API key will be hidden after you reload the page.">
@@ -2746,19 +2746,19 @@
2746 <div id="normal_scale_form">2746 <div id="normal_scale_form">
2747 <h4 data-i18n="Scale API Key">Scale API Key</h4>2747 <h4 data-i18n="Scale API Key">Scale API Key</h4>
2748 <div class="flex-container">2748 <div class="flex-container">
2749 <input id="api_key_scale" name="api_key_scale" class="text_pole flex1" maxlength="500" value="" autocomplete="off">2749 <input id="api_key_scale" name="api_key_scale" class="text_pole flex1" value="" autocomplete="off">
2750 <div title="Clear your API key" data-i18n="[title]Clear your API key" class="menu_button fa-solid fa-circle-xmark clear-api-key" data-key="api_key_scale"></div>2750 <div title="Clear your API key" data-i18n="[title]Clear your API key" class="menu_button fa-solid fa-circle-xmark clear-api-key" data-key="api_key_scale"></div>
2751 </div>2751 </div>
2752 <div data-for="api_key_scale" class="neutral_warning" data-i18n="For privacy reasons, your API key will be hidden after you reload the page.">2752 <div data-for="api_key_scale" class="neutral_warning" data-i18n="For privacy reasons, your API key will be hidden after you reload the page.">
2753 For privacy reasons, your API key will be hidden after you reload the page.2753 For privacy reasons, your API key will be hidden after you reload the page.
2754 </div>2754 </div>
2755 <h4>Scale API URL</h4>2755 <h4>Scale API URL</h4>
2756 <input id="api_url_scale" name="api_url_scale" class="text_pole" maxlength="500" value="" autocomplete="off" placeholder="https://dashboard.scale.com/spellbook/api/v2/deploy/xxxxxxx">2756 <input id="api_url_scale" name="api_url_scale" class="text_pole" value="" autocomplete="off" placeholder="https://dashboard.scale.com/spellbook/api/v2/deploy/xxxxxxx">
2757 </div>2757 </div>
2758 <div id="alt_scale_form">2758 <div id="alt_scale_form">
2759 <h4>Scale Cookie (_jwt)</h4>2759 <h4>Scale Cookie (_jwt)</h4>
2760 <div class="flex-container">2760 <div class="flex-container">
2761 <input id="scale_cookie" name="scale_cookie" class="text_pole flex1" maxlength="500" value="" autocomplete="off">2761 <input id="scale_cookie" name="scale_cookie" class="text_pole flex1" value="" autocomplete="off">
2762 <div title="Clear your cookie" data-i18n="[title]Clear your cookie" class="menu_button fa-solid fa-circle-xmark clear-api-key" data-key="scale_cookie"></div>2762 <div title="Clear your cookie" data-i18n="[title]Clear your cookie" class="menu_button fa-solid fa-circle-xmark clear-api-key" data-key="scale_cookie"></div>
2763 </div>2763 </div>
2764 <div data-for="scale_cookie" class="neutral_warning">2764 <div data-for="scale_cookie" class="neutral_warning">
@@ -2775,7 +2775,7 @@
2775 <form id="ai21_form" data-source="ai21" action="javascript:void(null);" method="post" enctype="multipart/form-data">2775 <form id="ai21_form" data-source="ai21" action="javascript:void(null);" method="post" enctype="multipart/form-data">
2776 <h4 data-i18n="AI21 API Key">AI21 API Key</h4>2776 <h4 data-i18n="AI21 API Key">AI21 API Key</h4>
2777 <div class="flex-container">2777 <div class="flex-container">
2778 <input id="api_key_ai21" name="api_key_ai21" class="text_pole flex1" maxlength="500" value="" type="text" autocomplete="off">2778 <input id="api_key_ai21" name="api_key_ai21" class="text_pole flex1" value="" type="text" autocomplete="off">
2779 <div title="Clear your API key" data-i18n="[title]Clear your API key" class="menu_button fa-solid fa-circle-xmark clear-api-key" data-key="api_key_ai21"></div>2779 <div title="Clear your API key" data-i18n="[title]Clear your API key" class="menu_button fa-solid fa-circle-xmark clear-api-key" data-key="api_key_ai21"></div>
2780 </div>2780 </div>
2781 <div data-for="api_key_ai21" class="neutral_warning" data-i18n="For privacy reasons, your API key will be hidden after you reload the page.">2781 <div data-for="api_key_ai21" class="neutral_warning" data-i18n="For privacy reasons, your API key will be hidden after you reload the page.">
@@ -2797,7 +2797,7 @@
2797 <form id="makersuite_form" data-source="makersuite" action="javascript:void(null);" method="post" enctype="multipart/form-data">2797 <form id="makersuite_form" data-source="makersuite" action="javascript:void(null);" method="post" enctype="multipart/form-data">
2798 <h4 data-i18n="Google AI Studio API Key">Google AI Studio API Key</h4>2798 <h4 data-i18n="Google AI Studio API Key">Google AI Studio API Key</h4>
2799 <div class="flex-container">2799 <div class="flex-container">
2800 <input id="api_key_makersuite" name="api_key_makersuite" class="text_pole flex1" maxlength="500" value="" type="text" autocomplete="off">2800 <input id="api_key_makersuite" name="api_key_makersuite" class="text_pole flex1" value="" type="text" autocomplete="off">
2801 <div title="Clear your API key" data-i18n="[title]Clear your API key" class="menu_button fa-solid fa-circle-xmark clear-api-key" data-key="api_key_makersuite"></div>2801 <div title="Clear your API key" data-i18n="[title]Clear your API key" class="menu_button fa-solid fa-circle-xmark clear-api-key" data-key="api_key_makersuite"></div>
2802 </div>2802 </div>
2803 <div data-for="api_key_makersuite" class="neutral_warning" data-i18n="For privacy reasons, your API key will be hidden after you reload the page.">2803 <div data-for="api_key_makersuite" class="neutral_warning" data-i18n="For privacy reasons, your API key will be hidden after you reload the page.">
@@ -2836,7 +2836,7 @@
2836 <form id="mistralai_form" data-source="mistralai" action="javascript:void(null);" method="post" enctype="multipart/form-data">2836 <form id="mistralai_form" data-source="mistralai" action="javascript:void(null);" method="post" enctype="multipart/form-data">
2837 <h4 data-i18n="MistralAI API Key">MistralAI API Key</h4>2837 <h4 data-i18n="MistralAI API Key">MistralAI API Key</h4>
2838 <div class="flex-container">2838 <div class="flex-container">
2839 <input id="api_key_mistralai" name="api_key_mistralai" class="text_pole flex1" maxlength="500" value="" type="text" autocomplete="off">2839 <input id="api_key_mistralai" name="api_key_mistralai" class="text_pole flex1" value="" type="text" autocomplete="off">
2840 <div title="Clear your API key" data-i18n="[title]Clear your API key" class="menu_button fa-solid fa-circle-xmark clear-api-key" data-key="api_key_mistralai"></div>2840 <div title="Clear your API key" data-i18n="[title]Clear your API key" class="menu_button fa-solid fa-circle-xmark clear-api-key" data-key="api_key_mistralai"></div>
2841 </div>2841 </div>
2842 <div data-for="api_key_mistralai" class="neutral_warning" data-i18n="For privacy reasons, your API key will be hidden after you reload the page.">2842 <div data-for="api_key_mistralai" class="neutral_warning" data-i18n="For privacy reasons, your API key will be hidden after you reload the page.">
@@ -2875,7 +2875,7 @@
2875 <div id="groq_form" data-source="groq">2875 <div id="groq_form" data-source="groq">
2876 <h4 data-i18n="Groq API Key">Groq API Key</h4>2876 <h4 data-i18n="Groq API Key">Groq API Key</h4>
2877 <div class="flex-container">2877 <div class="flex-container">
2878 <input id="api_key_groq" name="api_key_groq" class="text_pole flex1" maxlength="500" value="" type="text" autocomplete="off">2878 <input id="api_key_groq" name="api_key_groq" class="text_pole flex1" value="" type="text" autocomplete="off">
2879 <div title="Clear your API key" data-i18n="[title]Clear your API key" class="menu_button fa-solid fa-circle-xmark clear-api-key" data-key="api_key_groq"></div>2879 <div title="Clear your API key" data-i18n="[title]Clear your API key" class="menu_button fa-solid fa-circle-xmark clear-api-key" data-key="api_key_groq"></div>
2880 </div>2880 </div>
2881 <div data-for="api_key_groq" class="neutral_warning" data-i18n="For privacy reasons, your API key will be hidden after you reload the page.">2881 <div data-for="api_key_groq" class="neutral_warning" data-i18n="For privacy reasons, your API key will be hidden after you reload the page.">
@@ -2898,7 +2898,7 @@
2898 <div id="perplexity_form" data-source="perplexity">2898 <div id="perplexity_form" data-source="perplexity">
2899 <h4 data-i18n="Perplexity API Key">Perplexity API Key</h4>2899 <h4 data-i18n="Perplexity API Key">Perplexity API Key</h4>
2900 <div class="flex-container">2900 <div class="flex-container">
2901 <input id="api_key_perplexity" name="api_key_perplexity" class="text_pole flex1" maxlength="500" value="" type="text" autocomplete="off">2901 <input id="api_key_perplexity" name="api_key_perplexity" class="text_pole flex1" value="" type="text" autocomplete="off">
2902 <div title="Clear your API key" data-i18n="[title]Clear your API key" class="menu_button fa-solid fa-circle-xmark clear-api-key" data-key="api_key_perplexity"></div>2902 <div title="Clear your API key" data-i18n="[title]Clear your API key" class="menu_button fa-solid fa-circle-xmark clear-api-key" data-key="api_key_perplexity"></div>
2903 </div>2903 </div>
2904 <div data-for="api_key_perplexity" class="neutral_warning" data-i18n="For privacy reasons, your API key will be hidden after you reload the page.">2904 <div data-for="api_key_perplexity" class="neutral_warning" data-i18n="For privacy reasons, your API key will be hidden after you reload the page.">
@@ -2938,7 +2938,7 @@
2938 <form id="cohere_form" data-source="cohere" action="javascript:void(null);" method="post" enctype="multipart/form-data">2938 <form id="cohere_form" data-source="cohere" action="javascript:void(null);" method="post" enctype="multipart/form-data">
2939 <h4 data-i18n="Cohere API Key">Cohere API Key</h4>2939 <h4 data-i18n="Cohere API Key">Cohere API Key</h4>
2940 <div class="flex-container">2940 <div class="flex-container">
2941 <input id="api_key_cohere" name="api_key_cohere" class="text_pole flex1" maxlength="500" value="" type="text" autocomplete="off">2941 <input id="api_key_cohere" name="api_key_cohere" class="text_pole flex1" value="" type="text" autocomplete="off">
2942 <div title="Clear your API key" data-i18n="[title]Clear your API key" class="menu_button fa-solid fa-circle-xmark clear-api-key" data-key="api_key_cohere"></div>2942 <div title="Clear your API key" data-i18n="[title]Clear your API key" class="menu_button fa-solid fa-circle-xmark clear-api-key" data-key="api_key_cohere"></div>
2943 </div>2943 </div>
2944 <div data-for="api_key_cohere" class="neutral_warning" data-i18n="For privacy reasons, your API key will be hidden after you reload the page.">2944 <div data-for="api_key_cohere" class="neutral_warning" data-i18n="For privacy reasons, your API key will be hidden after you reload the page.">
@@ -2966,7 +2966,7 @@
2966 <form id="blockentropy_form" data-source="blockentropy">2966 <form id="blockentropy_form" data-source="blockentropy">
2967 <h4 data-i18n="Block Entropy API Key">Block Entropy API Key</h4>2967 <h4 data-i18n="Block Entropy API Key">Block Entropy API Key</h4>
2968 <div class="flex-container">2968 <div class="flex-container">
2969 <input id="api_key_blockentropy" name="api_key_blockentropy" class="text_pole flex1" maxlength="500" value="" type="text" autocomplete="off">2969 <input id="api_key_blockentropy" name="api_key_blockentropy" class="text_pole flex1" value="" type="text" autocomplete="off">
2970 <div title="Clear your API key" data-i18n="[title]Clear your API key" class="menu_button fa-solid fa-circle-xmark clear-api-key" data-key="api_key_blockentropy"></div>2970 <div title="Clear your API key" data-i18n="[title]Clear your API key" class="menu_button fa-solid fa-circle-xmark clear-api-key" data-key="api_key_blockentropy"></div>
2971 </div>2971 </div>
2972 <div data-for="api_key_blockentropy" class="neutral_warning" data-i18n="For privacy reasons, your API key will be hidden after you reload the page.">2972 <div data-for="api_key_blockentropy" class="neutral_warning" data-i18n="For privacy reasons, your API key will be hidden after you reload the page.">
@@ -2980,7 +2980,7 @@
2980 <form id="custom_form" data-source="custom">2980 <form id="custom_form" data-source="custom">
2981 <h4 data-i18n="Custom Endpoint (Base URL)">Custom Endpoint (Base URL)</h4>2981 <h4 data-i18n="Custom Endpoint (Base URL)">Custom Endpoint (Base URL)</h4>
2982 <div class="flex-container">2982 <div class="flex-container">
2983 <input id="custom_api_url_text" class="text_pole wide100p" maxlength="5000" value="" autocomplete="off" data-i18n="[placeholder]Example: http://localhost:1234/v1" placeholder="Example: http://localhost:1234/v1">2983 <input id="custom_api_url_text" class="text_pole wide100p" value="" autocomplete="off" data-i18n="[placeholder]Example: http://localhost:1234/v1" placeholder="Example: http://localhost:1234/v1">
2984 </div>2984 </div>
2985 <div>2985 <div>
2986 <small>2986 <small>
@@ -2992,7 +2992,7 @@
2992 <small data-i18n="(Optional)">(Optional)</small>2992 <small data-i18n="(Optional)">(Optional)</small>
2993 </h4>2993 </h4>
2994 <div class="flex-container">2994 <div class="flex-container">
2995 <input id="api_key_custom" name="api_key_custom" class="text_pole flex1" maxlength="5000" value="" type="text" autocomplete="off">2995 <input id="api_key_custom" name="api_key_custom" class="text_pole flex1" value="" type="text" autocomplete="off">
2996 <div title="Clear your API key" data-i18n="[title]Clear your API key" class="menu_button fa-solid fa-circle-xmark clear-api-key" data-key="api_key_custom"></div>2996 <div title="Clear your API key" data-i18n="[title]Clear your API key" class="menu_button fa-solid fa-circle-xmark clear-api-key" data-key="api_key_custom"></div>
2997 </div>2997 </div>
2998 <div data-for="api_key_custom" class="neutral_warning" data-i18n="For privacy reasons, your API key will be hidden after you reload the page.">2998 <div data-for="api_key_custom" class="neutral_warning" data-i18n="For privacy reasons, your API key will be hidden after you reload the page.">
@@ -3000,7 +3000,7 @@
3000 </div>3000 </div>
3001 <h4 data-i18n="Enter a Model ID">Enter a Model ID</h4>3001 <h4 data-i18n="Enter a Model ID">Enter a Model ID</h4>
3002 <div class="flex-container">3002 <div class="flex-container">
3003 <input list="model_custom_select_fill" id="custom_model_id" class="text_pole wide100p" maxlength="500" value="" autocomplete="off" data-i18n="[placeholder]Example: gpt-3.5-turbo" placeholder="Example: gpt-3.5-turbo">3003 <input list="model_custom_select_fill" id="custom_model_id" class="text_pole wide100p" value="" autocomplete="off" data-i18n="[placeholder]Example: gpt-3.5-turbo" placeholder="Example: gpt-3.5-turbo">
3004 <datalist id="model_custom_select_fill" class="text_pole model_custom_select"></datalist>3004 <datalist id="model_custom_select_fill" class="text_pole model_custom_select"></datalist>
3005 </div>3005 </div>
3006 <h4 data-i18n="Available Models">Available Models</h4>3006 <h4 data-i18n="Available Models">Available Models</h4>
@@ -3020,7 +3020,7 @@
3020 </a>3020 </a>
3021 </h4>3021 </h4>
3022 <div class="flex-container">3022 <div class="flex-container">
3023 <input id="api_key_01ai" name="api_key_01ai" class="text_pole flex1" maxlength="500" value="" type="text" autocomplete="off">3023 <input id="api_key_01ai" name="api_key_01ai" class="text_pole flex1" value="" type="text" autocomplete="off">
3024 <div title="Clear your API key" data-i18n="[title]Clear your API key" class="menu_button fa-solid fa-circle-xmark clear-api-key" data-key="api_key_01ai"></div>3024 <div title="Clear your API key" data-i18n="[title]Clear your API key" class="menu_button fa-solid fa-circle-xmark clear-api-key" data-key="api_key_01ai"></div>
3025 </div>3025 </div>
3026 <div data-for="api_key_01ai" class="neutral_warning" data-i18n="For privacy reasons, your API key will be hidden after you reload the page.">3026 <div data-for="api_key_01ai" class="neutral_warning" data-i18n="For privacy reasons, your API key will be hidden after you reload the page.">
@@ -3059,8 +3059,8 @@
3059 <h3 class="margin0" data-i18n="Advanced Formatting">3059 <h3 class="margin0" data-i18n="Advanced Formatting">
3060 Advanced Formatting3060 Advanced Formatting
3061 </h3>3061 </h3>
3062 <div class="flex-container">3062 <div class="flex-container spaceEvenly">
3063 <div id="PygOverrides">3063 <div id="ContextSettings" class="flex-container flexNoGap flexFlowColumn flex1">
3064 <div>3064 <div>
3065 <h4 class="standoutHeader title_restorable">3065 <h4 class="standoutHeader title_restorable">
3066 <div>3066 <div>
@@ -3069,32 +3069,32 @@
3069 <span class="fa-solid fa-circle-question note-link-span"></span>3069 <span class="fa-solid fa-circle-question note-link-span"></span>
3070 </a>3070 </a>
3071 </div>3071 </div>
3072 <div class="flex-container">
3073 <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>
3074 <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>
3075 <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>
3076 <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>
3077 </div>
3078 </h4>3072 </h4>
3079 <div class="flex-container">3073 <div class="flex-container justifyCenter">
3080 <select id="context_presets" data-preset-manager-for="context" class="flex1 text_pole"></select>
3081 <input type="file" hidden data-preset-manager-file="context" accept=".json, .settings">3074 <input type="file" hidden data-preset-manager-file="context" accept=".json, .settings">
3082 <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>3075 <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>
3083 <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>3076 <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>
3084 <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>3077 <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>
3078 <i data-preset-manager-import="context" class="menu_button fa-solid fa-file-import" title="Import preset" data-i18n="[title]Import preset"></i>
3079 <i data-preset-manager-export="context" class="menu_button fa-solid fa-file-export" title="Export preset" data-i18n="[title]Export preset"></i>
3080 <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>
3081 <i 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>
3082 </div>
3083 <div class="flex-container">
3084 <select id="context_presets" data-preset-manager-for="context" class="flex1 text_pole"></select>
3085 </div>3085 </div>
3086 <div data-newbie-hidden>3086 <div data-newbie-hidden>
3087 <label for="context_story_string">3087 <label for="context_story_string">
3088 <small data-i18n="Story String">Story String</small>3088 <small data-i18n="Story String">Story String</small>
3089 </label>3089 </label>
3090 <textarea id="context_story_string" class="text_pole textarea_compact autoSetHeight" rows="1"></textarea>3090 <div contenteditable="true" id="context_story_string" class="text_pole textarea_compact"></div>
3091 <div class="flex-container">3091 <div class="flex-container">
3092 <div class="flex1">3092 <div class="flex1">
3093 <label for="context_example_separator">3093 <label for="context_example_separator">
3094 <small data-i18n="Example Separator">Example Separator</small>3094 <small data-i18n="Example Separator">Example Separator</small>
3095 </label>3095 </label>
3096 <div>3096 <div>
3097 <textarea id="context_example_separator" class="text_pole textarea_compact autoSetHeight" maxlength="500" rows="1"></textarea>3097 <div contenteditable="true" id="context_example_separator" class="text_pole textarea_compact"></div>
3098 </div>3098 </div>
3099 </div>3099 </div>
3100 <div class="flex1">3100 <div class="flex1">
@@ -3102,10 +3102,53 @@
3102 <small data-i18n="Chat Start">Chat Start</small>3102 <small data-i18n="Chat Start">Chat Start</small>
3103 </label>3103 </label>
3104 <div>3104 <div>
3105 <textarea id="context_chat_start" class="text_pole textarea_compact autoSetHeight" maxlength="500" rows="1"></textarea>3105 <div contenteditable="true" id="context_chat_start" class="text_pole textarea_compact"></div>
3106 </div>3106 </div>
3107 </div>3107 </div>
3108 </div>3108 </div>
3109 <div>
3110 <h4 class="standoutHeader">
3111 <span data-i18n="Context Formatting">
3112 Context Formatting
3113 </span>
3114 <small data-i18n="(Saves to Template)">
3115 (Saves to Template)
3116 </small>
3117 </h4>
3118
3119 <label class="checkbox_label" for="always-force-name2-checkbox">
3120 <input id="always-force-name2-checkbox" type="checkbox" />
3121 <small data-i18n="Always add character's name to prompt">
3122 Always add character's name to prompt
3123 </small>
3124 </label>
3125 <label class="checkbox_label" for="single_line">
3126 <input id="single_line" type="checkbox" />
3127 <small data-i18n="Generate only one line per request">
3128 Generate only one line per request
3129 </small>
3130 </label>
3131 <label class="checkbox_label" for="collapse-newlines-checkbox">
3132 <input id="collapse-newlines-checkbox" type="checkbox" />
3133 <small data-i18n="Collapse Consecutive Newlines">
3134 Collapse Consecutive Newlines
3135 </small>
3136 </label>
3137 <label data-newbie-hidden class="checkbox_label" for="trim_spaces">
3138 <input id="trim_spaces" type="checkbox" />
3139 <small data-i18n="Trim spaces">Trim spaces</small>
3140 </label>
3141 <label class="checkbox_label" for="trim_sentences_checkbox">
3142 <input id="trim_sentences_checkbox" type="checkbox" />
3143 <small data-i18n="Trim Incomplete Sentences">
3144 Trim Incomplete Sentences
3145 </small>
3146 </label>
3147 <!-- Add margin since this is a child of above -->
3148 <label data-newbie-hidden class="checkbox_label indent20p" for="include_newline_checkbox">
3149 <input id="include_newline_checkbox" type="checkbox" />
3150 <small data-i18n="Include Newline">Include Newline</small>
3151 </label>
3109 <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.">3152 <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.">
3110 <input id="context_use_stop_strings" type="checkbox" />3153 <input id="context_use_stop_strings" type="checkbox" />
3111 <small data-i18n="Separators as Stop Strings">Separators as Stop Strings</small>3154 <small data-i18n="Separators as Stop Strings">Separators as Stop Strings</small>
@@ -3114,201 +3157,238 @@
3114 <input id="context_names_as_stop_strings" type="checkbox" />3157 <input id="context_names_as_stop_strings" type="checkbox" />
3115 <small data-i18n="Names as Stop Strings">Names as Stop Strings</small>3158 <small data-i18n="Names as Stop Strings">Names as Stop Strings</small>
3116 </label>3159 </label>
3160 </div>
3161
3117 <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">3162 <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">
3118 <input id="context_allow_jailbreak" type="checkbox" />3163 <input id="context_allow_jailbreak" type="checkbox" />
3119 <small data-i18n="Allow Post-History Instructions">Allow Post-History Instructions</small>3164 <small data-i18n="Allow Post-History Instructions">Allow Post-History Instructions</small>
3120 </label>3165 </label>
3121 </div>3166 </div>
31223167 <div>
3123 <div data-newbie-hidden class="inline-drawer wide100p flexFlowColumn margin-bot-10px" style="display:none;">3168 <h4 class="range-block-title justifyLeft standoutHeader">
3124 <div class="inline-drawer-toggle inline-drawer-header">3169 <span data-i18n="Custom Stopping Strings">
3125 <b><span data-i18n="Context Order">Context Order</span></b>3170 Custom Stopping Strings
3126 <div class="fa-solid fa-circle-chevron-down inline-drawer-icon down"></div>3171 </span>
3127 </div>3172 <a href="https://docs.sillytavern.app/usage/core-concepts/advancedformatting/#custom-stopping-strings" class="notes-link" target="_blank">
3128 <div class="inline-drawer-content">3173 <span class="fa-solid fa-circle-question note-link-span"></span>
3129 <div id="context_order" class="prompt_order">3174 </a>
3130 <div data-id="0">3175 </h4>
3131 <span data-i18n="Story String">Story String</span>3176 <div>
3132 <small>0</small>3177 <small>
3133 </div>3178 <span data-i18n="JSON serialized array of strings">JSON serialized array of strings</span>
3134 <div data-id="1">3179 <i class="fa-solid fa-question-circle opacity50p" title="e.g: [&quot;Ford&quot;, &quot;BMW&quot;, &quot;Fiat&quot;]"></i>
3135 <span data-i18n="Summary">Summary</span>3180 </small>
3136 <small>1</small>
3137 </div>
3138 <div data-id="2">
3139 <span data-i18n="Author's Note">Author's Note</span>
3140 <small>2</small>
3141 </div>
3142 <div data-id="3">
3143 <span data-i18n="Example Dialogues">Example Dialogues</span>
3144 <small>3</small>
3145 </div>
3146 <div data-id="4">
3147 <span data-i18n="Chat Start">Chat History</span>
3148 <small>4</small>
3149 </div>3181 </div>
3182 <div>
3183 <div contenteditable="true" id="custom_stopping_strings" class="text_pole textarea_compact monospace"></div>
3150 </div>3184 </div>
3151 <small>3185 <label class="checkbox_label" for="custom_stopping_strings_macro">
3152 <b data-i18n="Hint">Hint:</b>3186 <input id="custom_stopping_strings_macro" type="checkbox" checked>
3153 <span data-i18n="In-Chat Position not affected">3187 <small data-i18n="Replace Macro in Custom Stopping Strings">
3154 Summary and Author's Note orders are only affected when they don't have an In-Chat position set.3188 Replace Macro in Custom Stopping Strings
3155 </span>
3156 </small>3189 </small>
3190 </label>
3157 </div>3191 </div>
3158 </div>3192 </div>
3159 </div>3193 </div>
3160 <div>3194 <div id="InstructSettingsColumn" class="flex-container flexNoGap flexFlowColumn flex1">
3161 <h4 class="standoutHeader title_restorable">3195 <div id="instructSettingsBlock">
3162 <div>3196 <h4 class="standoutHeader title_restorable justifySpaceBetween">
3197 <div class="flex-container">
3163 <span data-i18n="Instruct Mode">Instruct Mode</span>3198 <span data-i18n="Instruct Mode">Instruct Mode</span>
3164 <a href="https://docs.sillytavern.app/usage/core-concepts/instructmode/" class="notes-link" target="_blank">3199 <a href="https://docs.sillytavern.app/usage/core-concepts/instructmode/" class="notes-link" target="_blank">
3165 <span class="fa-solid fa-circle-question note-link-span"></span>3200 <span class="fa-solid fa-circle-question note-link-span"></span>
3166 </a>3201 </a>
3167 </div>3202 </div>
3168 <div class="flex-container">3203 <div class="flex-container">
3169 <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>
3170 <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>
3171 <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>
3172 <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>
3173 </div>
3174 </h4>
3175 <div class="flex-container">
3176 <label for="instruct_enabled" class="checkbox_label flex1">3204 <label for="instruct_enabled" class="checkbox_label flex1">
3177 <input id="instruct_enabled" type="checkbox" />3205 <input id="instruct_enabled" type="checkbox" style="display:none;" />
3178 <span data-i18n="Enabled">Enabled</span>3206 <small><i class="fa-solid fa-power-off menu_button margin0"></i></small>
3179 </label>3207 </label>
3180 <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">3208 <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">
3181 <input id="instruct_bind_to_context" type="checkbox" />3209 <input id="instruct_bind_to_context" type="checkbox" style="display:none;" />
3182 <span data-i18n="Bind to Context">Bind to Context</span>3210 <small><i class="fa-solid fa-link menu_button margin0" title="If enabled, Context templates will be automatically selected based on selected Instruct template name or by preference."></i></small>
3183 </label>3211 </label>
3184 </div>3212 </div>
3185 <label for="instruct_presets">3213 </h4>
3186 <span data-i18n="Presets">Presets</span>3214 <div class="flex-container margin0 justifyCenter">
3187 </label>
3188 <div class="flex-container">
3189 <select id="instruct_presets" data-preset-manager-for="instruct" class="flex1 text_pole"></select>
3190 <input type="file" hidden data-preset-manager-file="instruct" accept=".json, .settings">3215 <input type="file" hidden data-preset-manager-file="instruct" accept=".json, .settings">
3191 <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>3216 <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>
3192 <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>3217 <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>
3193 <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>3218 <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>
3219 <i data-preset-manager-import="instruct" class=" menu_button fa-solid fa-file-import" title="Import preset" data-i18n="[title]Import preset"></i>
3220 <i data-preset-manager-export="instruct" class=" menu_button fa-solid fa-file-export" title="Export preset" data-i18n="[title]Export preset"></i>
3221 <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>
3222 <i data-preset-manager-delete="instruct" class=" menu_button fa-solid fa-trash-can" title="Delete the preset" data-i18n="[title]Delete the preset"></i>
3223 </div>
3224
3225 <div class="flex-container">
3226 <select id="instruct_presets" data-preset-manager-for="instruct" class="flex1 text_pole"></select>
3194 </div>3227 </div>
3195 <label data-newbie-hidden>3228 <label data-newbie-hidden>
3196 <small data-i18n="Activation Regex">3229 <small data-i18n="Activation Regex">
3197 Activation Regex3230 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>
3198 </small>3231 </small>
3199 </label>3232 </label>
3200 <div data-newbie-hidden>3233 <div data-newbie-hidden>
3201 <textarea id="instruct_activation_regex" class="text_pole textarea_compact autoSetHeight" maxlength="5000" rows="1"></textarea>3234 <input type="text" id="instruct_activation_regex" class="text_pole textarea_compact" placeholder="e.g. /llama(-)?[3|3.1]/i"></input>
3235 </div>
3236 <div data-newbie-hidden>
3237 <label>
3238 <small data-i18n="System Prompt">System Prompt</small>
3239 </label>
3240 <div contenteditable="true" id="instruct_system_prompt" class="text_pole textarea_compact"></div>
3202 </div>3241 </div>
3242
3203 <div data-newbie-hidden>3243 <div data-newbie-hidden>
3204 <label for="instruct_wrap" class="checkbox_label">3244 <label for="instruct_wrap" class="checkbox_label">
3205 <input id="instruct_wrap" type="checkbox" />3245 <input id="instruct_wrap" type="checkbox" />
3206 <span data-i18n="Wrap Sequences with Newline">Wrap Sequences with Newline</span>3246 <small data-i18n="Wrap Sequences with Newline">Wrap Sequences with Newline</small>
3207 </label>3247 </label>
3208 <label for="instruct_macro" class="checkbox_label">3248 <label for="instruct_macro" class="checkbox_label">
3209 <input id="instruct_macro" type="checkbox" />3249 <input id="instruct_macro" type="checkbox" />
3210 <span data-i18n="Replace Macro in Sequences">Replace Macro in Sequences</span>3250 <small data-i18n="Replace Macro in Sequences">Replace Macro in Sequences</small>
3211 </label>3251 </label>
3212 <label for="instruct_skip_examples" class="checkbox_label">3252 <label for="instruct_skip_examples" class="checkbox_label">
3213 <input id="instruct_skip_examples" type="checkbox" />3253 <input id="instruct_skip_examples" type="checkbox" />
3214 <span data-i18n="Skip Example Dialogues Formatting">Skip Example Dialogues Formatting</span>3254 <small data-i18n="Skip Example Dialogues Formatting">Skip Example Dialogues Formatting</small>
3215 </label>3255 </label>
3216 <label for="instruct_names" class="checkbox_label">3256 <label for="instruct_names" class="checkbox_label">
3217 <input id="instruct_names" type="checkbox" />3257 <input id="instruct_names" type="checkbox" />
3218 <span data-i18n="Include Names">Include Names</span>3258 <small data-i18n="Include Names">Include Names</small>
3219 </label>3259 </label>
3220 <label for="instruct_names_force_groups" class="checkbox_label indent20p">3260 <label for="instruct_names_force_groups" class="checkbox_label indent20p">
3221 <input id="instruct_names_force_groups" type="checkbox" />3261 <input id="instruct_names_force_groups" type="checkbox" />
3222 <span data-i18n="Force for Groups and Personas">Force for Groups and Personas</span>3262 <small data-i18n="Force for Groups and Personas">Force for Groups and Personas</small>
3223 </label>3263 </label>
3224 </div>3264 </div>
3225 <div data-newbie-hidden>
3226 <label>
3227 <small data-i18n="System Prompt">System Prompt</small>
3228 </label>
3229 <textarea id="instruct_system_prompt" class="text_pole textarea_compact autoSetHeight" rows="1"></textarea>
3230 </div>3265 </div>
3231 <div data-newbie-hidden class="inline-drawer wide100p flexFlowColumn">3266 <div name="tokenizerSettingsBlock">
3232 <div class="inline-drawer-toggle inline-drawer-header">3267 <div data-newbie-hidden name="tokenizerSelectorBlock">
3233 <b><span data-i18n="Instruct Mode Sequences">Instruct Mode Sequences</span></b>3268 <h4 class="standoutHeader"><span data-i18n="Tokenizer">Tokenizer</span>
3234 <div class="fa-solid fa-circle-chevron-down inline-drawer-icon down"></div>3269 <a href="https://docs.sillytavern.app/usage/core-concepts/advancedformatting/#tokenizer" class="notes-link" target="_blank">
3270 <span class="fa-solid fa-circle-question note-link-span"></span>
3271 </a>
3272 </h4>
3273 <select id="tokenizer">
3274 <option value="99">Best match (recommended)</option>
3275 <option value="0">None / Estimated</option>
3276 <option value="1">GPT-2</option>
3277 <!-- Option #2 was a legacy GPT-2/3 tokenizer -->
3278 <option value="3">Llama 1/2</option>
3279 <option value="12">Llama 3</option>
3280 <option value="13">Gemma / Gemini</option>
3281 <option value="14">Jamba</option>
3282 <option value="4">NerdStash (NovelAI Clio)</option>
3283 <option value="5">NerdStash v2 (NovelAI Kayra)</option>
3284 <option value="7">Mistral</option>
3285 <option value="8">Yi</option>
3286 <option value="11">Claude 1/2</option>
3287 <option value="6">API (WebUI / koboldcpp)</option>
3288 </select>
3235 </div>3289 </div>
3236 <div class="inline-drawer-content">3290 <div class="range-block flex-container flexnowrap" data-newbie-hidden name="tokenPaddingBlock">
3237 <h5 class="textAlignCenter" data-i18n="System Prompt Wrapping">3291 <div class="range-block-title justifyLeft">
3238 System Prompt Wrapping3292 <small data-i18n="Token Padding" class="flex-container">Token Padding
3239 </h5>3293 <a href="https://docs.sillytavern.app/usage/core-concepts/advancedformatting/#token-padding" class="notes-link" target="_blank">
3240 <div class="flex-container">3294 <span class="fa-solid fa-circle-question note-link-span"></span>
3241 <div class="flex1" title="Inserted before a System prompt." data-i18n="[title]Inserted before a System prompt.">3295 </a>
3242 <label for="instruct_system_sequence_prefix">3296 </small>
3243 <small data-i18n="System Prompt Prefix">System Prompt Prefix</small>3297 </div>
3244 </label>3298 <input id="token_padding" class="text_pole textarea_compact" type="number" min="-2048" max="2048" />
3299 </div>
3300 </div>
3301 <div>
3302 <h4 class="standoutHeader" data-i18n="Miscellaneous">Miscellaneous</h4>
3303 <div>
3304 <small>
3305 <span data-i18n="Non-markdown strings">
3306 Non-markdown strings
3307 </span>
3308 </small>
3245 <div>3309 <div>
3246 <textarea id="instruct_system_sequence_prefix" class="text_pole textarea_compact autoSetHeight" maxlength="2000" placeholder="&mdash;" rows="1"></textarea>3310 <input id="markdown_escape_strings" class="text_pole textarea_compact" type="text" data-i18n="[placeholder]comma delimited,no spaces between" placeholder="comma delimited,no spaces between" />
3247 </div>3311 </div>
3248 </div>3312 </div>
3249 <div class="flex1" title="Inserted after a System prompt." data-i18n="[title]Inserted after a System prompt.">3313
3250 <label for="instruct_system_sequence_suffix">3314 <div data-newbie-hidden name="startReplyWithBlock">
3251 <small data-i18n="System Prompt Suffix">System Prompt Suffix</small>3315 <div>
3252 </label>3316 <small>
3317 <span data-i18n="Start Reply With">
3318 Start Reply With
3319 </span>
3320 </small>
3253 <div>3321 <div>
3254 <textarea id="instruct_system_sequence_suffix" class="text_pole wide100p textarea_compact autoSetHeight" maxlength="2000" placeholder="&mdash;" rows="1"></textarea>3322 <div contenteditable="true" id="start_reply_with" class="text_pole textarea_compact"></div>
3255 </div>3323 </div>
3324 <label class="checkbox_label" for="chat-show-reply-prefix-checkbox">
3325 <input id="chat-show-reply-prefix-checkbox" type="checkbox" />
3326 <small data-i18n="Show reply prefix in chat">
3327 Show reply prefix in chat
3328 </small>
3329 </label>
3256 </div>3330 </div>
3257 </div>3331 </div>
3258 <h5 class="textAlignCenter" data-i18n="Chat Messages Wrapping">3332 </div>
3259 Chat Messages Wrapping3333 </div>
3260 </h5>3334 <div id="InstructSequencesColumn" class="flex-container flexNoGap flexFlowColumn flex1">
3335 <div data-newbie-hidden class="wide100p flexFlowColumn">
3336 <h4 class="standoutHeader title_restorable">
3337 <b>
3338 <span data-i18n="Instruct Sequences">
3339 Instruct Sequences
3340 </span>
3341 <small data-i18n="(Saves to Template)">
3342 (Saves to Template)
3343 </small>
3344 </b>
3345 </h4>
3261 <div class="flex-container">3346 <div class="flex-container">
3262 <div class="flex1" 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.">3347 <div class="flexAuto" title="Inserted before a System prompt." data-i18n="[title]Inserted before a System prompt.">
3263 <label for="instruct_input_sequence">3348 <label for="instruct_system_sequence_prefix">
3264 <small data-i18n="User Message Prefix">User Message Prefix</small>3349 <small data-i18n="System Prompt Prefix">System Prompt Prefix</small>
3265 </label>3350 </label>
3266 <div>3351 <div>
3267 <textarea id="instruct_input_sequence" class="text_pole textarea_compact autoSetHeight" maxlength="2000" placeholder="&mdash;" rows="1"></textarea>3352 <div contenteditable="true" id="instruct_system_sequence_prefix" class="text_pole textarea_compact"></div>
3268 </div>3353 </div>
3269 </div>3354 </div>
3270 <div class="flex1" title="Inserted after a User message." data-i18n="[title]Inserted after a User message.">3355 <div class="flexAuto" title="Inserted after a System prompt." data-i18n="[title]Inserted after a System prompt.">
3271 <label for="instruct_input_suffix">3356 <label for="instruct_system_sequence_suffix">
3272 <small data-i18n="User Message Suffix">User Message Suffix</small>3357 <small data-i18n="System Prompt Suffix">System Prompt Suffix</small>
3273 </label>3358 </label>
3274 <div>3359 <div>
3275 <textarea id="instruct_input_suffix" class="text_pole wide100p textarea_compact autoSetHeight" maxlength="2000" placeholder="&mdash;" rows="1"></textarea>3360 <div contenteditable="true" id="instruct_system_sequence_suffix" class="text_pole wide100p textarea_compact"></div>
3276 </div>3361 </div>
3277 </div>3362 </div>
3278 </div>3363 </div>
3279 <div class="flex-container">3364 <div class="flex-container">
3280 <div class="flex1" 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.">3365 <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.">
3281 <label for="instruct_output_sequence">3366 <small data-i18n="User Prefix">User Message Prefix</small>
3282 <small data-i18n="Assistant Message Prefix">Assistant Message Prefix</small>3367 <div contenteditable="true" id="instruct_input_sequence" class="text_pole textarea_compact"></div>
3283 </label>
3284 <div>
3285 <textarea id="instruct_output_sequence" class="text_pole wide100p textarea_compact autoSetHeight" maxlength="2000" placeholder="&mdash;" rows="1"></textarea>
3286 </div>3368 </div>
3369 <div class="flexAuto" title="Inserted after a User message." data-i18n="[title]Inserted after a User message.">
3370 <small data-i18n="User Suffix">User Message Suffix</small>
3371 <div contenteditable="true" id="instruct_input_suffix" class="text_pole wide100p textarea_compact"></div>
3287 </div>3372 </div>
3288 <div class="flex1" title="Inserted after an Assistant message." data-i18n="[title]Inserted after an Assistant message.">
3289 <label for="instruct_output_suffix">
3290 <small data-i18n="Assistant Message Suffix">Assistant Message Suffix</small>
3291 </label>
3292 <div>
3293 <textarea id="instruct_output_suffix" class="text_pole wide100p textarea_compact autoSetHeight" maxlength="2000" placeholder="&mdash;" rows="1"></textarea>
3294 </div>3373 </div>
3374 <div class="flex-container">
3375 <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.">
3376 <small data-i18n="Assistant Prefix">Assistant Message Prefix</small>
3377 <div contenteditable="true" id="instruct_output_sequence" class="text_pole wide100p textarea_compact"></div>
3295 </div>3378 </div>
3379 <div class="flexAuto" title="Inserted after an Assistant message." data-i18n="[title]Inserted after an Assistant message.">
3380 <small data-i18n="Assistant Suffix">Assistant Message Suffix</small>
3381 <div contenteditable="true" id="instruct_output_suffix" class="text_pole wide100p textarea_compact"></div>
3296 </div>3382 </div>
3297 <div class="flex-container">
3298 <div class="flex1" 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.">
3299 <label for="instruct_system_sequence">
3300 <small data-i18n="System Message Prefix">System Message Prefix</small>
3301 </label>
3302 <div>
3303 <textarea id="instruct_system_sequence" class="text_pole textarea_compact autoSetHeight" maxlength="2000" placeholder="&mdash;" rows="1"></textarea>
3304 </div>3383 </div>
3384 <div class="flex-container">
3385 <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.">
3386 <small data-i18n="System Prefix">System Message Prefix</small>
3387 <div contenteditable="true" id="instruct_system_sequence" class="text_pole textarea_compact"></div>
3305 </div>3388 </div>
3306 <div class="flex1" title="Inserted after a System message." data-i18n="[title]Inserted after a System message.">3389 <div class="flexAuto" id="instruct_system_suffix_block" title="Inserted after a System message." data-i18n="[title]Inserted after a System message.">
3307 <label for="instruct_system_suffix">3390 <small data-i18n="System Suffix">System Message Suffix</small>
3308 <small data-i18n="System Message Suffix">System Message Suffix</small>3391 <div contenteditable="true" id="instruct_system_suffix" class="text_pole wide100p textarea_compact"></div>
3309 </label>
3310 <div>
3311 <textarea id="instruct_system_suffix" class="text_pole wide100p textarea_compact autoSetHeight" maxlength="2000" placeholder="&mdash;" rows="1"></textarea>
3312 </div>3392 </div>
3313 </div>3393 </div>
3314 <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.">3394 <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.">
@@ -3317,238 +3397,50 @@
3317 <small data-i18n="System same as User">System same as User</small>3397 <small data-i18n="System same as User">System same as User</small>
3318 </label>3398 </label>
3319 </div>3399 </div>
3320 </div>3400
3321 <h5 class="textAlignCenter" data-i18n="Misc. Sequences">3401 <h5 class="textAlignCenter" data-i18n="Misc. Sequences">
3322 Misc. Sequences3402 Misc. Sequences
3323 </h5>3403 </h5>
3324 <div class="flex-container">3404 <div class="flex-container">
3325 <div class="flex1" title="Inserted before the first Assistant's message." data-i18n="[title]Inserted before the first Assistant's message.">3405 <div class="flexAuto" title="Inserted before the first Assistant's message." data-i18n="[title]Inserted before the first Assistant's message.">
3326 <label for="instruct_first_output_sequence">
3327 <small data-i18n="First Assistant Prefix">First Assistant Prefix</small>3406 <small data-i18n="First Assistant Prefix">First Assistant Prefix</small>
3328 </label>3407 <div contenteditable="true" id="instruct_first_output_sequence" class="text_pole textarea_compact"></div>
3329 <div>
3330 <textarea id="instruct_first_output_sequence" class="text_pole textarea_compact autoSetHeight" maxlength="2000" placeholder="&mdash;" rows="1"></textarea>
3331 </div>
3332 </div>3408 </div>
3333 <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">3409 <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">
3334 <label for="instruct_last_output_sequence">
3335 <small data-i18n="Last Assistant Prefix">Last Assistant Prefix</small>3410 <small data-i18n="Last Assistant Prefix">Last Assistant Prefix</small>
3336 </label>3411 <div contenteditable="true" id="instruct_last_output_sequence" class="text_pole wide100p textarea_compact"></div>
3337 <div>
3338 <textarea id="instruct_last_output_sequence" class="text_pole wide100p textarea_compact autoSetHeight" maxlength="2000" placeholder="&mdash;" rows="1"></textarea>
3339 </div>
3340 </div>3412 </div>
3341 </div>3413 </div>
3342 <div class="flex-container">3414 <div class="flex-container">
3343 <div class="flex1" title="Inserted before the first User's message." data-i18n="[title]Inserted before the first User's message.">3415 <div class="flexAuto" title="Inserted before the first User's message." data-i18n="[title]Inserted before the first User's message.">
3344 <label for="instruct_first_input_sequence">
3345 <small data-i18n="First User Prefix">First User Prefix</small>3416 <small data-i18n="First User Prefix">First User Prefix</small>
3346 </label>3417 <div contenteditable="true" id="instruct_first_input_sequence" class="text_pole textarea_compact"></div>
3347 <div>
3348 <textarea id="instruct_first_input_sequence" class="text_pole textarea_compact autoSetHeight" maxlength="2000" placeholder="&mdash;" rows="1"></textarea>
3349 </div>
3350 </div>3418 </div>
3351 <div class="flex1" title="Inserted before the last User's message." data-i18n="[title]instruct_last_input_sequence">3419 <div class="flexAuto" title="Inserted before the last User's message." data-i18n="[title]instruct_last_input_sequence">
3352 <label for="instruct_last_input_sequence">
3353 <small data-i18n="Last User Prefix">Last User Prefix</small>3420 <small data-i18n="Last User Prefix">Last User Prefix</small>
3354 </label>3421 <div contenteditable="true" id="instruct_last_input_sequence" class="text_pole wide100p textarea_compact"></div>
3355 <div>
3356 <textarea id="instruct_last_input_sequence" class="text_pole wide100p textarea_compact autoSetHeight" maxlength="2000" placeholder="&mdash;" rows="1"></textarea>
3357 </div>
3358 </div>3422 </div>
3359 </div>3423 </div>
3360 <div class="flex-container">3424 <div class="flex-container">
3361 <div class="flex1" 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.">3425 <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.">
3362 <label for="instruct_last_system_sequence">
3363 <small data-i18n="System Instruction Prefix">System Instruction Prefix</small>3426 <small data-i18n="System Instruction Prefix">System Instruction Prefix</small>
3364 </label>3427 <div contenteditable="true" id="instruct_last_system_sequence" class="text_pole textarea_compact"></div>
3365 <div>
3366 <textarea id="instruct_last_system_sequence" class="text_pole textarea_compact autoSetHeight" maxlength="2000" placeholder="&mdash;" rows="1"></textarea>
3367 </div>
3368 </div>3428 </div>
3369 <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).">3429 <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).">
3370 <label for="instruct_stop_sequence">
3371 <small data-i18n="Stop Sequence">Stop Sequence</small>3430 <small data-i18n="Stop Sequence">Stop Sequence</small>
3372 </label>3431 <div contenteditable="true" id="instruct_stop_sequence" class="text_pole textarea_compact"></div>
3373 <div>
3374 <textarea id="instruct_stop_sequence" class="text_pole textarea_compact autoSetHeight" maxlength="2000" placeholder="&mdash;" rows="1"></textarea>
3375 </div>
3376 </div>3432 </div>
3377 </div>3433 </div>
3378 <div class="flex-container">3434 <div class="flex-container">
3379 <div class="flex1" 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.">3435 <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.">
3380 <label for="instruct_user_alignment_message">
3381 <small data-i18n="User Filler Message">User Filler Message</small>3436 <small data-i18n="User Filler Message">User Filler Message</small>
3382 </label>3437 <div contenteditable="true" id="instruct_user_alignment_message" class="text_pole textarea_compact"></div>
3383 <div>
3384 <textarea id="instruct_user_alignment_message" class="text_pole textarea_compact autoSetHeight" maxlength="2000" placeholder="&mdash;" rows="1"></textarea>
3385 </div>
3386 </div>3438 </div>
3387 </div>3439 </div>
3388 </div>3440 </div>
3389 </div>3441 </div>
3390 </div>3442 </div>
3391 </div>3443 </div>
3392 <div id="ContextFormatting">
3393 <div>
3394 <div class="flex-container alignItemsBaseline">
3395 <h4 data-i18n="Context Formatting">
3396 Context Formatting
3397 </h4>
3398 <small data-i18n="(Saved to Context Template)">
3399 &nbsp;(Saved to Context Template)
3400 </small>
3401 </div>
3402 <label class="checkbox_label" for="always-force-name2-checkbox">
3403 <input id="always-force-name2-checkbox" type="checkbox" />
3404 <span data-i18n="Always add character's name to prompt">
3405 Always add character's name to prompt
3406 </span>
3407 </label>
3408 <label class="checkbox_label" for="single_line">
3409 <input id="single_line" type="checkbox" />
3410 <span data-i18n="Generate only one line per request">
3411 Generate only one line per request
3412 </span>
3413 </label>
3414 <label class="checkbox_label" for="trim_sentences_checkbox">
3415 <input id="trim_sentences_checkbox" type="checkbox" />
3416 <span data-i18n="Trim Incomplete Sentences">
3417 Trim Incomplete Sentences
3418 </span>
3419 </label>
3420 <!-- Add margin since this is a child of above -->
3421 <label data-newbie-hidden class="checkbox_label indent20p" for="include_newline_checkbox">
3422 <input id="include_newline_checkbox" type="checkbox" />
3423 <span data-i18n="Include Newline">Include Newline</span>
3424 </label>
3425 </div>
3426 <h4 data-i18n="Misc. Settings">
3427 Misc. Settings
3428 </h4>
3429 <label class="checkbox_label" for="collapse-newlines-checkbox">
3430 <input id="collapse-newlines-checkbox" type="checkbox" />
3431 <span data-i18n="Collapse Consecutive Newlines">
3432 Collapse Consecutive Newlines
3433 </span>
3434 </label>
3435 <label data-newbie-hidden class="checkbox_label" for="trim_spaces">
3436 <input id="trim_spaces" type="checkbox" />
3437 <span data-i18n="Trim spaces">Trim spaces</span>
3438 </label>
3439 <div data-newbie-hidden>
3440 <h4><span data-i18n="Tokenizer">Tokenizer</span>
3441 <a href="https://docs.sillytavern.app/usage/core-concepts/advancedformatting/#tokenizer" class="notes-link" target="_blank">
3442 <span class="fa-solid fa-circle-question note-link-span"></span>
3443 </a>
3444 </h4>
3445 <select id="tokenizer">
3446 <option value="99">Best match (recommended)</option>
3447 <option value="0">None / Estimated</option>
3448 <option value="1">GPT-2</option>
3449 <!-- Option #2 was a legacy GPT-2/3 tokenizer -->
3450 <option value="3">Llama 1/2</option>
3451 <option value="12">Llama 3</option>
3452 <option value="13">Gemma / Gemini</option>
3453 <option value="14">Jamba</option>
3454 <option value="4">NerdStash (NovelAI Clio)</option>
3455 <option value="5">NerdStash v2 (NovelAI Kayra)</option>
3456 <option value="7">Mistral</option>
3457 <option value="8">Yi</option>
3458 <option value="11">Claude 1/2</option>
3459 <option value="6">API (WebUI / koboldcpp)</option>
3460 </select>
3461 </div>
3462 <div class="range-block" data-newbie-hidden>
3463 <div class="range-block-title justifyLeft">
3464 <span data-i18n="Token Padding">Token Padding</span>
3465 <a href="https://docs.sillytavern.app/usage/core-concepts/advancedformatting/#token-padding" class="notes-link" target="_blank">
3466 <span class="fa-solid fa-circle-question note-link-span"></span>
3467 </a>
3468 </div>
3469 <input id="token_padding" class="text_pole textarea_compact" type="number" min="-2048" max="2048" />
3470 </div>
3471 <div class="flex-container flexFlowColumn" data-newbie-hidden>
3472 <div>
3473 <h4 class="range-block-title justifyLeft">
3474 <span data-i18n="Start Reply With">
3475 Start Reply With
3476 </span>
3477 </h4>
3478 <div>
3479 <textarea id="start_reply_with" rows="2" class="text_pole textarea_compact" data-i18n="[placeholder]AI reply prefix" placeholder="AI reply prefix"></textarea>
3480 </div>
3481 <label class="checkbox_label" for="chat-show-reply-prefix-checkbox">
3482 <input id="chat-show-reply-prefix-checkbox" type="checkbox" />
3483 <span data-i18n="Show reply prefix in chat">
3484 Show reply prefix in chat
3485 </span>
3486 </label>
3487 </div>
3488 <div>
3489 <h4 class="range-block-title justifyLeft">
3490 <span data-i18n="Non-markdown strings">
3491 Non-markdown strings
3492 </span>
3493 </h4>
3494 <div>
3495 <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" />
3496 </div>
3497 </div>
3498 <div>
3499 <h4 class="range-block-title justifyLeft">
3500 <span data-i18n="Custom Stopping Strings">
3501 Custom Stopping Strings
3502 </span>
3503 <a href="https://docs.sillytavern.app/usage/core-concepts/advancedformatting/#custom-stopping-strings" class="notes-link" target="_blank">
3504 <span class="fa-solid fa-circle-question note-link-span"></span>
3505 </a>
3506 </h4>
3507 <div>
3508 <small>
3509 <span data-i18n="JSON serialized array of strings">JSON serialized array of strings</span>
3510 </small>
3511 </div>
3512 <div>
3513 <textarea id="custom_stopping_strings" rows="2" class="text_pole textarea_compact monospace" placeholder="[&quot;Ford&quot;, &quot;BMW&quot;, &quot;Fiat&quot;]"></textarea>
3514 </div>
3515 <label class="checkbox_label" for="custom_stopping_strings_macro">
3516 <input id="custom_stopping_strings_macro" type="checkbox" checked>
3517 <span data-i18n="Replace Macro in Custom Stopping Strings">
3518 Replace Macro in Custom Stopping Strings
3519 </span>
3520 </label>
3521 </div>
3522 </div>
3523 <div data-newbie-hidden>
3524 <h4>
3525 <span data-i18n="Auto-Continue">Auto-Continue</span>
3526 </h4>
3527 <div class="flex-container">
3528 <label class="checkbox_label" for="auto_continue_enabled">
3529 <input id="auto_continue_enabled" type="checkbox" />
3530 <span data-i18n="Enabled">
3531 Enabled
3532 </span>
3533 </label>
3534 <label class="checkbox_label" for="auto_continue_allow_chat_completions">
3535 <input id="auto_continue_allow_chat_completions" type="checkbox" />
3536 <span data-i18n="Allow for Chat Completion APIs">
3537 Allow for Chat Completion APIs
3538 </span>
3539 </label>
3540 </div>
3541
3542 <div class="auto_continue_settings_block">
3543 <label for="auto_continue_target_length">
3544 <span data-i18n="Target length (tokens)">Target length (tokens)</span>
3545 <input id="auto_continue_target_length" type="number" class="text_pole textarea_compact" min="0" max="1024" />
3546 </label>
3547 </div>
3548 </div>
3549 </div>
3550 </div>
3551 </div>
3552 </div>3444 </div>
3553 <div id="WI-SP-button" class="drawer">3445 <div id="WI-SP-button" class="drawer">
3554 <div class="drawer-toggle drawer-header">3446 <div class="drawer-toggle drawer-header">
@@ -3556,12 +3448,14 @@
3556 </div>3448 </div>
3557 <div id="WorldInfo" class="drawer-content closedDrawer">3449 <div id="WorldInfo" class="drawer-content closedDrawer">
3558 <div id="WorldInfoheader" class="fa-solid fa-grip drag-grabber"></div>3450 <div id="WorldInfoheader" class="fa-solid fa-grip drag-grabber"></div>
3559 <div id="WI_panel_pin_div" class="flex-container alignitemscenter gap10px" title="Locked = World Editor will stay open" data-i18n="[title]Locked = World Editor will stay open">3451 <div class="flex-container alignitemscenter gap10px">
3452 <div id="WI_panel_pin_div" title="Locked = World Editor will stay open" data-i18n="[title]Locked = World Editor will stay open">
3560 <input type="checkbox" id="WI_panel_pin">3453 <input type="checkbox" id="WI_panel_pin">
3561 <label for="WI_panel_pin">3454 <label for="WI_panel_pin">
3562 <div class="unchecked fa-solid fa-unlock "></div>3455 <div class="unchecked fa-solid fa-unlock "></div>
3563 <div class="checked fa-solid fa-lock "></div>3456 <div class="checked fa-solid fa-lock "></div>
3564 </label>3457 </label>
3458 </div>
3565 <h3 class="margin0">3459 <h3 class="margin0">
3566 <span data-i18n="Worlds/Lorebooks">Worlds/Lorebooks</span>3460 <span data-i18n="Worlds/Lorebooks">Worlds/Lorebooks</span>
3567 <a href="https://docs.sillytavern.app/usage/core-concepts/worldinfo/" class="notes-link" target="_blank">3461 <a href="https://docs.sillytavern.app/usage/core-concepts/worldinfo/" class="notes-link" target="_blank">
@@ -4290,15 +4184,49 @@
4290 <input id="auto_swipe_minimum_length" name="auto_swipe_minimum_length" type="number" min="0" step="1" value="0" class="text_pole" title="If the generated message is shorter than this, trigger an auto-swipe." data-i18n="[title]If the generated message is shorter than this, trigger an auto-swipe">4184 <input id="auto_swipe_minimum_length" name="auto_swipe_minimum_length" type="number" min="0" step="1" value="0" class="text_pole" title="If the generated message is shorter than this, trigger an auto-swipe." data-i18n="[title]If the generated message is shorter than this, trigger an auto-swipe">
4291 <small data-i18n="Blacklisted words">Blacklisted words</small>4185 <small data-i18n="Blacklisted words">Blacklisted words</small>
4292 <div class="auto_swipe">4186 <div class="auto_swipe">
4293 <textarea id="auto_swipe_blacklist" name="auto_swipe_blacklist" data-i18n="[placeholder]words you dont want generated separated by comma ','" placeholder="words you don't want generated separated by comma ','" class="text_pole textarea_compact" maxlength="5000" value="" autocomplete="off" rows="3"></textarea>4187 <textarea id="auto_swipe_blacklist" name="auto_swipe_blacklist" data-i18n="[placeholder]words you dont want generated separated by comma ','" placeholder="words you don't want generated separated by comma ','" class="text_pole textarea_compact" value="" autocomplete="off" rows="3"></textarea>
4294 <small data-i18n="Blacklisted word count to swipe">Blacklisted word count to swipe</small>4188 <small data-i18n="Blacklisted word count to swipe">Blacklisted word count to swipe</small>
4295 <input id="auto_swipe_blacklist_threshold" name="auto_swipe_blacklist_threshold" type="number" min="0" step="1" value="1" class="text_pole" title="Minimum number of blacklisted words detected to trigger an auto-swipe." data-i18n="[title]Minimum number of blacklisted words detected to trigger an auto-swipe">4189 <input id="auto_swipe_blacklist_threshold" name="auto_swipe_blacklist_threshold" type="number" min="0" step="1" value="1" class="text_pole" title="Minimum number of blacklisted words detected to trigger an auto-swipe." data-i18n="[title]Minimum number of blacklisted words detected to trigger an auto-swipe">
4296 </div>4190 </div>
4297 </div>4191 </div>
4298 </div>4192 </div>
4193 <div data-newbie-hidden nane="AutoContiueBlock" class="inline-drawer wide100p flexFlowColumn">
4194 <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.">
4195 <b><span data-i18n="Auto-swipe">Auto-Continue</span></b>
4196 <div class="fa-solid fa-circle-chevron-down inline-drawer-icon down"></div>
4197 </div>
4198 <div class="inline-drawer-content">
4199 <div class="flex-container">
4200 <label class="checkbox_label" for="auto_continue_enabled">
4201 <input id="auto_continue_enabled" type="checkbox" />
4202 <small data-i18n="Enabled">
4203 Enabled
4204 </small>
4205 </label>
4206 <label class="checkbox_label" for="auto_continue_allow_chat_completions">
4207 <input id="auto_continue_allow_chat_completions" type="checkbox" />
4208 <small data-i18n="Allow for Chat Completion APIs">
4209 Allow for Chat Completion APIs
4210 </small>
4211 </label>
4212 </div>
4213 <div class="auto_continue_settings_block">
4214 <label for="auto_continue_target_length">
4215 <small data-i18n="Target length (tokens)">Target length (tokens)</small>
4216 <input id="auto_continue_target_length" type="number" class="text_pole textarea_compact" min="0" max="1024" />
4217 </label>
4218 </div>
4219 </div>
4220
4221
4222 </div>
4223 </div>
4224 <div name="AutoCompleteToggle" class="inline-drawer wide100p flexFlowColumn">
4225 <div class="inline-drawer-toggle inline-drawer-header userSettingsInnerExpandable" title="Options for the various autocompelte input boxes.">
4226 <b><span data-i18n="AutoComplete Settings">AutoComplete Settings</span></b>
4227 <div class="fa-solid fa-circle-chevron-down inline-drawer-icon down"></div>
4299 </div>4228 </div>
4300 <div name="AutoCompleteToggle">4229 <div class="inline-drawer-content">
4301 <h4 data-i18n="AutoComplete Settings">AutoComplete Settings</h4>
4302 <label data-newbie-hidden class="checkbox_label" for="stscript_autocomplete_autoHide">4230 <label data-newbie-hidden class="checkbox_label" for="stscript_autocomplete_autoHide">
4303 <input id="stscript_autocomplete_autoHide" type="checkbox" />4231 <input id="stscript_autocomplete_autoHide" type="checkbox" />
4304 <small data-i18n="Automatically hide details">4232 <small data-i18n="Automatically hide details">
@@ -4363,6 +4291,7 @@
4363 </div>4291 </div>
4364 </div>4292 </div>
4365 </div>4293 </div>
4294 </div>
4366 <div name="STscriptToggles">4295 <div name="STscriptToggles">
4367 <h4 data-i18n="STscript Settings">STscript Settings</h4>4296 <h4 data-i18n="STscript Settings">STscript Settings</h4>
4368 <div title="Sets default flags for the STscript parser." data-i18n="[title]Sets default flags for the STscript parser.">4297 <div title="Sets default flags for the STscript parser." data-i18n="[title]Sets default flags for the STscript parser.">
@@ -4491,8 +4420,8 @@
4491 </div>4420 </div>
4492 </div>4421 </div>
4493 <div class="alignitemsflexstart flex-container wide100p">4422 <div class="alignitemsflexstart flex-container wide100p">
4494 <input id="extensions_url" type="text" class="flex1 heightFitContent text_pole widthNatural" maxlength="250" data-i18n="[placeholder]Extras API URL" placeholder="Extras API URL">4423 <input id="extensions_url" type="text" class="flex1 heightFitContent text_pole widthNatural" data-i18n="[placeholder]Extras API URL" placeholder="Extras API URL">
4495 <input id="extensions_api_key" type="text" class="flex1 heightFitContent text_pole widthNatural" maxlength="250" data-i18n="[placeholder]Extras API key (optional)" placeholder="Extras API key (optional)">4424 <input id="extensions_api_key" type="text" class="flex1 heightFitContent text_pole widthNatural" data-i18n="[placeholder]Extras API key (optional)" placeholder="Extras API key (optional)">
4496 <div class="extensions_url_block">4425 <div class="extensions_url_block">
4497 <div id="extensions_connect" class="menu_button" data-i18n="Connect">Connect</div>4426 <div id="extensions_connect" class="menu_button" data-i18n="Connect">Connect</div>
4498 </div>4427 </div>
@@ -4536,7 +4465,7 @@
4536 <i class="fa-solid fa-person-circle-question fa-fw"></i>4465 <i class="fa-solid fa-person-circle-question fa-fw"></i>
4537 <div data-i18n="Create">Create</div>4466 <div data-i18n="Create">Create</div>
4538 </div>4467 </div>
4539 <input id="persona_search_bar" class="text_pole width100p flex1 margin0" type="search" data-i18n="[placeholder]Search..." placeholder="Search..." maxlength="100">4468 <input id="persona_search_bar" class="text_pole width100p flex1 margin0" type="search" data-i18n="[placeholder]Search..." placeholder="Search...">
4540 <select id="persona_sort_order" class="margin0">4469 <select id="persona_sort_order" class="margin0">
4541 <option value="search" data-i18n="Search" hidden>Search</option>4470 <option value="search" data-i18n="Search" hidden>Search</option>
4542 <option value="asc">A-Z</option>4471 <option value="asc">A-Z</option>
@@ -4556,7 +4485,7 @@
4556 <div class="flex1">4485 <div class="flex1">
4557 <h4 data-i18n="Name">Name</h4>4486 <h4 data-i18n="Name">Name</h4>
4558 <div class="change_name">4487 <div class="change_name">
4559 <input id="your_name" name="your_name" data-i18n="[placeholder]Enter your name" placeholder="Enter your name" class="text_pole wide100p" maxlength="100" value="" autocomplete="off">4488 <input id="your_name" name="your_name" data-i18n="[placeholder]Enter your name" placeholder="Enter your name" class="text_pole wide100p" value="" autocomplete="off">
4560 <div id="your_name_button" class="menu_button fa-solid fa-check" title="Click to set a new User Name" data-i18n="[title]Click to set a new User Name">4489 <div id="your_name_button" class="menu_button fa-solid fa-check" title="Click to set a new User Name" data-i18n="[title]Click to set a new User Name">
4561 </div>4490 </div>
4562 <div id="lock_user_name" class="menu_button fa-solid fa-unlock" title="Click to lock your selected persona to the current chat. Click again to remove the lock." data-i18n="[title]Click to lock your selected persona to the current chat. Click again to remove the lock.">4491 <div id="lock_user_name" class="menu_button fa-solid fa-unlock" title="Click to lock your selected persona to the current chat. Click again to remove the lock." data-i18n="[title]Click to lock your selected persona to the current chat. Click again to remove the lock.">
@@ -4566,7 +4495,7 @@
4566 </div>4495 </div>
4567 <div>4496 <div>
4568 <h4 data-i18n="Persona Description">Persona Description</h4>4497 <h4 data-i18n="Persona Description">Persona Description</h4>
4569 <textarea id="persona_description" name="persona_description" data-i18n="[placeholder]Example: [{{user}} is a 28-year-old Romanian cat girl.]" placeholder="Example:&#10;[{{user}} is a 28-year-old Romanian cat girl.]" class="text_pole textarea_compact" maxlength="50000" value="" autocomplete="off" rows="8"></textarea>4498 <textarea id="persona_description" name="persona_description" data-i18n="[placeholder]Example: [{{user}} is a 28-year-old Romanian cat girl.]" placeholder="Example:&#10;[{{user}} is a 28-year-old Romanian cat girl.]" class="text_pole textarea_compact" value="" autocomplete="off" rows="8"></textarea>
4570 <div class="extension_token_counter">4499 <div class="extension_token_counter">
4571 <span data-i18n="Tokens persona description">Tokens</span>: <span id="persona_description_token_count">0</span>4500 <span data-i18n="Tokens persona description">Tokens</span>: <span id="persona_description_token_count">0</span>
4572 </div>4501 </div>
@@ -4660,7 +4589,7 @@
4660 <form id="form_create" action="javascript:void(null);" method="post" enctype="multipart/form-data">4589 <form id="form_create" action="javascript:void(null);" method="post" enctype="multipart/form-data">
4661 <div id="avatar-and-name-block">4590 <div id="avatar-and-name-block">
4662 <div id="name_div">4591 <div id="name_div">
4663 <input id="character_name_pole" name="ch_name" class="text_pole" data-i18n="[placeholder]Name this character" placeholder="Name this character" maxlength="100" value="" autocomplete="off">4592 <input id="character_name_pole" name="ch_name" class="text_pole" data-i18n="[placeholder]Name this character" placeholder="Name this character" value="" autocomplete="off">
4664 <div class="extension_token_counter">4593 <div class="extension_token_counter">
4665 <span data-i18n="extension_token_counter">Tokens:</span> <span data-token-counter="character_name_pole" data-token-permanent="true">counting...</span>4594 <span data-i18n="extension_token_counter">Tokens:</span> <span data-token-counter="character_name_pole" data-token-permanent="true">counting...</span>
4666 </div>4595 </div>
@@ -4731,7 +4660,7 @@
4731 </div>4660 </div>
4732 <div id="tags_div">4661 <div id="tags_div">
4733 <div class="tag_controls">4662 <div class="tag_controls">
4734 <input id="tagInput" class="text_pole textarea_compact tag_input wide100p margin0" data-i18n="[placeholder]Search / Create Tags" placeholder="Search / Create tags" maxlength="50" />4663 <input id="tagInput" class="text_pole textarea_compact tag_input wide100p margin0" data-i18n="[placeholder]Search / Create Tags" placeholder="Search / Create tags" />
4735 <div class="tags_view menu_button fa-solid fa-tags" title="View all tags" data-i18n="[title]View all tags"></div>4664 <div class="tags_view menu_button fa-solid fa-tags" title="View all tags" data-i18n="[title]View all tags"></div>
4736 </div>4665 </div>
4737 <div id="tagList" class="tags"></div>4666 <div id="tagList" class="tags"></div>
@@ -4816,12 +4745,12 @@
4816 <div class="inline-drawer-content">4745 <div class="inline-drawer-content">
4817 <div id="group-metadata-controls" class="marginTopBot5">4746 <div id="group-metadata-controls" class="marginTopBot5">
4818 <div class="flex-container wide100p">4747 <div class="flex-container wide100p">
4819 <input id="rm_group_chat_name" class="text_pole flex1" type="text" name="chat_name" data-i18n="[placeholder]Chat Name (Optional)" placeholder="Chat Name (Optional)" maxlength="200" />4748 <input id="rm_group_chat_name" class="text_pole flex1" type="text" name="chat_name" data-i18n="[placeholder]Chat Name (Optional)" placeholder="Chat Name (Optional)" />
4820 <div class="chat_lorebook_button menu_button fa-solid fa-passport" title="Chat Lore" data-i18n="[title]Chat Lore"></div>4749 <div class="chat_lorebook_button menu_button fa-solid fa-passport" title="Chat Lore" data-i18n="[title]Chat Lore"></div>
4821 </div>4750 </div>
4822 <div id="group_tags_div" class="wide100p">4751 <div id="group_tags_div" class="wide100p">
4823 <div class="tag_controls">4752 <div class="tag_controls">
4824 <input id="groupTagInput" class="text_pole textarea_compact tag_input flex1 margin0" data-i18n="[placeholder]Search / Create Tags" placeholder="Search / Create tags" maxlength="50" />4753 <input id="groupTagInput" class="text_pole textarea_compact tag_input flex1 margin0" data-i18n="[placeholder]Search / Create Tags" placeholder="Search / Create tags" />
4825 <div class="tags_view menu_button fa-solid fa-tags margin0" title="View all tags" data-i18n="[title]View all tags"></div>4754 <div class="tags_view menu_button fa-solid fa-tags margin0" title="View all tags" data-i18n="[title]View all tags"></div>
4826 </div>4755 </div>
4827 <div id="groupTagList" class="tags paddingTopBot5"></div>4756 <div id="groupTagList" class="tags paddingTopBot5"></div>
@@ -4863,7 +4792,7 @@
4863 <div class="fa-solid fa-circle-info opacity50p" data-i18n="[title]When 'Join character cards' is selected, all respective fields of the characters are being joined together.This means that in the story string for example all character descriptions will be joined to one big text.If you want those fields to be separated, you can define a prefix or suffix here.This value supports normal macros and will also replace {{char}} with the relevant char's name and &lt;FIELDNAME&gt; with the name of the part (e.g.: description, personality, scenario, etc.)" title="When 'Join character cards' is selected, all respective fields of the characters are being joined together.&#13;This means that in the story string for example all character descriptions will be joined to one big text.&#13;If you want those fields to be separated, you can define a prefix or suffix here.&#13;&#13;This value supports normal macros and will also replace {{char}} with the relevant char's name and &lt;FIELDNAME&gt; with the name of the part (e.g.: description, personality, scenario, etc.)">4792 <div class="fa-solid fa-circle-info opacity50p" data-i18n="[title]When 'Join character cards' is selected, all respective fields of the characters are being joined together.This means that in the story string for example all character descriptions will be joined to one big text.If you want those fields to be separated, you can define a prefix or suffix here.This value supports normal macros and will also replace {{char}} with the relevant char's name and &lt;FIELDNAME&gt; with the name of the part (e.g.: description, personality, scenario, etc.)" title="When 'Join character cards' is selected, all respective fields of the characters are being joined together.&#13;This means that in the story string for example all character descriptions will be joined to one big text.&#13;If you want those fields to be separated, you can define a prefix or suffix here.&#13;&#13;This value supports normal macros and will also replace {{char}} with the relevant char's name and &lt;FIELDNAME&gt; with the name of the part (e.g.: description, personality, scenario, etc.)">
4864 </div>4793 </div>
4865 </label>4794 </label>
4866 <textarea id="rm_group_generation_mode_join_prefix" class="text_pole wide100p textarea_compact autoSetHeight" maxlength="2000" placeholder="&mdash;" rows="1"></textarea>4795 <textarea id="rm_group_generation_mode_join_prefix" class="text_pole wide100p textarea_compact autoSetHeight" placeholder="&mdash;" rows="1"></textarea>
4867 </div>4796 </div>
4868 <div class="flex1 flexGap5" title="Inserted after each part of the joined fields." data-i18n="[title]Inserted after each part of the joined fields.">4797 <div class="flex1 flexGap5" title="Inserted after each part of the joined fields." data-i18n="[title]Inserted after each part of the joined fields.">
4869 <label for="rm_group_generation_mode_join_suffix" class="flexnowrap width100p whitespacenowrap">4798 <label for="rm_group_generation_mode_join_suffix" class="flexnowrap width100p whitespacenowrap">
@@ -4871,7 +4800,7 @@
4871 <div class="fa-solid fa-circle-info opacity50p" data-i18n="[title]When 'Join character cards' is selected, all respective fields of the characters are being joined together.This means that in the story string for example all character descriptions will be joined to one big text.If you want those fields to be separated, you can define a prefix or suffix here.This value supports normal macros and will also replace {{char}} with the relevant char's name and &lt;FIELDNAME&gt; with the name of the part (e.g.: description, personality, scenario, etc.)" title="When 'Join character cards' is selected, all respective fields of the characters are being joined together.&#13;This means that in the story string for example all character descriptions will be joined to one big text.&#13;If you want those fields to be separated, you can define a prefix or suffix here.&#13;&#13;This value supports normal macros and will also replace {{char}} with the relevant char's name and &lt;FIELDNAME&gt; with the name of the part (e.g.: description, personality, scenario, etc.)">4800 <div class="fa-solid fa-circle-info opacity50p" data-i18n="[title]When 'Join character cards' is selected, all respective fields of the characters are being joined together.This means that in the story string for example all character descriptions will be joined to one big text.If you want those fields to be separated, you can define a prefix or suffix here.This value supports normal macros and will also replace {{char}} with the relevant char's name and &lt;FIELDNAME&gt; with the name of the part (e.g.: description, personality, scenario, etc.)" title="When 'Join character cards' is selected, all respective fields of the characters are being joined together.&#13;This means that in the story string for example all character descriptions will be joined to one big text.&#13;If you want those fields to be separated, you can define a prefix or suffix here.&#13;&#13;This value supports normal macros and will also replace {{char}} with the relevant char's name and &lt;FIELDNAME&gt; with the name of the part (e.g.: description, personality, scenario, etc.)">
4872 </div>4801 </div>
4873 </label>4802 </label>
4874 <textarea id="rm_group_generation_mode_join_suffix" class="text_pole wide100p textarea_compact autoSetHeight" maxlength="2000" placeholder="&mdash;" rows="1"></textarea>4803 <textarea id="rm_group_generation_mode_join_suffix" class="text_pole wide100p textarea_compact autoSetHeight" placeholder="&mdash;" rows="1"></textarea>
4875 </div>4804 </div>
4876 </div>4805 </div>
4877 <div id="GroupFavDelOkBack" class="flex-container flexGap5 spaceEvenly flex1">4806 <div id="GroupFavDelOkBack" class="flex-container flexGap5 spaceEvenly flex1">
@@ -4926,7 +4855,7 @@
4926 <div class="inline-drawer-content">4855 <div class="inline-drawer-content">
4927 <div name="Unadded Char List" class="flex-container flexFlowColumn overflowYAuto flex1">4856 <div name="Unadded Char List" class="flex-container flexFlowColumn overflowYAuto flex1">
4928 <div id="rm_group_add_members_header">4857 <div id="rm_group_add_members_header">
4929 <input id="rm_group_filter" class="text_pole margin0" type="search" data-i18n="[placeholder]Search..." placeholder="Search..." maxlength="200" />4858 <input id="rm_group_filter" class="text_pole margin0" type="search" data-i18n="[placeholder]Search..." placeholder="Search..." />
4930 </div>4859 </div>
4931 <div class="rm_tag_controls">4860 <div class="rm_tag_controls">
4932 <div class="tags rm_tag_filter"></div>4861 <div class="tags rm_tag_filter"></div>
@@ -4940,7 +4869,7 @@
4940 <div id="rm_character_import" class="right_menu" style="display: none;">4869 <div id="rm_character_import" class="right_menu" style="display: none;">
4941 <form id="form_import" action="javascript:void(null);" method="post" enctype="multipart/form-data">4870 <form id="form_import" action="javascript:void(null);" method="post" enctype="multipart/form-data">
4942 <input multiple type="file" id="character_import_file" accept=".json, image/png, .yaml, .yml, .charx" name="avatar">4871 <input multiple type="file" id="character_import_file" accept=".json, image/png, .yaml, .yml, .charx" name="avatar">
4943 <input id="character_import_file_type" name="file_type" class="text_pole" maxlength="999" size="2" value="" autocomplete="off">4872 <input id="character_import_file_type" name="file_type" class="text_pole" value="" autocomplete="off">
4944 </form>4873 </form>
4945 <input type="file" id="character_replace_file" accept=".json, image/png, .yaml, .yml, .charx" name="replace_avatar" hidden>4874 <input type="file" id="character_replace_file" accept=".json, image/png, .yaml, .yml, .charx" name="replace_avatar" hidden>
4946 </div>4875 </div>
@@ -4951,7 +4880,7 @@
4951 <div id="character_import_button" title="Import Character from File" data-i18n="[title]Import Character from File" class="menu_button fa-solid fa-file-import faSmallFontSquareFix"></div>4880 <div id="character_import_button" title="Import Character from File" data-i18n="[title]Import Character from File" class="menu_button fa-solid fa-file-import faSmallFontSquareFix"></div>
4952 <div id="external_import_button" title="Import content from external URL" data-i18n="[title]Import content from external URL" class="menu_button fa-solid fa-cloud-arrow-down faSmallFontSquareFix"></div>4881 <div id="external_import_button" title="Import content from external URL" data-i18n="[title]Import content from external URL" class="menu_button fa-solid fa-cloud-arrow-down faSmallFontSquareFix"></div>
4953 <div id="rm_button_group_chats" title="Create New Chat Group" data-i18n="[title]Create New Chat Group" class="menu_button fa-solid fa-users-gear "></div>4882 <div id="rm_button_group_chats" title="Create New Chat Group" data-i18n="[title]Create New Chat Group" class="menu_button fa-solid fa-users-gear "></div>
4954 <input id="character_search_bar" class="text_pole width100p" type="search" data-i18n="[placeholder]Search..." placeholder="Search..." maxlength="100" />4883 <input id="character_search_bar" class="text_pole width100p" type="search" data-i18n="[placeholder]Search..." placeholder="Search..." />
4955 <select id="character_sort_order" title="Characters sorting order" data-i18n="[title]Characters sorting order">4884 <select id="character_sort_order" title="Characters sorting order" data-i18n="[title]Characters sorting order">
4956 <option data-field="search" data-order="desc" data-i18n="Search" hidden>Search</option>4885 <option data-field="search" data-order="desc" data-i18n="Search" hidden>Search</option>
4957 <option data-field="name" data-order="asc" data-i18n="A-Z">A-Z</option>4886 <option data-field="name" data-order="asc" data-i18n="A-Z">A-Z</option>
@@ -4987,6 +4916,61 @@
4987 </div>4916 </div>
4988 </div>4917 </div>
4989 <!-- various fullscreen popups -->4918 <!-- various fullscreen popups -->
4919 <div name="templatesAndPopupsWrapper"> <!--this div is just for IDE sanity for quick collapsing-->
4920 <div id="export_format_popup" class="list-group">
4921 <div class="export_format list-group-item" data-format="png">PNG</div>
4922 <div class="export_format list-group-item" data-format="json">JSON</div>
4923 </div>
4924 <div id="zoomed_avatar_template" class="template_element">
4925 <div class="zoomed_avatar">
4926 <div class="panelControlBar flex-container">
4927 <div class="fa-fw fa-solid fa-grip drag-grabber"></div>
4928 <div class="fa-fw fa-solid fa-circle-xmark dragClose" id="closeZoom"></div>
4929 </div>
4930 <div class="zoomed_avatar_container">
4931 <img class="zoomed_avatar_img" src="" data-izoomify-url="" data-izoomify-magnify="1.8" data-izoomify-duration="300" alt="">
4932 </div>
4933 </div>
4934 </div>
4935 <template id="generic_draggable_template">
4936 <div class="draggable">
4937 <div class="dragTitle"></div>
4938 <div class="panelControlBar flex-container">
4939 <div class="fa-fw fa-solid fa-grip drag-grabber"></div>
4940 <div class="fa-fw fa-solid fa-circle-xmark dragClose"></div>
4941 </div>
4942 </div>
4943 </template>
4944 <div id="user_avatar_template" class="template_element">
4945 <div class="avatar-container">
4946 <div imgfile="" class="avatar">
4947 <img src="" alt="User Avatar">
4948 </div>
4949 <div class="flex-container wide100pLess70px character_select_container">
4950 <div class="wide100p character_name_block">
4951 <span class="ch_name flex1"></span>
4952 <div class="avatar-buttons">
4953 <button class="menu_button bind_user_name" title="Bind user name to that avatar" data-i18n="[title]Bind user name to that avatar">
4954 <i class="fa-fw fa-solid fa-user-edit"></i>
4955 </button>
4956 <button class="menu_button set_persona_image" title="Change persona image" data-i18n="[title]Change persona image">
4957 <i class="fa-fw fa-solid fa-image"></i>
4958 </button>
4959 <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.">
4960 <i class="fa-fw fa-solid fa-crown"></i>
4961 </button>
4962 <button class="menu_button duplicate_persona" title="Duplicate persona" data-i18n="[title]Duplicate persona">
4963 <i class="fa-fw fa-solid fa-clone"></i>
4964 </button>
4965 <button class="menu_button delete_avatar" title="Delete persona" data-i18n="[title]Delete persona">
4966 <i class="fa-fw fa-solid fa-trash-alt"></i>
4967 </button>
4968 </div>
4969 </div>
4970 <div class="ch_description"></div>
4971 </div>
4972 </div>
4973 </div>
4990 <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 -->4974 <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 -->
4991 <dialog class="popup">4975 <dialog class="popup">
4992 <div class="popup-body">4976 <div class="popup-body">
@@ -4996,7 +4980,7 @@
4996 <div class="popup-crop-wrap">4980 <div class="popup-crop-wrap">
4997 <img class="popup-crop-image" src="">4981 <img class="popup-crop-image" src="">
4998 </div>4982 </div>
4999 <textarea class="popup-input text_pole result-control auto-select" rows="1" data-result="1" data-result-event="submit"></textarea>4983 <textarea class="popup-input text_pole result-control" rows="1" data-result="1" data-result-event="submit"></textarea>
5000 <div class="popup-inputs"></div>4984 <div class="popup-inputs"></div>
5001 <div class="popup-controls">4985 <div class="popup-controls">
5002 <div class="popup-button-ok menu_button result-control" data-result="1" data-i18n="Delete">Delete</div>4986 <div class="popup-button-ok menu_button result-control" data-result="1" data-i18n="Delete">Delete</div>
@@ -5039,14 +5023,14 @@
5039 <small data-i18n="Insert {{original}} into either box to include the respective default prompt from system settings.">Insert {{original}} into either box to include the respective default prompt from system settings.</small>5023 <small data-i18n="Insert {{original}} into either box to include the respective default prompt from system settings.">Insert {{original}} into either box to include the respective default prompt from system settings.</small>
5040 <div>5024 <div>
5041 <h4 data-i18n="Main Prompt">Main Prompt</h4>5025 <h4 data-i18n="Main Prompt">Main Prompt</h4>
5042 <textarea id="system_prompt_textarea" name="system_prompt" data-i18n="[placeholder]Any contents here will replace the default Main Prompt used for this character. (v2 spec: system_prompt)" placeholder="Any contents here will replace the default Main Prompt used for this character.&#10;(v2 spec: system_prompt)" form="form_create" class="text_pole" autocomplete="off" rows="3" maxlength="50000"></textarea>5026 <textarea id="system_prompt_textarea" name="system_prompt" data-i18n="[placeholder]Any contents here will replace the default Main Prompt used for this character. (v2 spec: system_prompt)" placeholder="Any contents here will replace the default Main Prompt used for this character.&#10;(v2 spec: system_prompt)" form="form_create" class="text_pole" autocomplete="off" rows="3"></textarea>
5043 <div class="extension_token_counter">5027 <div class="extension_token_counter">
5044 <span data-i18n="extension_token_counter">Tokens:</span> <span data-token-counter="system_prompt_textarea">counting...</span>5028 <span data-i18n="extension_token_counter">Tokens:</span> <span data-token-counter="system_prompt_textarea">counting...</span>
5045 </div>5029 </div>
5046 </div>5030 </div>
5047 <div>5031 <div>
5048 <h4 data-i18n="Post-History Instructions">Post-History Instructions</h4>5032 <h4 data-i18n="Post-History Instructions">Post-History Instructions</h4>
5049 <textarea id="post_history_instructions_textarea" name="post_history_instructions" data-i18n="[placeholder]Any contents here will replace the default Post-History Instructions used for this character. (v2 spec: post_history_instructions)" placeholder="Any contents here will replace the default Post-History Instructions used for this character.&#10;(v2 spec: post_history_instructions)" form="form_create" class="text_pole" autocomplete="off" rows="3" maxlength="50000"></textarea>5033 <textarea id="post_history_instructions_textarea" name="post_history_instructions" data-i18n="[placeholder]Any contents here will replace the default Post-History Instructions used for this character. (v2 spec: post_history_instructions)" placeholder="Any contents here will replace the default Post-History Instructions used for this character.&#10;(v2 spec: post_history_instructions)" form="form_create" class="text_pole" autocomplete="off" rows="3"></textarea>
5050 <div class="extension_token_counter">5034 <div class="extension_token_counter">
5051 <span data-i18n="extension_token_counter">Tokens:</span> <span data-token-counter="post_history_instructions_textarea">counting...</span>5035 <span data-i18n="extension_token_counter">Tokens:</span> <span data-token-counter="post_history_instructions_textarea">counting...</span>
5052 </div>5036 </div>
@@ -5067,21 +5051,21 @@
5067 <div class="flex-container flexnowrap">5051 <div class="flex-container flexnowrap">
5068 <div class="flex1">5052 <div class="flex1">
5069 <h4 data-i18n="Created by">Created by</h4>5053 <h4 data-i18n="Created by">Created by</h4>
5070 <textarea id="creator_textarea" name="creator" data-i18n="[placeholder](Botmaker's name / Contact Info)" placeholder="(Botmaker's name / Contact info)" form="form_create" class="text_pole" autocomplete="off" rows="2" maxlength="5000"></textarea>5054 <textarea id="creator_textarea" name="creator" data-i18n="[placeholder](Botmaker's name / Contact Info)" placeholder="(Botmaker's name / Contact info)" form="form_create" class="text_pole" autocomplete="off" rows="2"></textarea>
5071 </div>5055 </div>
5072 <div class="flex1">5056 <div class="flex1">
5073 <h4 data-i18n="Character Version">Character Version</h4>5057 <h4 data-i18n="Character Version">Character Version</h4>
5074 <textarea id="character_version_textarea" name="character_version" data-i18n="[placeholder](If you want to track character versions)" placeholder="(If you want to track character versions)" form="form_create" class="text_pole" autocomplete="off" rows="2" maxlength="500"></textarea>5058 <textarea id="character_version_textarea" name="character_version" data-i18n="[placeholder](If you want to track character versions)" placeholder="(If you want to track character versions)" form="form_create" class="text_pole" autocomplete="off" rows="2"></textarea>
5075 </div>5059 </div>
5076 </div>5060 </div>
5077 <div class="flex-container flexnowrap">5061 <div class="flex-container flexnowrap">
5078 <div class="flex1">5062 <div class="flex1">
5079 <h4 class="flex-box" data-i18n="Creator's Notes">Creator's Notes<i class="editor_maximize fa-solid fa-maximize" data-for="creator_notes_textarea" title="Expand the editor" data-i18n="[title]Expand the editor"></i></h4>5063 <h4 class="flex-box" data-i18n="Creator's Notes">Creator's Notes<i class="editor_maximize fa-solid fa-maximize" data-for="creator_notes_textarea" title="Expand the editor" data-i18n="[title]Expand the editor"></i></h4>
5080 <textarea id="creator_notes_textarea" name="creator_notes" data-i18n="[placeholder](Describe the bot, give use tips, or list the chat models it has been tested on. This will be displayed in the character list.)" placeholder="(Describe the bot, give use tips, or list the chat models it has been tested on. This will be displayed in the character list.)" form="form_create" class="text_pole" autocomplete="off" rows="4" maxlength="20000"></textarea>5064 <textarea id="creator_notes_textarea" name="creator_notes" data-i18n="[placeholder](Describe the bot, give use tips, or list the chat models it has been tested on. This will be displayed in the character list.)" placeholder="(Describe the bot, give use tips, or list the chat models it has been tested on. This will be displayed in the character list.)" form="form_create" class="text_pole" autocomplete="off" rows="4"></textarea>
5081 </div>5065 </div>
5082 <div class="flex1">5066 <div class="flex1">
5083 <h4 data-i18n="Tags to Embed">Tags to Embed</h4>5067 <h4 data-i18n="Tags to Embed">Tags to Embed</h4>
5084 <textarea id="tags_textarea" name="tags" data-i18n="[placeholder](Write a comma-separated list of tags)" placeholder="(Write a comma-separated list of tags)" form="form_create" class="text_pole" autocomplete="off" rows="4" maxlength="5000"></textarea>5068 <textarea id="tags_textarea" name="tags" data-i18n="[placeholder](Write a comma-separated list of tags)" placeholder="(Write a comma-separated list of tags)" form="form_create" class="text_pole" autocomplete="off" rows="4"></textarea>
5085 </div>5069 </div>
5086 </div>5070 </div>
5087 </div>5071 </div>
@@ -5092,7 +5076,7 @@
5092 <span data-i18n="Personality summary">Personality summary</span>5076 <span data-i18n="Personality summary">Personality summary</span>
5093 <a href="https://docs.sillytavern.app/usage/core-concepts/characterdesign/#personality-summary" class="notes-link" target="_blank"><span class="fa-solid fa-circle-question note-link-span"></span></a>5077 <a href="https://docs.sillytavern.app/usage/core-concepts/characterdesign/#personality-summary" class="notes-link" target="_blank"><span class="fa-solid fa-circle-question note-link-span"></span></a>
5094 </h4>5078 </h4>
5095 <textarea id="personality_textarea" name="personality" data-i18n="[placeholder](A brief description of the personality)" placeholder="(A brief description of the personality)" form="form_create" class="text_pole" autocomplete="off" rows="4" maxlength="50000"></textarea>5079 <textarea id="personality_textarea" name="personality" data-i18n="[placeholder](A brief description of the personality)" placeholder="(A brief description of the personality)" form="form_create" class="text_pole" autocomplete="off" rows="4"></textarea>
5096 <div class="extension_token_counter">5080 <div class="extension_token_counter">
5097 <span data-i18n="extension_token_counter">Tokens:</span> <span data-token-counter="personality_textarea" data-token-permanent="true">counting...</span>5081 <span data-i18n="extension_token_counter">Tokens:</span> <span data-token-counter="personality_textarea" data-token-permanent="true">counting...</span>
5098 </div>5082 </div>
@@ -5104,7 +5088,7 @@
5104 <span class="fa-solid fa-circle-question note-link-span"></span>5088 <span class="fa-solid fa-circle-question note-link-span"></span>
5105 </a>5089 </a>
5106 </h4>5090 </h4>
5107 <textarea id="scenario_pole" name="scenario" data-i18n="[placeholder](Circumstances and context of the interaction)" placeholder="(Circumstances and context of the interaction)" class="text_pole" maxlength="50000" value="" autocomplete="off" form="form_create" rows="4"></textarea>5091 <textarea id="scenario_pole" name="scenario" data-i18n="[placeholder](Circumstances and context of the interaction)" placeholder="(Circumstances and context of the interaction)" class="text_pole" value="" autocomplete="off" form="form_create" rows="4"></textarea>
5108 <div class="extension_token_counter">5092 <div class="extension_token_counter">
5109 <span data-i18n="extension_token_counter">Tokens:</span> <span data-token-counter="scenario_pole" data-token-permanent="true">counting...</span>5093 <span data-i18n="extension_token_counter">Tokens:</span> <span data-token-counter="scenario_pole" data-token-permanent="true">counting...</span>
5110 </div>5094 </div>
@@ -5116,7 +5100,7 @@
5116 Character's Note5100 Character's Note
5117 </span>5101 </span>
5118 </h4>5102 </h4>
5119 <textarea id="depth_prompt_prompt" name="depth_prompt_prompt" class="text_pole" rows="5" maxlength="50000" autocomplete="off" form="form_create" data-i18n="[placeholder](Text to be inserted in-chat @ designated depth and role)" placeholder="(Text to be inserted in-chat @ designated depth and role)"></textarea>5103 <textarea id="depth_prompt_prompt" name="depth_prompt_prompt" class="text_pole" rows="5" autocomplete="off" form="form_create" data-i18n="[placeholder](Text to be inserted in-chat @ designated depth and role)" placeholder="(Text to be inserted in-chat @ designated depth and role)"></textarea>
5120 </div>5104 </div>
5121 <div>5105 <div>
5122 <h4>5106 <h4>
@@ -5158,52 +5142,24 @@
5158 <h4><span data-i18n="Examples of dialogue">Examples of dialogue</span></h4>5142 <h4><span data-i18n="Examples of dialogue">Examples of dialogue</span></h4>
5159 <h5 data-i18n="Important to set the character's writing style.">Important to set the character's writing style. <a href="https://docs.sillytavern.app/usage/core-concepts/characterdesign/#examples-of-dialogue" class="notes-link" target="_blank"><span class="fa-solid fa-circle-question note-link-span"></span></a></h5>5143 <h5 data-i18n="Important to set the character's writing style.">Important to set the character's writing style. <a href="https://docs.sillytavern.app/usage/core-concepts/characterdesign/#examples-of-dialogue" class="notes-link" target="_blank"><span class="fa-solid fa-circle-question note-link-span"></span></a></h5>
5160 </div>5144 </div>
5161 <textarea id="mes_example_textarea" class="flexGrow" name="mes_example" data-i18n="[placeholder](Examples of chat dialog. Begin each example with START on a new line.)" placeholder="(Examples of chat dialog. Begin each example with &lt;START&gt; on a new line.)" form="form_create" maxlength="50000" rows="6"></textarea>5145 <textarea id="mes_example_textarea" class="flexGrow" name="mes_example" data-i18n="[placeholder](Examples of chat dialog. Begin each example with START on a new line.)" placeholder="(Examples of chat dialog. Begin each example with &lt;START&gt; on a new line.)" form="form_create" rows="6"></textarea>
5162 <div class="extension_token_counter">5146 <div class="extension_token_counter">
5163 <span data-i18n="extension_token_counter">Tokens:</span> <span data-token-counter="mes_example_textarea">counting...</span>5147 <span data-i18n="extension_token_counter">Tokens:</span> <span data-token-counter="mes_example_textarea">counting...</span>
5164 </div>5148 </div>
5165 <!-- PLACEHOLDER CODE FOR NEW EXAMPLE CHAT HANDLING5149 <!-- TODO: Example chats handhold-editor concept: https://gist.github.com/Cohee1207/50da02a4001ac1adae9b440f9b8e1079 -->
5166 <div name="exampleChatsBlockTemplate" class="flex-container flexFlowColumn">
5167 <div class="flex-container alignitemscenter">
5168 <textarea class="flexShrink flexGrow wideMinContent" rows="1" placeholder="Name for this example chat"></textarea>
5169 <div class="fa-solid fa-plus menu_button" title="Add a new message to this example chat block"></div>
5170 </div>
5171 <div class="flex-container whitespacenowrap">
5172 <div class="flex-container flexFlowColumn">
5173 <select>
5174 <option>{{user}}</option>
5175 <option>{{char}}</option>
5176 <option>Custom</option>
5177 </select>
5178 <textarea rows="1" placeholder="Custom Entity"></textarea>
5179 </div>
5180 <textarea class="flexShrink flexGrow wideMinContent" placeholder="Content of the example chat."></textarea>
5181 </div>
5182 <div class="flex-container whitespacenowrap">
5183 <div class="flex-container flexFlowColumn">
5184 <select>
5185 <option>{{user}}</option>
5186 <option>{{char}}</option>
5187 <option>Custom</option>
5188 </select>
5189 <textarea rows="1" placeholder="Custom Entity"></textarea>
5190 </div>
5191 <textarea class="flexShrink flexGrow wideMinContent" placeholder="Content of the example chat."></textarea>
5192 </div>
5193 </div>
5194 -->
5195 </div>5150 </div>
5196 <div id="character_popup_ok" class="menu_button" data-i18n="Save">Save</div>5151 <div id="character_popup_ok" class="menu_button" data-i18n="Save">Save</div>
5197 </div>5152 </div>
5153
5198 <div id="shadow_select_chat_popup">5154 <div id="shadow_select_chat_popup">
5199 <div id="select_chat_popup">5155 <div id="select_chat_popup">
5200 <div name="selectChatPopupHeader" class="flex-container alignitemscenter justifySpaceBetween flexGap10">5156 <div name="selectChatPopupHeader" class="flex-container alignitemscenter justifySpaceBetween flexGap10">
5201 <div id="select_chat_import"> <!-- import chat popup header -->5157 <div id="select_chat_import"> <!-- import chat popup header -->
5202 <form id="form_import_chat" action="javascript:void(null);" method="post" enctype="multipart/form-data" style="display: none;">5158 <form id="form_import_chat" action="javascript:void(null);" method="post" enctype="multipart/form-data" style="display: none;">
5203 <input type="file" id="chat_import_file" accept=".json, .jsonl" name="avatar">5159 <input type="file" id="chat_import_file" accept=".json, .jsonl" name="avatar">
5204 <input id="chat_import_file_type" name="file_type" class="text_pole" maxlength="999" size="2" value="" autocomplete="off" style="display: none;">5160 <input id="chat_import_file_type" name="file_type" class="text_pole" value="" autocomplete="off" style="display: none;">
5205 <input id="chat_import_avatar_url" name="avatar_url" class="text_pole" maxlength="999" size="2" value="" autocomplete="off" style="display: none;">5161 <input id="chat_import_avatar_url" name="avatar_url" class="text_pole" value="" autocomplete="off" style="display: none;">
5206 <input id="chat_import_character_name" name="character_name" class="text_pole" maxlength="999" size="2" value="" autocomplete="off" style="display: none;">5162 <input id="chat_import_character_name" name="character_name" class="text_pole" value="" autocomplete="off" style="display: none;">
5207 </form>5163 </form>
5208 </div>5164 </div>
5209 <div id="selectChatPopupHeaderText" class="TxtLrgBoldCenter">5165 <div id="selectChatPopupHeaderText" class="TxtLrgBoldCenter">
@@ -5335,22 +5291,21 @@
5335 <div class="world_entry">5291 <div class="world_entry">
5336 <form class="world_entry_form wi-card-entry">5292 <form class="world_entry_form wi-card-entry">
5337 <div class="inline-drawer wide100p">5293 <div class="inline-drawer wide100p">
5338 <div class="inline-drawer-header gap5px padding0">5294 <div class="inline-drawer-toggle inline-drawer-header gap5px padding0">
5339 <span class="drag-handle">&#9776;</span>5295 <span class="drag-handle">&#9776;</span>
5340 <div class="gap5px world_entry_thin_controls wide100p alignitemscenter">5296 <div class="gap5px world_entry_thin_controls wide100p alignitemscenter">
5341 <div class="inline-drawer-toggle fa-fw fa-solid fa-circle-chevron-down inline-drawer-icon down"></div>5297 <div class="fa-fw fa-solid fa-circle-chevron-down inline-drawer-icon down"></div>
5342 <div class="fa-solid fa-toggle-on killSwitch" name="entryKillSwitch" title="Toggle entry's active state."></div>
5343 <div class="flex-container alignitemscenter wide100p">5298 <div class="flex-container alignitemscenter wide100p">
5344
5345 <div class="WIEntryTitleAndStatus flex-container flex1 alignitemscenter">5299 <div class="WIEntryTitleAndStatus flex-container flex1 alignitemscenter">
5346
5347 <div class="flex-container flex1">5300 <div class="flex-container flex1">
5348 <textarea class="text_pole" rows="1" name="comment" maxlength="5000" data-i18n="[placeholder]Entry Title/Memo" placeholder="Entry Title/Memo"></textarea>5301 <textarea class="text_pole" rows="1" name="comment" data-i18n="[placeholder]Entry Title/Memo" placeholder="Entry Title/Memo"></textarea>
5349 </div>5302 </div>
5303 <!-- <span class="world_entry_form_position_value"></span> -->
5350 <select data-i18n="[title]WI Entry Status:🔵 Constant🟢 Normal🔗 Vectorized❌ Disabled" title="WI Entry Status:&#13;🔵 Constant&#13;🟢 Normal&#13;🔗 Vectorized&#13;❌ Disabled" name="entryStateSelector" class="text_pole widthNatural margin0">5304 <select data-i18n="[title]WI Entry Status:🔵 Constant🟢 Normal🔗 Vectorized❌ Disabled" title="WI Entry Status:&#13;🔵 Constant&#13;🟢 Normal&#13;🔗 Vectorized&#13;❌ Disabled" name="entryStateSelector" class="text_pole widthNatural margin0">
5351 <option value="constant" title="Constant" data-i18n="[title]WI_Entry_Status_Constant">🔵</option>5305 <option value="constant" title="Constant" data-i18n="[title]WI_Entry_Status_Constant">🔵</option>
5352 <option value="normal" title="Normal" data-i18n="[title]WI_Entry_Status_Normal">🟢</option>5306 <option value="normal" title="Normal" data-i18n="[title]WI_Entry_Status_Normal">🟢</option>
5353 <option value="vectorized" title="Vectorized" data-i18n="[title]WI_Entry_Status_Vectorized">🔗</option>5307 <option value="vectorized" title="Vectorized" data-i18n="[title]WI_Entry_Status_Vectorized">🔗</option>
5308 <option value="disabled" title="Disabled" data-i18n="[title]WI_Entry_Status_Disabled">❌</option>
5354 </select>5309 </select>
5355 </div>5310 </div>
5356 <div class="WIEnteryHeaderControls flex-container">5311 <div class="WIEnteryHeaderControls flex-container">
@@ -5415,7 +5370,7 @@
5415 </small>5370 </small>
5416 <small class="textAlignCenter" data-i18n="Primary Keywords">Primary Keywords</small>5371 <small class="textAlignCenter" data-i18n="Primary Keywords">Primary Keywords</small>
5417 <select class="keyprimaryselect keyselect select2_multi_sameline" name="key" data-i18n="[placeholder]Keywords or Regexes" placeholder="Keywords or Regexes" multiple="multiple"></select>5372 <select class="keyprimaryselect keyselect select2_multi_sameline" name="key" data-i18n="[placeholder]Keywords or Regexes" placeholder="Keywords or Regexes" multiple="multiple"></select>
5418 <textarea class="text_pole keyprimarytextpole mobile" name="key" rows="1" data-i18n="[placeholder]Comma separated list" placeholder="Comma separated list" maxlength="2000" style="display: none;"></textarea>5373 <textarea class="text_pole keyprimarytextpole mobile" name="key" rows="1" data-i18n="[placeholder]Comma separated list" placeholder="Comma separated list" style="display: none;"></textarea>
5419 <button type="button" class="switch_input_type_icon" tabindex="-1" title="Switch to plaintext mode" data-i18n="[title]Switch to plaintext mode" data-icon-on="✨" data-icon-off="⌨️" data-tooltip-on="Switch to fancy mode" data-tooltip-off="Switch to plaintext mode">5374 <button type="button" class="switch_input_type_icon" tabindex="-1" title="Switch to plaintext mode" data-i18n="[title]Switch to plaintext mode" data-icon-on="✨" data-icon-off="⌨️" data-tooltip-on="Switch to fancy mode" data-tooltip-off="Switch to plaintext mode">
5420 ⌨️5375 ⌨️
5421 </button>5376 </button>
@@ -5437,7 +5392,7 @@
5437 </small>5392 </small>
5438 <small class="textAlignCenter" data-i18n="Optional Filter">Optional Filter</small>5393 <small class="textAlignCenter" data-i18n="Optional Filter">Optional Filter</small>
5439 <select class="keysecondaryselect keyselect select2_multi_sameline" name="keysecondary" data-i18n="[placeholder]Keywords or Regexes (ignored if empty)" placeholder="Keywords or Regexes (ignored if empty)" multiple="multiple"></select>5394 <select class="keysecondaryselect keyselect select2_multi_sameline" name="keysecondary" data-i18n="[placeholder]Keywords or Regexes (ignored if empty)" placeholder="Keywords or Regexes (ignored if empty)" multiple="multiple"></select>
5440 <textarea class="text_pole keysecondarytextpole mobile" name="keysecondary" rows="1" data-i18n="[placeholder]Comma separated list (ignored if empty)" placeholder="Comma separated list (ignored if empty)" maxlength="2000" style="display: none;"></textarea>5395 <textarea class="text_pole keysecondarytextpole mobile" name="keysecondary" rows="1" data-i18n="[placeholder]Comma separated list (ignored if empty)" placeholder="Comma separated list (ignored if empty)" style="display: none;"></textarea>
5441 <button type="button" class="switch_input_type_icon" tabindex="-1" title="Switch to plaintext mode" data-i18n="[title]Switch to plaintext mode" data-icon-on="✨" data-icon-off="⌨️" data-tooltip-on="Switch to fancy mode" data-tooltip-off="Switch to plaintext mode">5396 <button type="button" class="switch_input_type_icon" tabindex="-1" title="Switch to plaintext mode" data-i18n="[title]Switch to plaintext mode" data-icon-on="✨" data-icon-off="⌨️" data-tooltip-on="Switch to fancy mode" data-tooltip-off="Switch to plaintext mode">
5442 ⌨️5397 ⌨️
5443 </button>5398 </button>
@@ -5599,16 +5554,13 @@
5599 <div class="flex-container wide100p flexGap10">5554 <div class="flex-container wide100p flexGap10">
5600 <div class="flex4 flex-container flexFlowColumn flexNoGap">5555 <div class="flex4 flex-container flexFlowColumn flexNoGap">
5601 <div class="flex-container justifySpaceBetween">5556 <div class="flex-container justifySpaceBetween">
5602 <small for="characterFilter" data-i18n="Filter to Characters or Tags">5557 <small for="characterFilter" data-i18n="Filter to Character(s)">
5603 Filter to Characters or Tags5558 Filter to Character(s)
5604 </small>5559 </small>
5605 <label class="checkbox_label flexNoGap margin-r5" for="character_exclusion">5560 <label class="checkbox_label flexNoGap margin-r5" for="character_exclusion">
5606 <input type="checkbox" name="character_exclusion" />5561 <input type="checkbox" name="character_exclusion" />
5607 <span>5562 <span>
5608 <small title="Switch the Character/Tags filter around to exclude the listed characters and tags from matching for this entry" data-i18n="[title]Switch the Character/Tags filter around to exclude the listed characters and tags from matching for this entry">5563 <small data-i18n="Character Exclusion">Character Exclusion</small>
5609 <span data-i18n="Exclude">Exclude</span>
5610 <div class="fa-solid fa-circle-info opacity50p"></div>
5611 </small>
5612 </span>5564 </span>
5613 </label>5565 </label>
5614 </div>5566 </div>
@@ -5826,11 +5778,6 @@
5826 <div title="Caption" class="right_menu_button fa-lg fa-solid fa-envelope-open-text mes_img_caption" data-i18n="[title]Caption"></div>5778 <div title="Caption" class="right_menu_button fa-lg fa-solid fa-envelope-open-text mes_img_caption" data-i18n="[title]Caption"></div>
5827 <div title="Delete" class="right_menu_button fa-lg fa-solid fa-trash-can mes_img_delete" data-i18n="[title]Delete"></div>5779 <div title="Delete" class="right_menu_button fa-lg fa-solid fa-trash-can mes_img_delete" data-i18n="[title]Delete"></div>
5828 </div>5780 </div>
5829 <div class="mes_img_swipes">
5830 <div title="Swipe left" class="right_menu_button fa-lg fa-solid fa-chevron-left mes_img_swipe_left" data-i18n="[title]Swipe left"></div>
5831 <div class="mes_img_swipe_counter">1/1</div>
5832 <div title="Swipe right" class="right_menu_button fa-lg fa-solid fa-chevron-right mes_img_swipe_right" data-i18n="[title]Swipe right"></div>
5833 </div>
5834 <img class="mes_img" src="" />5781 <img class="mes_img" src="" />
5835 </div>5782 </div>
5836 <div class="mes_bias"></div>5783 <div class="mes_bias"></div>
@@ -5878,6 +5825,21 @@
5878 <b data-i18n="SillyTavern is aimed at advanced users.">5825 <b data-i18n="SillyTavern is aimed at advanced users.">
5879 SillyTavern is aimed at advanced users.5826 SillyTavern is aimed at advanced users.
5880 </b>5827 </b>
5828 <div>
5829 <span data-i18n="If you're new to this, enable the simplified UI mode below.">
5830 If you're new to this, enable the simplified UI mode below.
5831 </span>
5832 <br>
5833 <span data-i18n="Change it later in the 'User Settings' panel.">
5834 Change it later in the 'User Settings' panel.
5835 </span>
5836 </div>
5837 <label class="checkbox_label">
5838 <input type="checkbox" name="enable_simple_mode" />
5839 <span data-i18n="Enable simple UI mode">
5840 Enable simple UI mode
5841 </span>
5842 </label>
5881 <div class="expander"></div>5843 <div class="expander"></div>
5882 <div class="textAlignCenter">5844 <div class="textAlignCenter">
5883 <h3 data-i18n="Looking for AI characters?">5845 <h3 data-i18n="Looking for AI characters?">
@@ -6014,7 +5976,7 @@
6014 <strong><span data-i18n="Alternate Greeting #">Alternate Greeting #</span><span class="greeting_index"></span></strong>5976 <strong><span data-i18n="Alternate Greeting #">Alternate Greeting #</span><span class="greeting_index"></span></strong>
6015 <div class="menu_button fa-solid fa-trash-alt delete_alternate_greeting"></div>5977 <div class="menu_button fa-solid fa-trash-alt delete_alternate_greeting"></div>
6016 </div>5978 </div>
6017 <textarea name="alternate_greetings" data-i18n="[placeholder](This will be the first message from the character that starts every chat)" placeholder="(This will be the first message from the character that starts every chat)" class="text_pole textarea_compact alternate_greeting_text" maxlength="50000" value="" autocomplete="off" rows="16"></textarea>5979 <textarea name="alternate_greetings" data-i18n="[placeholder](This will be the first message from the character that starts every chat)" placeholder="(This will be the first message from the character that starts every chat)" class="text_pole textarea_compact alternate_greeting_text" value="" autocomplete="off" rows="16"></textarea>
6018 </div>5980 </div>
6019 </div>5981 </div>
60205982
@@ -6031,6 +5993,7 @@
6031 <div class="right_menu_button mes_file_delete fa-solid fa-trash-can" title="Remove the file" data-i18n="[title]Remove the file"></div>5993 <div class="right_menu_button mes_file_delete fa-solid fa-trash-can" title="Remove the file" data-i18n="[title]Remove the file"></div>
6032 </div>5994 </div>
6033 </div>5995 </div>
5996 </div>
6034 <div id="movingDivs">5997 <div id="movingDivs">
6035 <div id="floatingPrompt" class="drawer-content flexGap5">5998 <div id="floatingPrompt" class="drawer-content flexGap5">
6036 <div class="panelControlBar flex-container alignItemsBaseline">5999 <div class="panelControlBar flex-container alignItemsBaseline">
@@ -6051,7 +6014,7 @@
6051 <b data-i18n="Unique to this chat">Unique to this chat</b>.<br>6014 <b data-i18n="Unique to this chat">Unique to this chat</b>.<br>
6052 <span data-i18n="Checkpoints inherit the Note from their parent, and can be changed individually after that.">Checkpoints inherit the Note from their parent, and can be changed individually after that.</span><br>6015 <span data-i18n="Checkpoints inherit the Note from their parent, and can be changed individually after that.">Checkpoints inherit the Note from their parent, and can be changed individually after that.</span><br>
6053 </small>6016 </small>
6054 <textarea id="extension_floating_prompt" class="text_pole textarea_compact" rows="8" maxlength="50000"></textarea>6017 <textarea id="extension_floating_prompt" class="text_pole textarea_compact" rows="8"></textarea>
6055 <div class="extension_token_counter">6018 <div class="extension_token_counter">
6056 <span data-i18n="extension_token_counter">Tokens:</span> <span id="extension_floating_prompt_token_counter">0</span>6019 <span data-i18n="extension_token_counter">Tokens:</span> <span id="extension_floating_prompt_token_counter">0</span>
6057 </div>6020 </div>
@@ -6108,7 +6071,7 @@
6108 <div class="inline-drawer-content">6071 <div class="inline-drawer-content">
6109 <small data-i18n="Will be automatically added as the author's note for this character. Will be used in groups, but can't be modified when a group chat is open.">Will be automatically added as the author's note for this character. Will be used in groups, but6072 <small data-i18n="Will be automatically added as the author's note for this character. Will be used in groups, but can't be modified when a group chat is open.">Will be automatically added as the author's note for this character. Will be used in groups, but
6110 can't be modified when a group chat is open.</small>6073 can't be modified when a group chat is open.</small>
6111 <textarea id="extension_floating_chara" class="text_pole textarea_compact" rows="8" maxlength="50000" placeholder="Example:&#10;[Scenario: wacky adventures; Genre: romantic comedy; Style: verbose, creative]"></textarea>6074 <textarea id="extension_floating_chara" class="text_pole textarea_compact" rows="8" placeholder="Example:&#10;[Scenario: wacky adventures; Genre: romantic comedy; Style: verbose, creative]"></textarea>
6112 <div class="extension_token_counter">6075 <div class="extension_token_counter">
6113 <span data-i18n="extension_token_counter">Tokens:</span> <span id="extension_floating_chara_token_counter">0</span>6076 <span data-i18n="extension_token_counter">Tokens:</span> <span id="extension_floating_chara_token_counter">0</span>
6114 </div>6077 </div>
@@ -6140,7 +6103,7 @@
6140 </div>6103 </div>
6141 <div class="inline-drawer-content">6104 <div class="inline-drawer-content">
6142 <small data-i18n="Will be automatically added as the Author's Note for all new chats.">Will be automatically added as the Author's Note for all new chats.</small>6105 <small data-i18n="Will be automatically added as the Author's Note for all new chats.">Will be automatically added as the Author's Note for all new chats.</small>
6143 <textarea id="extension_floating_default" class="text_pole textarea_compact" rows="8" maxlength="50000" placeholder="Example:&#10;[Scenario: wacky adventures; Genre: romantic comedy; Style: verbose, creative]"></textarea>6106 <textarea id="extension_floating_default" class="text_pole textarea_compact" rows="8" placeholder="Example:&#10;[Scenario: wacky adventures; Genre: romantic comedy; Style: verbose, creative]"></textarea>
6144 <div class="extension_token_counter">6107 <div class="extension_token_counter">
6145 <span data-i18n="extension_token_counter">Tokens:</span> <span id="extension_floating_default_token_counter">0</span>6108 <span data-i18n="extension_token_counter">Tokens:</span> <span id="extension_floating_default_token_counter">0</span>
6146 </div>6109 </div>
@@ -6486,60 +6449,7 @@
6486 </a>6449 </a>
6487 </div>6450 </div>
6488 </div>6451 </div>
6489 <div id="export_format_popup" class="list-group">6452
6490 <div class="export_format list-group-item" data-format="png">PNG</div>
6491 <div class="export_format list-group-item" data-format="json">JSON</div>
6492 </div>
6493 <div id="zoomed_avatar_template" class="template_element">
6494 <div class="zoomed_avatar">
6495 <div class="panelControlBar flex-container">
6496 <div class="fa-fw fa-solid fa-grip drag-grabber"></div>
6497 <div class="fa-fw fa-solid fa-circle-xmark dragClose" id="closeZoom"></div>
6498 </div>
6499 <div class="zoomed_avatar_container">
6500 <img class="zoomed_avatar_img" src="" data-izoomify-url="" data-izoomify-magnify="1.8" data-izoomify-duration="300" alt="">
6501 </div>
6502 </div>
6503 </div>
6504 <template id="generic_draggable_template">
6505 <div class="draggable">
6506 <div class="dragTitle"></div>
6507 <div class="panelControlBar flex-container">
6508 <div class="fa-fw fa-solid fa-grip drag-grabber"></div>
6509 <div class="fa-fw fa-solid fa-circle-xmark dragClose"></div>
6510 </div>
6511 </div>
6512 </template>
6513 <div id="user_avatar_template" class="template_element">
6514 <div class="avatar-container">
6515 <div imgfile="" class="avatar">
6516 <img src="" alt="User Avatar">
6517 </div>
6518 <div class="flex-container wide100pLess70px character_select_container">
6519 <div class="wide100p character_name_block">
6520 <span class="ch_name flex1"></span>
6521 <div class="avatar-buttons">
6522 <button class="menu_button bind_user_name" title="Bind user name to that avatar" data-i18n="[title]Bind user name to that avatar">
6523 <i class="fa-fw fa-solid fa-user-edit"></i>
6524 </button>
6525 <button class="menu_button set_persona_image" title="Change persona image" data-i18n="[title]Change persona image">
6526 <i class="fa-fw fa-solid fa-image"></i>
6527 </button>
6528 <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.">
6529 <i class="fa-fw fa-solid fa-crown"></i>
6530 </button>
6531 <button class="menu_button duplicate_persona" title="Duplicate persona" data-i18n="[title]Duplicate persona">
6532 <i class="fa-fw fa-solid fa-clone"></i>
6533 </button>
6534 <button class="menu_button delete_avatar" title="Delete persona" data-i18n="[title]Delete persona">
6535 <i class="fa-fw fa-solid fa-trash-alt"></i>
6536 </button>
6537 </div>
6538 </div>
6539 <div class="ch_description"></div>
6540 </div>
6541 </div>
6542 </div>
6543 <!-- Script includes -->6453 <!-- Script includes -->
6544 <script src="lib/diff_match_patch.js"></script>6454 <script src="lib/diff_match_patch.js"></script>
6545 <script src="lib/object-hasown.js"></script>6455 <script src="lib/object-hasown.js"></script>
public/script.js+7 -2
@@ -452,7 +452,9 @@ export const event_types = {
452 // TODO: Naming convention is inconsistent with other events452 // TODO: Naming convention is inconsistent with other events
453 CHARACTER_DELETED: 'characterDeleted',453 CHARACTER_DELETED: 'characterDeleted',
454 CHARACTER_DUPLICATED: 'character_duplicated',454 CHARACTER_DUPLICATED: 'character_duplicated',
455 SMOOTH_STREAM_TOKEN_RECEIVED: 'smooth_stream_token_received',455 /** @deprecated The event is aliased to STREAM_TOKEN_RECEIVED. */
456 SMOOTH_STREAM_TOKEN_RECEIVED: 'stream_token_received',
457 STREAM_TOKEN_RECEIVED: 'stream_token_received',
456 FILE_ATTACHMENT_DELETED: 'file_attachment_deleted',458 FILE_ATTACHMENT_DELETED: 'file_attachment_deleted',
457 WORLDINFO_FORCE_ACTIVATE: 'worldinfo_force_activate',459 WORLDINFO_FORCE_ACTIVATE: 'worldinfo_force_activate',
458 OPEN_CHARACTER_LIBRARY: 'open_character_library',460 OPEN_CHARACTER_LIBRARY: 'open_character_library',
@@ -3120,6 +3122,7 @@ class StreamingProcessor {
3120 if (logprobs) {3122 if (logprobs) {
3121 this.messageLogprobs.push(...(Array.isArray(logprobs) ? logprobs : [logprobs]));3123 this.messageLogprobs.push(...(Array.isArray(logprobs) ? logprobs : [logprobs]));
3122 }3124 }
3125 await eventSource.emit(event_types.STREAM_TOKEN_RECEIVED, text);
3123 await sw.tick(() => this.onProgressStreaming(this.messageId, this.continueMessage + text));3126 await sw.tick(() => this.onProgressStreaming(this.messageId, this.continueMessage + text));
3124 }3127 }
3125 const seconds = (timestamps[timestamps.length - 1] - timestamps[0]) / 1000;3128 const seconds = (timestamps[timestamps.length - 1] - timestamps[0]) / 1000;
@@ -10136,7 +10139,7 @@ jQuery(async function () {
10136 }10139 }
10137 });10140 });
1013810141
10139 $(document).on('click', '.mes_edit_cancel', function () {10142 $(document).on('click', '.mes_edit_cancel', async function () {
10140 let text = chat[this_edit_mes_id]['mes'];10143 let text = chat[this_edit_mes_id]['mes'];
1014110144
10142 $(this).closest('.mes_block').find('.mes_text').empty();10145 $(this).closest('.mes_block').find('.mes_text').empty();
@@ -10154,6 +10157,8 @@ jQuery(async function () {
10154 ));10157 ));
10155 appendMediaToMessage(chat[this_edit_mes_id], $(this).closest('.mes'));10158 appendMediaToMessage(chat[this_edit_mes_id], $(this).closest('.mes'));
10156 addCopyToCodeBlocks($(this).closest('.mes'));10159 addCopyToCodeBlocks($(this).closest('.mes'));
10160
10161 await eventSource.emit(event_types.MESSAGE_UPDATED, this_edit_mes_id);
10157 this_edit_mes_id = undefined;10162 this_edit_mes_id = undefined;
10158 });10163 });
1015910164
public/scripts/RossAscends-mods.js+1 -1
@@ -296,7 +296,7 @@ export async function favsToHotswap() {
296296
297 //helpful instruction message if no characters are favorited297 //helpful instruction message if no characters are favorited
298 if (favs.length == 0) {298 if (favs.length == 0) {
299 container.html(`<small><span><i class="fa-solid fa-star"></i>${DOMPurify.sanitize(container.attr('no_favs'))}</span></small>`);299 container.html(`<small><span><i class="fa-solid fa-star"></i>&nbsp;${DOMPurify.sanitize(container.attr('no_favs'))}</span></small>`);
300 return;300 return;
301 }301 }
302302
public/scripts/extensions/memory/index.js+34 -12
@@ -15,6 +15,7 @@ import {
15 generateRaw,15 generateRaw,
16 getMaxContextSize,16 getMaxContextSize,
17 setExtensionPrompt,17 setExtensionPrompt,
18 streamingProcessor,
18} from '../../../script.js';19} from '../../../script.js';
19import { is_group_generating, selected_group } from '../../group-chats.js';20import { is_group_generating, selected_group } from '../../group-chats.js';
20import { loadMovingUIState } from '../../power-user.js';21import { loadMovingUIState } from '../../power-user.js';
@@ -408,8 +409,8 @@ async function onChatEvent() {
408 return;409 return;
409 }410 }
410411
411 // Generation is in progress, summary prevented412 // Streaming in-progress
412 if (is_send_press) {413 if (streamingProcessor && !streamingProcessor.isFinished) {
413 return;414 return;
414 }415 }
415416
@@ -446,15 +447,9 @@ async function onChatEvent() {
446 delete chat[chat.length - 1].extra.memory;447 delete chat[chat.length - 1].extra.memory;
447 }448 }
448449
449 try {450 summarizeChat(context)
450 await summarizeChat(context);451 .catch(console.error)
451 }452 .finally(saveLastValues);
452 catch (error) {
453 console.log(error);
454 }
455 finally {
456 saveLastValues();
457 }
458}453}
459454
460/**455/**
@@ -567,7 +562,7 @@ async function getSummaryPromptForNow(context, force) {
567 await waitUntilCondition(() => is_group_generating === false, 1000, 10);562 await waitUntilCondition(() => is_group_generating === false, 1000, 10);
568 }563 }
569 // Wait for the send button to be released564 // Wait for the send button to be released
570 waitUntilCondition(() => is_send_press === false, 30000, 100);565 await waitUntilCondition(() => is_send_press === false, 30000, 100);
571 } catch {566 } catch {
572 console.debug('Timeout waiting for is_send_press');567 console.debug('Timeout waiting for is_send_press');
573 return '';568 return '';
@@ -650,9 +645,16 @@ async function summarizeChatWebLLM(context, force) {
650 params.max_tokens = extension_settings.memory.overrideResponseLength;645 params.max_tokens = extension_settings.memory.overrideResponseLength;
651 }646 }
652647
648 try {
649 inApiCall = true;
653 const summary = await generateWebLlmChatPrompt(messages, params);650 const summary = await generateWebLlmChatPrompt(messages, params);
654 const newContext = getContext();651 const newContext = getContext();
655652
653 if (!summary) {
654 console.warn('Empty summary received');
655 return;
656 }
657
656 // something changed during summarization request658 // something changed during summarization request
657 if (newContext.groupId !== context.groupId ||659 if (newContext.groupId !== context.groupId ||
658 newContext.chatId !== context.chatId ||660 newContext.chatId !== context.chatId ||
@@ -663,6 +665,9 @@ async function summarizeChatWebLLM(context, force) {
663665
664 setMemoryContext(summary, true, lastUsedIndex);666 setMemoryContext(summary, true, lastUsedIndex);
665 return summary;667 return summary;
668 } finally {
669 inApiCall = false;
670 }
666}671}
667672
668async function summarizeChatMain(context, force, skipWIAN) {673async function summarizeChatMain(context, force, skipWIAN) {
@@ -677,12 +682,18 @@ async function summarizeChatMain(context, force, skipWIAN) {
677 let index = null;682 let index = null;
678683
679 if (prompt_builders.DEFAULT === extension_settings.memory.prompt_builder) {684 if (prompt_builders.DEFAULT === extension_settings.memory.prompt_builder) {
685 try {
686 inApiCall = true;
680 summary = await generateQuietPrompt(prompt, false, skipWIAN, '', '', extension_settings.memory.overrideResponseLength);687 summary = await generateQuietPrompt(prompt, false, skipWIAN, '', '', extension_settings.memory.overrideResponseLength);
688 } finally {
689 inApiCall = false;
690 }
681 }691 }
682692
683 if ([prompt_builders.RAW_BLOCKING, prompt_builders.RAW_NON_BLOCKING].includes(extension_settings.memory.prompt_builder)) {693 if ([prompt_builders.RAW_BLOCKING, prompt_builders.RAW_NON_BLOCKING].includes(extension_settings.memory.prompt_builder)) {
684 const lock = extension_settings.memory.prompt_builder === prompt_builders.RAW_BLOCKING;694 const lock = extension_settings.memory.prompt_builder === prompt_builders.RAW_BLOCKING;
685 try {695 try {
696 inApiCall = true;
686 if (lock) {697 if (lock) {
687 deactivateSendButtons();698 deactivateSendButtons();
688 }699 }
@@ -700,12 +711,18 @@ async function summarizeChatMain(context, force, skipWIAN) {
700 summary = await generateRaw(rawPrompt, '', false, false, prompt, extension_settings.memory.overrideResponseLength);711 summary = await generateRaw(rawPrompt, '', false, false, prompt, extension_settings.memory.overrideResponseLength);
701 index = lastUsedIndex;712 index = lastUsedIndex;
702 } finally {713 } finally {
714 inApiCall = false;
703 if (lock) {715 if (lock) {
704 activateSendButtons();716 activateSendButtons();
705 }717 }
706 }718 }
707 }719 }
708720
721 if (!summary) {
722 console.warn('Empty summary received');
723 return;
724 }
725
709 const newContext = getContext();726 const newContext = getContext();
710727
711 // something changed during summarization request728 // something changed during summarization request
@@ -840,6 +857,11 @@ async function summarizeChatExtras(context) {
840 const summary = await callExtrasSummarizeAPI(resultingString);857 const summary = await callExtrasSummarizeAPI(resultingString);
841 const newContext = getContext();858 const newContext = getContext();
842859
860 if (!summary) {
861 console.warn('Empty summary received');
862 return;
863 }
864
843 // something changed during summarization request865 // something changed during summarization request
844 if (newContext.groupId !== context.groupId866 if (newContext.groupId !== context.groupId
845 || newContext.chatId !== context.chatId867 || newContext.chatId !== context.chatId
public/scripts/instruct-mode.js+37 -10
@@ -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, resetScrollHeight } from './utils.js';10import { regexFromString } from './utils.js';
1111
12/**12/**
13 * @type {any[]} Instruct mode presets.13 * @type {any[]} Instruct mode presets.
@@ -78,28 +78,29 @@ function migrateInstructModeSettings(settings) {
78 * Loads instruct mode settings from the given data object.78 * Loads instruct mode settings from the given data object.
79 * @param {object} data Settings data object.79 * @param {object} data Settings data object.
80 */80 */
81export function loadInstructMode(data) {81export async function loadInstructMode(data) {
82 if (data.instruct !== undefined) {82 if (data.instruct !== undefined) {
83 instruct_presets = data.instruct;83 instruct_presets = data.instruct;
84 }84 }
8585
86 migrateInstructModeSettings(power_user.instruct);86 migrateInstructModeSettings(power_user.instruct);
8787
88 $('#instruct_enabled').parent().find('i').toggleClass('toggleEnabled', !!power_user.instruct.enabled);
89 $('#instructSettingsBlock, #InstructSequencesColumn').toggleClass('disabled', !power_user.instruct.enabled);
90 $('#instruct_bind_to_context').parent().find('i').toggleClass('toggleEnabled', !!power_user.instruct.bind_to_context);
91
88 controls.forEach(control => {92 controls.forEach(control => {
89 const $element = $(`#${control.id}`);93 const $element = $(`#${control.id}`);
9094
91 if (control.isCheckbox) {95 if (control.isCheckbox) {
92 $element.prop('checked', power_user.instruct[control.property]);96 $element.prop('checked', power_user.instruct[control.property]);
93 } else {97 } else {
94 $element.val(power_user.instruct[control.property]);98 $element[0].innerText = (power_user.instruct[control.property]);
95 }99 }
96100
97 $element.on('input', async function () {101 $element.on('input', async function () {
98 power_user.instruct[control.property] = control.isCheckbox ? !!$(this).prop('checked') : $(this).val();102 power_user.instruct[control.property] = control.isCheckbox ? !!$(this).prop('checked') : $(this)[0].innerText;
99 saveSettingsDebounced();103 saveSettingsDebounced();
100 if (!control.isCheckbox) {
101 await resetScrollHeight($element);
102 }
103 });104 });
104105
105 if (control.trigger) {106 if (control.trigger) {
@@ -107,6 +108,9 @@ export function loadInstructMode(data) {
107 }108 }
108 });109 });
109110
111 $('#instruct_system_sequence').css('height', 'auto');
112 $('#instruct_system_suffix').css('height', 'auto');
113
110 instruct_presets.forEach((preset) => {114 instruct_presets.forEach((preset) => {
111 const name = preset.name;115 const name = preset.name;
112 const option = document.createElement('option');116 const option = document.createElement('option');
@@ -604,11 +608,29 @@ jQuery(() => {
604608
605 $('#instruct_system_same_as_user').on('input', function () {609 $('#instruct_system_same_as_user').on('input', function () {
606 const state = !!$(this).prop('checked');610 const state = !!$(this).prop('checked');
607 $('#instruct_system_sequence').prop('disabled', state);611 if (state) {
608 $('#instruct_system_suffix').prop('disabled', state);612 $('#instruct_system_sequence_block').addClass('disabled');
613 $('#instruct_system_suffix_block').addClass('disabled');
614 $('#instruct_system_sequence').css('height', 'auto');
615 $('#instruct_system_suffix').css('height', 'auto');
616 $('#instruct_system_sequence').prop('contenteditable', false);
617 $('#instruct_system_suffix').prop('contenteditable', false);
618 } else {
619 $('#instruct_system_sequence_block').removeClass('disabled');
620 $('#instruct_system_suffix_block').removeClass('disabled');
621 $('#instruct_system_sequence').css('height', '');
622 $('#instruct_system_suffix').css('height', '');
623 $('#instruct_system_sequence').prop('contenteditable', true);
624 $('#instruct_system_suffix').prop('contenteditable', true);
625 }
626
609 });627 });
610628
611 $('#instruct_enabled').on('change', function () {629 $('#instruct_enabled').on('change', function () {
630 //color toggle for the main switch
631 $('#instruct_enabled').parent().find('i').toggleClass('toggleEnabled', !!power_user.instruct.enabled);
632 $('#instructSettingsBlock, #InstructSequencesColumn').toggleClass('disabled', !power_user.instruct.enabled);
633
612 if (!power_user.instruct.bind_to_context) {634 if (!power_user.instruct.bind_to_context) {
613 return;635 return;
614 }636 }
@@ -622,6 +644,10 @@ jQuery(() => {
622 }644 }
623 });645 });
624646
647 $('#instruct_bind_to_context').on('change', function () {
648 $('#instruct_bind_to_context').parent().find('i').toggleClass('toggleEnabled', !!power_user.instruct.bind_to_context);
649 });
650
625 $('#instruct_presets').on('change', function () {651 $('#instruct_presets').on('change', function () {
626 const name = String($(this).find(':selected').val());652 const name = String($(this).find(':selected').val());
627 const preset = instruct_presets.find(x => x.name === name);653 const preset = instruct_presets.find(x => x.name === name);
@@ -641,7 +667,8 @@ jQuery(() => {
641 if (control.isCheckbox) {667 if (control.isCheckbox) {
642 $element.prop('checked', power_user.instruct[control.property]).trigger('input');668 $element.prop('checked', power_user.instruct[control.property]).trigger('input');
643 } else {669 } else {
644 $element.val(power_user.instruct[control.property]).trigger('input');670 $element[0].innerText = (power_user.instruct[control.property]);
671 $element.trigger('input');
645 }672 }
646 }673 }
647 });674 });
public/scripts/power-user.js+12 -15
@@ -1469,7 +1469,7 @@ async function loadPowerUserSettings(settings, data) {
1469 $('#auto_swipe_minimum_length').val(power_user.auto_swipe_minimum_length);1469 $('#auto_swipe_minimum_length').val(power_user.auto_swipe_minimum_length);
1470 $('#auto_swipe_blacklist').val(power_user.auto_swipe_blacklist.join(', '));1470 $('#auto_swipe_blacklist').val(power_user.auto_swipe_blacklist.join(', '));
1471 $('#auto_swipe_blacklist_threshold').val(power_user.auto_swipe_blacklist_threshold);1471 $('#auto_swipe_blacklist_threshold').val(power_user.auto_swipe_blacklist_threshold);
1472 $('#custom_stopping_strings').val(power_user.custom_stopping_strings);1472 $('#custom_stopping_strings').text(power_user.custom_stopping_strings);
1473 $('#custom_stopping_strings_macro').prop('checked', power_user.custom_stopping_strings_macro);1473 $('#custom_stopping_strings_macro').prop('checked', power_user.custom_stopping_strings_macro);
1474 $('#fuzzy_search_checkbox').prop('checked', power_user.fuzzy_search);1474 $('#fuzzy_search_checkbox').prop('checked', power_user.fuzzy_search);
1475 $('#persona_show_notifications').prop('checked', power_user.persona_show_notifications);1475 $('#persona_show_notifications').prop('checked', power_user.persona_show_notifications);
@@ -1499,7 +1499,7 @@ async function loadPowerUserSettings(settings, data) {
1499 $('#waifuMode').prop('checked', power_user.waifuMode);1499 $('#waifuMode').prop('checked', power_user.waifuMode);
1500 $('#movingUImode').prop('checked', power_user.movingUI);1500 $('#movingUImode').prop('checked', power_user.movingUI);
1501 $('#noShadowsmode').prop('checked', power_user.noShadows);1501 $('#noShadowsmode').prop('checked', power_user.noShadows);
1502 $('#start_reply_with').val(power_user.user_prompt_bias);1502 $('#start_reply_with').text(power_user.user_prompt_bias);
1503 $('#chat-show-reply-prefix-checkbox').prop('checked', power_user.show_user_prompt_bias);1503 $('#chat-show-reply-prefix-checkbox').prop('checked', power_user.show_user_prompt_bias);
1504 $('#auto_continue_enabled').prop('checked', power_user.auto_continue.enabled);1504 $('#auto_continue_enabled').prop('checked', power_user.auto_continue.enabled);
1505 $('#auto_continue_allow_chat_completions').prop('checked', power_user.auto_continue.allow_chat_completions);1505 $('#auto_continue_allow_chat_completions').prop('checked', power_user.auto_continue.allow_chat_completions);
@@ -1600,7 +1600,7 @@ async function loadPowerUserSettings(settings, data) {
1600 switchReducedMotion();1600 switchReducedMotion();
1601 switchCompactInputArea();1601 switchCompactInputArea();
1602 reloadMarkdownProcessor(power_user.render_formulas);1602 reloadMarkdownProcessor(power_user.render_formulas);
1603 loadInstructMode(data);1603 await loadInstructMode(data);
1604 await loadContextSettings();1604 await loadContextSettings();
1605 loadMaxContextUnlocked();1605 loadMaxContextUnlocked();
1606 switchWaifuMode();1606 switchWaifuMode();
@@ -1747,13 +1747,14 @@ async function loadContextSettings() {
1747 if (control.isCheckbox) {1747 if (control.isCheckbox) {
1748 $element.prop('checked', power_user.context[control.property]);1748 $element.prop('checked', power_user.context[control.property]);
1749 } else {1749 } else {
1750 $element.val(power_user.context[control.property]);1750 $element[0].innerText = power_user.context[control.property];
1751 }1751 }
1752 console.log(`Setting ${$element.prop('id')} to ${power_user.context[control.property]}`);
17521753
1753 // If the setting already exists, no need to duplicate it1754 // If the setting already exists, no need to duplicate it
1754 // TODO: Maybe check the power_user object for the setting instead of a flag?1755 // TODO: Maybe check the power_user object for the setting instead of a flag?
1755 $element.on('input', async function () {1756 $element.on('input keyup', async function () {
1756 const value = control.isCheckbox ? !!$(this).prop('checked') : $(this).val();1757 const value = control.isCheckbox ? !!$(this).prop('checked') : $(this)[0].innerText;
1757 if (control.isGlobalSetting) {1758 if (control.isGlobalSetting) {
1758 power_user[control.property] = value;1759 power_user[control.property] = value;
1759 } else {1760 } else {
@@ -1761,9 +1762,6 @@ async function loadContextSettings() {
1761 }1762 }
17621763
1763 saveSettingsDebounced();1764 saveSettingsDebounced();
1764 if (!control.isCheckbox) {
1765 await resetScrollHeight($element);
1766 }
1767 });1765 });
1768 });1766 });
17691767
@@ -1777,7 +1775,7 @@ async function loadContextSettings() {
1777 });1775 });
17781776
1779 $('#context_presets').on('change', function () {1777 $('#context_presets').on('change', function () {
1780 const name = String($(this).find(':selected').val());1778 const name = String($(this).find(':selected').text());
1781 const preset = context_presets.find(x => x.name === name);1779 const preset = context_presets.find(x => x.name === name);
17821780
1783 if (!preset) {1781 if (!preset) {
@@ -1802,9 +1800,8 @@ async function loadContextSettings() {
1802 .prop('checked', control.isGlobalSetting ? power_user[control.property] : power_user.context[control.property])1800 .prop('checked', control.isGlobalSetting ? power_user[control.property] : power_user.context[control.property])
1803 .trigger('input');1801 .trigger('input');
1804 } else {1802 } else {
1805 $element1803 $element[0].innerText = (control.isGlobalSetting ? power_user[control.property] : power_user.context[control.property])
1806 .val(control.isGlobalSetting ? power_user[control.property] : power_user.context[control.property])1804 $element.trigger('input');
1807 .trigger('input');
1808 }1805 }
1809 }1806 }
1810 });1807 });
@@ -3106,7 +3103,7 @@ $(document).ready(() => {
3106 });3103 });
31073104
3108 $('#start_reply_with').on('input', function () {3105 $('#start_reply_with').on('input', function () {
3109 power_user.user_prompt_bias = String($(this).val());3106 power_user.user_prompt_bias = String($(this)[0].innerText);
3110 saveSettingsDebounced();3107 saveSettingsDebounced();
3111 });3108 });
31123109
@@ -3638,7 +3635,7 @@ $(document).ready(() => {
3638 });3635 });
36393636
3640 $('#custom_stopping_strings').on('input', function () {3637 $('#custom_stopping_strings').on('input', function () {
3641 power_user.custom_stopping_strings = String($(this).val());3638 power_user.custom_stopping_strings = String($(this)[0].innerText).trim();
3642 saveSettingsDebounced();3639 saveSettingsDebounced();
3643 });3640 });
36443641
public/scripts/slash-commands/SlashCommandCommonEnumsProvider.js+17 -0
@@ -36,6 +36,8 @@ export const enumIcons = {
3636
37 true: '✔️',37 true: '✔️',
38 false: '❌',38 false: '❌',
39 null: '🚫',
40 undefined: '❓',
3941
40 // Value types42 // Value types
41 boolean: '🔲',43 boolean: '🔲',
@@ -230,4 +232,19 @@ export const commonEnumProviders = {
230 enumTypes.enum, '💉');232 enumTypes.enum, '💉');
231 });233 });
232 },234 },
235
236 /**
237 * Gets somewhat recognizable STscript types.
238 *
239 * @returns {SlashCommandEnumValue[]}
240 */
241 types: () => [
242 new SlashCommandEnumValue('string', null, enumTypes.type, enumIcons.string),
243 new SlashCommandEnumValue('number', null, enumTypes.type, enumIcons.number),
244 new SlashCommandEnumValue('boolean', null, enumTypes.type, enumIcons.boolean),
245 new SlashCommandEnumValue('array', null, enumTypes.type, enumIcons.array),
246 new SlashCommandEnumValue('object', null, enumTypes.type, enumIcons.dictionary),
247 new SlashCommandEnumValue('null', null, enumTypes.type, enumIcons.null),
248 new SlashCommandEnumValue('undefined', null, enumTypes.type, enumIcons.undefined),
249 ],
233};250};
public/scripts/slash-commands/SlashCommandScope.js+6 -5
@@ -1,4 +1,5 @@
1import { SlashCommandClosure } from './SlashCommandClosure.js';1import { SlashCommandClosure } from './SlashCommandClosure.js';
2import { convertValueType } from '../utils.js';
23
3export class SlashCommandScope {4export class SlashCommandScope {
4 /**@type {string[]}*/ variableNames = [];5 /**@type {string[]}*/ variableNames = [];
@@ -55,7 +56,7 @@ export class SlashCommandScope {
55 if (this.existsVariableInScope(key)) throw new SlashCommandScopeVariableExistsError(`Variable named "${key}" already exists.`);56 if (this.existsVariableInScope(key)) throw new SlashCommandScopeVariableExistsError(`Variable named "${key}" already exists.`);
56 this.variables[key] = value;57 this.variables[key] = value;
57 }58 }
58 setVariable(key, value, index = null) {59 setVariable(key, value, index = null, type = null) {
59 if (this.existsVariableInScope(key)) {60 if (this.existsVariableInScope(key)) {
60 if (index !== null && index !== undefined) {61 if (index !== null && index !== undefined) {
61 let v = this.variables[key];62 let v = this.variables[key];
@@ -63,13 +64,13 @@ export class SlashCommandScope {
63 v = JSON.parse(v);64 v = JSON.parse(v);
64 const numIndex = Number(index);65 const numIndex = Number(index);
65 if (Number.isNaN(numIndex)) {66 if (Number.isNaN(numIndex)) {
66 v[index] = value;67 v[index] = convertValueType(value, type);
67 } else {68 } else {
68 v[numIndex] = value;69 v[numIndex] = convertValueType(value, type);
69 }70 }
70 v = JSON.stringify(v);71 v = JSON.stringify(v);
71 } catch {72 } catch {
72 v[index] = value;73 v[index] = convertValueType(value, type);
73 }74 }
74 this.variables[key] = v;75 this.variables[key] = v;
75 } else {76 } else {
@@ -78,7 +79,7 @@ export class SlashCommandScope {
78 return value;79 return value;
79 }80 }
80 if (this.parent) {81 if (this.parent) {
81 return this.parent.setVariable(key, value, index);82 return this.parent.setVariable(key, value, index, type);
82 }83 }
83 throw new SlashCommandScopeVariableNotFoundError(`No such variable: "${key}"`);84 throw new SlashCommandScopeVariableNotFoundError(`No such variable: "${key}"`);
84 }85 }
public/scripts/sse-stream.js+0 -2
@@ -1,4 +1,3 @@
1import { eventSource, event_types } from '../script.js';
2import { power_user } from './power-user.js';1import { power_user } from './power-user.js';
3import { delay } from './utils.js';2import { delay } from './utils.js';
43
@@ -268,7 +267,6 @@ export class SmoothEventSourceStream extends EventSourceStream {
268 hasFocus && await delay(getDelay(lastStr));267 hasFocus && await delay(getDelay(lastStr));
269 controller.enqueue(new MessageEvent(event.type, { data: JSON.stringify(parsed.data) }));268 controller.enqueue(new MessageEvent(event.type, { data: JSON.stringify(parsed.data) }));
270 lastStr = parsed.chunk;269 lastStr = parsed.chunk;
271 hasFocus && await eventSource.emit(event_types.SMOOTH_STREAM_TOKEN_RECEIVED, parsed.chunk);
272 }270 }
273 } catch (error) {271 } catch (error) {
274 console.debug('Smooth Streaming parsing error', error);272 console.debug('Smooth Streaming parsing error', error);
public/scripts/utils.js+69 -0
@@ -4,6 +4,7 @@ import { isMobile } from './RossAscends-mods.js';
4import { collapseNewlines } from './power-user.js';4import { collapseNewlines } from './power-user.js';
5import { debounce_timeout } from './constants.js';5import { debounce_timeout } from './constants.js';
6import { Popup, POPUP_RESULT, POPUP_TYPE } from './popup.js';6import { Popup, POPUP_RESULT, POPUP_TYPE } from './popup.js';
7import { SlashCommandClosure } from './slash-commands/SlashCommandClosure.js';
78
8/**9/**
9 * Pagination status string template.10 * Pagination status string template.
@@ -34,6 +35,74 @@ export function isValidUrl(value) {
34}35}
3536
36/**37/**
38 * Converts string to a value of a given type. Includes pythonista-friendly aliases.
39 * @param {string|SlashCommandClosure} value String value
40 * @param {string} type Type to convert to
41 * @returns {any} Converted value
42 */
43export function convertValueType(value, type) {
44 if (value instanceof SlashCommandClosure || typeof type !== 'string') {
45 return value;
46 }
47
48 switch (type.trim().toLowerCase()) {
49 case 'string':
50 case 'str':
51 return String(value);
52
53 case 'null':
54 return null;
55
56 case 'undefined':
57 case 'none':
58 return undefined;
59
60 case 'number':
61 return Number(value);
62
63 case 'int':
64 return parseInt(value, 10);
65
66 case 'float':
67 return parseFloat(value);
68
69 case 'boolean':
70 case 'bool':
71 return isTrueBoolean(value);
72
73 case 'list':
74 case 'array':
75 try {
76 const parsedArray = JSON.parse(value);
77 if (Array.isArray(parsedArray)) {
78 return parsedArray;
79 }
80 // The value is not an array
81 return [];
82 } catch {
83 return [];
84 }
85
86 case 'object':
87 case 'dict':
88 case 'dictionary':
89 try {
90 const parsedObject = JSON.parse(value);
91 if (typeof parsedObject === 'object') {
92 return parsedObject;
93 }
94 // The value is not an object
95 return {};
96 } catch {
97 return {};
98 }
99
100 default:
101 return value;
102 }
103}
104
105/**
37 * Parses ranges like 10-20 or 10.106 * Parses ranges like 10-20 or 10.
38 * Range is inclusive. Start must be less than end.107 * Range is inclusive. Start must be less than end.
39 * Returns null if invalid.108 * Returns null if invalid.
public/scripts/variables.js+49 -8
@@ -11,7 +11,7 @@ import { commonEnumProviders, enumIcons } from './slash-commands/SlashCommandCom
11import { SlashCommandEnumValue, enumTypes } from './slash-commands/SlashCommandEnumValue.js';11import { SlashCommandEnumValue, enumTypes } from './slash-commands/SlashCommandEnumValue.js';
12import { PARSER_FLAG, SlashCommandParser } from './slash-commands/SlashCommandParser.js';12import { PARSER_FLAG, SlashCommandParser } from './slash-commands/SlashCommandParser.js';
13import { SlashCommandScope } from './slash-commands/SlashCommandScope.js';13import { SlashCommandScope } from './slash-commands/SlashCommandScope.js';
14import { isFalseBoolean } from './utils.js';14import { isFalseBoolean, convertValueType } from './utils.js';
1515
16/** @typedef {import('./slash-commands/SlashCommandParser.js').NamedArguments} NamedArguments */16/** @typedef {import('./slash-commands/SlashCommandParser.js').NamedArguments} NamedArguments */
17/** @typedef {import('./slash-commands/SlashCommand.js').UnnamedArguments} UnnamedArguments */17/** @typedef {import('./slash-commands/SlashCommand.js').UnnamedArguments} UnnamedArguments */
@@ -57,12 +57,12 @@ function setLocalVariable(name, value, args = {}) {
57 if (localVariable === null) {57 if (localVariable === null) {
58 localVariable = {};58 localVariable = {};
59 }59 }
60 localVariable[args.index] = value;60 localVariable[args.index] = convertValueType(value, args.as);
61 } else {61 } else {
62 if (localVariable === null) {62 if (localVariable === null) {
63 localVariable = [];63 localVariable = [];
64 }64 }
65 localVariable[numIndex] = value;65 localVariable[numIndex] = convertValueType(value, args.as);
66 }66 }
67 chat_metadata.variables[name] = JSON.stringify(localVariable);67 chat_metadata.variables[name] = JSON.stringify(localVariable);
68 } catch {68 } catch {
@@ -106,12 +106,12 @@ function setGlobalVariable(name, value, args = {}) {
106 if (globalVariable === null) {106 if (globalVariable === null) {
107 globalVariable = {};107 globalVariable = {};
108 }108 }
109 globalVariable[args.index] = value;109 globalVariable[args.index] = convertValueType(value, args.as);
110 } else {110 } else {
111 if (globalVariable === null) {111 if (globalVariable === null) {
112 globalVariable = [];112 globalVariable = [];
113 }113 }
114 globalVariable[numIndex] = value;114 globalVariable[numIndex] = convertValueType(value, args.as);
115 }115 }
116 extension_settings.variables.global[name] = JSON.stringify(globalVariable);116 extension_settings.variables.global[name] = JSON.stringify(globalVariable);
117 } catch {117 } catch {
@@ -667,6 +667,7 @@ function parseNumericSeries(value, scope = null) {
667}667}
668668
669function performOperation(value, operation, singleOperand = false, scope = null) {669function performOperation(value, operation, singleOperand = false, scope = null) {
670 function getResult() {
670 if (!value) {671 if (!value) {
671 return 0;672 return 0;
672 }673 }
@@ -686,6 +687,10 @@ function performOperation(value, operation, singleOperand = false, scope = null)
686 return result;687 return result;
687 }688 }
688689
690 const result = getResult();
691 return String(result);
692}
693
689function addValuesCallback(args, value) {694function addValuesCallback(args, value) {
690 return performOperation(value, (array) => array.reduce((a, b) => a + b, 0), false, args._scope);695 return performOperation(value, (array) => array.reduce((a, b) => a + b, 0), false, args._scope);
691}696}
@@ -836,7 +841,7 @@ function varCallback(args, value) {
836 if (typeof key != 'string') throw new Error('Key must be a string');841 if (typeof key != 'string') throw new Error('Key must be a string');
837 if (args._hasUnnamedArgument) {842 if (args._hasUnnamedArgument) {
838 const val = typeof value[0] == 'string' ? value.join(' ') : value[0];843 const val = typeof value[0] == 'string' ? value.join(' ') : value[0];
839 args._scope.setVariable(key, val, args.index);844 args._scope.setVariable(key, val, args.index, args.as);
840 return val;845 return val;
841 } else {846 } else {
842 return args._scope.getVariable(key, args.index);847 return args._scope.getVariable(key, args.index);
@@ -846,7 +851,7 @@ function varCallback(args, value) {
846 if (typeof key != 'string') throw new Error('Key must be a string');851 if (typeof key != 'string') throw new Error('Key must be a string');
847 if (value.length > 0) {852 if (value.length > 0) {
848 const val = typeof value[0] == 'string' ? value.join(' ') : value[0];853 const val = typeof value[0] == 'string' ? value.join(' ') : value[0];
849 args._scope.setVariable(key, val, args.index);854 args._scope.setVariable(key, val, args.index, args.as);
850 return val;855 return val;
851 } else {856 } else {
852 return args._scope.getVariable(key, args.index);857 return args._scope.getVariable(key, args.index);
@@ -901,6 +906,14 @@ export function registerVariableCommands() {
901 new SlashCommandNamedArgument(906 new SlashCommandNamedArgument(
902 'index', 'list index', [ARGUMENT_TYPE.NUMBER, ARGUMENT_TYPE.STRING], false,907 'index', 'list index', [ARGUMENT_TYPE.NUMBER, ARGUMENT_TYPE.STRING], false,
903 ),908 ),
909 SlashCommandNamedArgument.fromProps({
910 name: 'as',
911 description: 'change the type of the value when used with index',
912 forceEnum: true,
913 enumProvider: commonEnumProviders.types,
914 isRequired: false,
915 defaultValue: 'string',
916 }),
904 ],917 ],
905 unnamedArgumentList: [918 unnamedArgumentList: [
906 new SlashCommandArgument(919 new SlashCommandArgument(
@@ -910,6 +923,7 @@ export function registerVariableCommands() {
910 helpString: `923 helpString: `
911 <div>924 <div>
912 Set a local variable value and pass it down the pipe. The <code>index</code> argument is optional.925 Set a local variable value and pass it down the pipe. The <code>index</code> argument is optional.
926 To convert the value to a specific JSON type when using <code>index</code>, use the <code>as</code> argument.
913 </div>927 </div>
914 <div>928 <div>
915 <strong>Example:</strong>929 <strong>Example:</strong>
@@ -917,6 +931,9 @@ export function registerVariableCommands() {
917 <li>931 <li>
918 <pre><code class="language-stscript">/setvar key=color green</code></pre>932 <pre><code class="language-stscript">/setvar key=color green</code></pre>
919 </li>933 </li>
934 <li>
935 <pre><code class="language-stscript">/setvar key=ages index=John as=number 21</code></pre>
936 </li>
920 </ul>937 </ul>
921 </div>938 </div>
922 `,939 `,
@@ -1015,6 +1032,14 @@ export function registerVariableCommands() {
1015 new SlashCommandNamedArgument(1032 new SlashCommandNamedArgument(
1016 'index', 'list index', [ARGUMENT_TYPE.NUMBER, ARGUMENT_TYPE.STRING], false,1033 'index', 'list index', [ARGUMENT_TYPE.NUMBER, ARGUMENT_TYPE.STRING], false,
1017 ),1034 ),
1035 SlashCommandNamedArgument.fromProps({
1036 name: 'as',
1037 description: 'change the type of the value when used with index',
1038 forceEnum: true,
1039 enumProvider: commonEnumProviders.types,
1040 isRequired: false,
1041 defaultValue: 'string',
1042 }),
1018 ],1043 ],
1019 unnamedArgumentList: [1044 unnamedArgumentList: [
1020 new SlashCommandArgument(1045 new SlashCommandArgument(
@@ -1024,6 +1049,7 @@ export function registerVariableCommands() {
1024 helpString: `1049 helpString: `
1025 <div>1050 <div>
1026 Set a global variable value and pass it down the pipe. The <code>index</code> argument is optional.1051 Set a global variable value and pass it down the pipe. The <code>index</code> argument is optional.
1052 To convert the value to a specific JSON type when using <code>index</code>, use the <code>as</code> argument.
1027 </div>1053 </div>
1028 <div>1054 <div>
1029 <strong>Example:</strong>1055 <strong>Example:</strong>
@@ -1031,6 +1057,9 @@ export function registerVariableCommands() {
1031 <li>1057 <li>
1032 <pre><code class="language-stscript">/setglobalvar key=color green</code></pre>1058 <pre><code class="language-stscript">/setglobalvar key=color green</code></pre>
1033 </li>1059 </li>
1060 <li>
1061 <pre><code class="language-stscript">/setglobalvar key=ages index=John as=number 21</code></pre>
1062 </li>
1034 </ul>1063 </ul>
1035 </div>1064 </div>
1036 `,1065 `,
@@ -2030,6 +2059,14 @@ export function registerVariableCommands() {
2030 false, // isRequired2059 false, // isRequired
2031 false, // acceptsMultiple2060 false, // acceptsMultiple
2032 ),2061 ),
2062 SlashCommandNamedArgument.fromProps({
2063 name: 'as',
2064 description: 'change the type of the value when used with index',
2065 forceEnum: true,
2066 enumProvider: commonEnumProviders.types,
2067 isRequired: false,
2068 defaultValue: 'string',
2069 }),
2033 ],2070 ],
2034 unnamedArgumentList: [2071 unnamedArgumentList: [
2035 SlashCommandArgument.fromProps({2072 SlashCommandArgument.fromProps({
@@ -2049,7 +2086,8 @@ export function registerVariableCommands() {
2049 splitUnnamedArgumentCount: 1,2086 splitUnnamedArgumentCount: 1,
2050 helpString: `2087 helpString: `
2051 <div>2088 <div>
2052 Get or set a variable.2089 Get or set a variable. Use <code>index</code> to access elements of a JSON-serialized list or dictionary.
2090 To convert the value to a specific JSON type when using with <code>index</code>, use the <code>as</code> argument.
2053 </div>2091 </div>
2054 <div>2092 <div>
2055 <strong>Examples:</strong>2093 <strong>Examples:</strong>
@@ -2060,6 +2098,9 @@ export function registerVariableCommands() {
2060 <li>2098 <li>
2061 <pre><code class="language-stscript">/let x foo | /var key=x foo bar | /var x | /echo</code></pre>2099 <pre><code class="language-stscript">/let x foo | /var key=x foo bar | /var x | /echo</code></pre>
2062 </li>2100 </li>
2101 <li>
2102 <pre><code class="language-stscript">/let x {} | /var index=cool as=number x 1337 | /echo {{var::x}}</code></pre>
2103 </li>
2063 </ul>2104 </ul>
2064 </div>2105 </div>
2065 `,2106 `,
public/style.css+20 -3
@@ -1602,6 +1602,7 @@ body[data-stscript-style] .hljs.language-stscript {
1602 .hljs-pipe {1602 .hljs-pipe {
1603 color: var(--ac-style-color-punctuation);1603 color: var(--ac-style-color-punctuation);
1604 }1604 }
1605
1605 .hljs-pipebreak {1606 .hljs-pipebreak {
1606 color: var(--ac-style-color-type);1607 color: var(--ac-style-color-type);
1607 }1608 }
@@ -1695,6 +1696,7 @@ body[data-stscript-style] .hljs.language-stscript {
1695 background-color: var(--ac-color-selectedBackground);1696 background-color: var(--ac-color-selectedBackground);
1696 color: var(--ac-color-selectedText);1697 color: var(--ac-color-selectedText);
1697 }1698 }
1699
1698 &.selected.not-selectable>* {1700 &.selected.not-selectable>* {
1699 background-color: var(--ac-color-notSelectableBackground);1701 background-color: var(--ac-color-notSelectableBackground);
1700 color: var(--ac-color-notSelectableText);1702 color: var(--ac-color-notSelectableText);
@@ -1780,7 +1782,9 @@ body[data-stscript-style] .hljs.language-stscript {
1780 display: flex;1782 display: flex;
1781 gap: 0.5em;1783 gap: 0.5em;
1782 }1784 }
1783 > .head > .name, > .name {1785
1786 >.head>.name,
1787 >.name {
1784 flex: 1 1 auto;1788 flex: 1 1 auto;
1785 font-weight: bold;1789 font-weight: bold;
1786 color: var(--ac-color-text);1790 color: var(--ac-color-text);
@@ -1790,20 +1794,25 @@ body[data-stscript-style] .hljs.language-stscript {
1790 text-decoration: 1px dotted underline;1794 text-decoration: 1px dotted underline;
1791 }1795 }
1792 }1796 }
1797
1793 >.head>.source {1798 >.head>.source {
1794 padding: 0 0.5em;1799 padding: 0 0.5em;
1795 cursor: help;1800 cursor: help;
1796 display: flex;1801 display: flex;
1797 align-items: center;1802 align-items: center;
1798 gap: 0.5em;1803 gap: 0.5em;
1804
1799 &.isThirdParty.isExtension {1805 &.isThirdParty.isExtension {
1800 color: #F89406;1806 color: #F89406;
1801 }1807 }
1808
1802 &.isCore {1809 &.isCore {
1803 color: transparent;1810 color: transparent;
1811
1804 &.isExtension {1812 &.isExtension {
1805 color: #51A351;1813 color: #51A351;
1806 }1814 }
1815
1807 &:after {1816 &:after {
1808 content: '';1817 content: '';
1809 order: -1;1818 order: -1;
@@ -2605,7 +2614,8 @@ select option:not(:checked) {
2605 color: var(--golden) !important;2614 color: var(--golden) !important;
2606}2615}
26072616
2608.world_set {2617.world_set,
2618.toggleEnabled {
2609 color: var(--active) !important;2619 color: var(--active) !important;
2610}2620}
26112621
@@ -5398,6 +5408,7 @@ body:not(.movingUI) .drawer-content.maximized {
5398.popup:has(.faPicker) {5408.popup:has(.faPicker) {
5399 /* Fix height for fa picker popup, otherwise search is making it resize weirdly */5409 /* Fix height for fa picker popup, otherwise search is making it resize weirdly */
5400 height: 70%;5410 height: 70%;
5411
5401 .popup-content {5412 .popup-content {
5402 display: flex;5413 display: flex;
5403 flex-direction: column;5414 flex-direction: column;
@@ -5407,7 +5418,8 @@ body:not(.movingUI) .drawer-content.maximized {
5407.faPicker-container {5418.faPicker-container {
5408 display: flex;5419 display: flex;
5409 flex-direction: column;5420 flex-direction: column;
5410 overflow: hidden;;5421 overflow: hidden;
5422 ;
5411}5423}
54125424
5413.faQuery-container {5425.faQuery-container {
@@ -5429,6 +5441,7 @@ body:not(.movingUI) .drawer-content.maximized {
5429 padding: 0.25em;5441 padding: 0.25em;
5430 width: unset;5442 width: unset;
5431 box-sizing: content-box;5443 box-sizing: content-box;
5444
5432 &.hidden {5445 &.hidden {
5433 display: none;5446 display: none;
5434 }5447 }
@@ -5440,3 +5453,7 @@ body:not(.movingUI) .drawer-content.maximized {
5440 color: var(--SmartThemeBodyColor);5453 color: var(--SmartThemeBodyColor);
5441 opacity: 0.7;5454 opacity: 0.7;
5442}5455}
5456
5457#advanced-formatting-button div[contenteditable] {
5458 overflow-wrap: anywhere;
5459}