Merge branch 'staging' into delete-newbie-mode

4de3b10af2d1ffb792f1c65ec282e3c743ae2ff9

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

14 files changed, +1673 -1565Ignore whitespace
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+1380 -1470
@@ -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,448 +3102,340 @@
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 <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.">3109 <div>
3110 <input id="context_use_stop_strings" type="checkbox" />3110 <h4 class="standoutHeader">
3111 <small data-i18n="Separators as Stop Strings">Separators as Stop Strings</small>3111 <span data-i18n="Context Formatting">
3112 </label>3112 Context Formatting
3113 <label class="checkbox_label" title="Add Character and User names to a list of stopping strings." data-i18n="[title]Add Character and User names to a list of stopping strings.">3113 </span>
3114 <input id="context_names_as_stop_strings" type="checkbox" />3114 <small data-i18n="(Saves to Template)">
3115 <small data-i18n="Names as Stop Strings">Names as Stop Strings</small>3115 (Saves to Template)
3116 </label>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>
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.">
3153 <input id="context_use_stop_strings" type="checkbox" />
3154 <small data-i18n="Separators as Stop Strings">Separators as Stop Strings</small>
3155 </label>
3156 <label class="checkbox_label" title="Add Character and User names to a list of stopping strings." data-i18n="[title]Add Character and User names to a list of stopping strings.">
3157 <input id="context_names_as_stop_strings" type="checkbox" />
3158 <small data-i18n="Names as Stop Strings">Names as Stop Strings</small>
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>
3133 </div>
3134 <div data-id="1">
3135 <span data-i18n="Summary">Summary</span>
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>
3150 </div>
3151 <small>3177 <small>
3152 <b data-i18n="Hint">Hint:</b>3178 <span data-i18n="JSON serialized array of strings">JSON serialized array of strings</span>
3153 <span data-i18n="In-Chat Position not affected">3179 <i class="fa-solid fa-question-circle opacity50p" title="e.g: [&quot;Ford&quot;, &quot;BMW&quot;, &quot;Fiat&quot;]"></i>
3154 Summary and Author's Note orders are only affected when they don't have an In-Chat position set.
3155 </span>
3156 </small>3180 </small>
3157 </div>3181 </div>
3182 <div>
3183 <div contenteditable="true" id="custom_stopping_strings" class="text_pole textarea_compact monospace"></div>
3184 </div>
3185 <label class="checkbox_label" for="custom_stopping_strings_macro">
3186 <input id="custom_stopping_strings_macro" type="checkbox" checked>
3187 <small data-i18n="Replace Macro in Custom Stopping Strings">
3188 Replace Macro in Custom Stopping Strings
3189 </small>
3190 </label>
3158 </div>3191 </div>
3159 </div>3192 </div>
3160 <div>3193 </div>
3161 <h4 class="standoutHeader title_restorable">3194 <div id="InstructSettingsColumn" class="flex-container flexNoGap flexFlowColumn flex1">
3162 <div>3195 <div id="instructSettingsBlock">
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>3204 <label for="instruct_enabled" class="checkbox_label flex1">
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>3205 <input id="instruct_enabled" type="checkbox" style="display:none;" />
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>3206 <small><i class="fa-solid fa-power-off menu_button margin0"></i></small>
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>3207 </label>
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">
3209 <input id="instruct_bind_to_context" type="checkbox" style="display:none;" />
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>
3211 </label>
3173 </div>3212 </div>
3174 </h4>3213 </h4>
3175 <div class="flex-container">3214 <div class="flex-container margin0 justifyCenter">
3176 <label for="instruct_enabled" class="checkbox_label flex1">
3177 <input id="instruct_enabled" type="checkbox" />
3178 <span data-i18n="Enabled">Enabled</span>
3179 </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">
3181 <input id="instruct_bind_to_context" type="checkbox" />
3182 <span data-i18n="Bind to Context">Bind to Context</span>
3183 </label>
3184 </div>
3185 <label for="instruct_presets">
3186 <span data-i18n="Presets">Presets</span>
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>
3202 </div>3235 </div>
3203 <div data-newbie-hidden>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>
3241 </div>
3242
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>
3224 </div>
3225 <div data-newbie-hidden>
3226 <label>
3227 <small data-i18n="System Prompt">System Prompt</small>
3228 </label>3263 </label>
3229 <textarea id="instruct_system_prompt" class="text_pole textarea_compact autoSetHeight" rows="1"></textarea>
3230 </div>
3231 <div data-newbie-hidden class="inline-drawer wide100p flexFlowColumn">
3232 <div class="inline-drawer-toggle inline-drawer-header">
3233 <b><span data-i18n="Instruct Mode Sequences">Instruct Mode Sequences</span></b>
3234 <div class="fa-solid fa-circle-chevron-down inline-drawer-icon down"></div>
3235 </div>
3236 <div class="inline-drawer-content">
3237 <h5 class="textAlignCenter" data-i18n="System Prompt Wrapping">
3238 System Prompt Wrapping
3239 </h5>
3240 <div class="flex-container">
3241 <div class="flex1" title="Inserted before a System prompt." data-i18n="[title]Inserted before a System prompt.">
3242 <label for="instruct_system_sequence_prefix">
3243 <small data-i18n="System Prompt Prefix">System Prompt Prefix</small>
3244 </label>
3245 <div>
3246 <textarea id="instruct_system_sequence_prefix" class="text_pole textarea_compact autoSetHeight" maxlength="2000" placeholder="&mdash;" rows="1"></textarea>
3247 </div>
3248 </div>
3249 <div class="flex1" title="Inserted after a System prompt." data-i18n="[title]Inserted after a System prompt.">
3250 <label for="instruct_system_sequence_suffix">
3251 <small data-i18n="System Prompt Suffix">System Prompt Suffix</small>
3252 </label>
3253 <div>
3254 <textarea id="instruct_system_sequence_suffix" class="text_pole wide100p textarea_compact autoSetHeight" maxlength="2000" placeholder="&mdash;" rows="1"></textarea>
3255 </div>
3256 </div>
3257 </div>
3258 <h5 class="textAlignCenter" data-i18n="Chat Messages Wrapping">
3259 Chat Messages Wrapping
3260 </h5>
3261 <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.">
3263 <label for="instruct_input_sequence">
3264 <small data-i18n="User Message Prefix">User Message Prefix</small>
3265 </label>
3266 <div>
3267 <textarea id="instruct_input_sequence" class="text_pole textarea_compact autoSetHeight" maxlength="2000" placeholder="&mdash;" rows="1"></textarea>
3268 </div>
3269 </div>
3270 <div class="flex1" title="Inserted after a User message." data-i18n="[title]Inserted after a User message.">
3271 <label for="instruct_input_suffix">
3272 <small data-i18n="User Message Suffix">User Message Suffix</small>
3273 </label>
3274 <div>
3275 <textarea id="instruct_input_suffix" class="text_pole wide100p textarea_compact autoSetHeight" maxlength="2000" placeholder="&mdash;" rows="1"></textarea>
3276 </div>
3277 </div>
3278 </div>
3279 <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.">
3281 <label for="instruct_output_sequence">
3282 <small data-i18n="Assistant Message Prefix">Assistant Message Prefix</small>
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>
3287 </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>
3295 </div>
3296 </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>
3305 </div>
3306 <div class="flex1" title="Inserted after a System message." data-i18n="[title]Inserted after a System message.">
3307 <label for="instruct_system_suffix">
3308 <small data-i18n="System Message Suffix">System Message Suffix</small>
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>
3313 </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.">
3315 <label class="checkbox_label" for="instruct_system_same_as_user">
3316 <input id="instruct_system_same_as_user" type="checkbox" />
3317 <small data-i18n="System same as User">System same as User</small>
3318 </label>
3319 </div>
3320 </div>
3321 <h5 class="textAlignCenter" data-i18n="Misc. Sequences">
3322 Misc. Sequences
3323 </h5>
3324 <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.">
3326 <label for="instruct_first_output_sequence">
3327 <small data-i18n="First Assistant Prefix">First Assistant Prefix</small>
3328 </label>
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>
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">
3334 <label for="instruct_last_output_sequence">
3335 <small data-i18n="Last Assistant Prefix">Last Assistant Prefix</small>
3336 </label>
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>
3341 </div>
3342 <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.">
3344 <label for="instruct_first_input_sequence">
3345 <small data-i18n="First User Prefix">First User Prefix</small>
3346 </label>
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>
3351 <div class="flex1" 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>
3354 </label>
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>
3359 </div>
3360 <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.">
3362 <label for="instruct_last_system_sequence">
3363 <small data-i18n="System Instruction Prefix">System Instruction Prefix</small>
3364 </label>
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>
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).">
3370 <label for="instruct_stop_sequence">
3371 <small data-i18n="Stop Sequence">Stop Sequence</small>
3372 </label>
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>
3377 </div>
3378 <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.">
3380 <label for="instruct_user_alignment_message">
3381 <small data-i18n="User Filler Message">User Filler Message</small>
3382 </label>
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>
3387 </div>
3388 </div>
3389 </div>3264 </div>
3390 </div>3265 </div>
3391 </div>3266 <div name="tokenizerSettingsBlock">
3392 <div id="ContextFormatting">3267 <div data-newbie-hidden name="tokenizerSelectorBlock">
3393 <div>3268 <h4 class="standoutHeader"><span data-i18n="Tokenizer">Tokenizer</span>
3394 <div class="flex-container alignItemsBaseline">3269 <a href="https://docs.sillytavern.app/usage/core-concepts/advancedformatting/#tokenizer" class="notes-link" target="_blank">
3395 <h4 data-i18n="Context Formatting">3270 <span class="fa-solid fa-circle-question note-link-span"></span>
3396 Context Formatting3271 </a>
3397 </h4>3272 </h4>
3398 <small data-i18n="(Saved to Context Template)">3273 <select id="tokenizer">
3399 &nbsp;(Saved to Context Template)3274 <option value="99">Best match (recommended)</option>
3400 </small>3275 <option value="0">None / Estimated</option>
3401 </div>3276 <option value="1">GPT-2</option>
3402 <label class="checkbox_label" for="always-force-name2-checkbox">3277 <!-- Option #2 was a legacy GPT-2/3 tokenizer -->
3403 <input id="always-force-name2-checkbox" type="checkbox" />3278 <option value="3">Llama 1/2</option>
3404 <span data-i18n="Always add character's name to prompt">3279 <option value="12">Llama 3</option>
3405 Always add character's name to prompt3280 <option value="13">Gemma / Gemini</option>
3406 </span>3281 <option value="14">Jamba</option>
3407 </label>3282 <option value="4">NerdStash (NovelAI Clio)</option>
3408 <label class="checkbox_label" for="single_line">3283 <option value="5">NerdStash v2 (NovelAI Kayra)</option>
3409 <input id="single_line" type="checkbox" />3284 <option value="7">Mistral</option>
3410 <span data-i18n="Generate only one line per request">3285 <option value="8">Yi</option>
3411 Generate only one line per request3286 <option value="11">Claude 1/2</option>
3412 </span>3287 <option value="6">API (WebUI / koboldcpp)</option>
3413 </label>3288 </select>
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>3289 </div>
3469 <input id="token_padding" class="text_pole textarea_compact" type="number" min="-2048" max="2048" />3290 <div class="range-block flex-container flexnowrap" data-newbie-hidden name="tokenPaddingBlock">
3470 </div>3291 <div class="range-block-title justifyLeft">
3471 <div class="flex-container flexFlowColumn" data-newbie-hidden>3292 <small data-i18n="Token Padding" class="flex-container">Token Padding
3472 <div>3293 <a href="https://docs.sillytavern.app/usage/core-concepts/advancedformatting/#token-padding" class="notes-link" target="_blank">
3473 <h4 class="range-block-title justifyLeft">3294 <span class="fa-solid fa-circle-question note-link-span"></span>
3474 <span data-i18n="Start Reply With">3295 </a>
3475 Start Reply With3296 </small>
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>3297 </div>
3481 <label class="checkbox_label" for="chat-show-reply-prefix-checkbox">3298 <input id="token_padding" class="text_pole textarea_compact" type="number" min="-2048" max="2048" />
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>3299 </div>
3300 </div>
3301 <div>
3302 <h4 class="standoutHeader" data-i18n="Miscellaneous">Miscellaneous</h4>
3488 <div>3303 <div>
3489 <h4 class="range-block-title justifyLeft">3304 <small>
3490 <span data-i18n="Non-markdown strings">3305 <span data-i18n="Non-markdown strings">
3491 Non-markdown strings3306 Non-markdown strings
3492 </span>3307 </span>
3493 </h4>3308 </small>
3494 <div>3309 <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" />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" />
3496 </div>3311 </div>
3497 </div>3312 </div>
3498 <div>3313
3499 <h4 class="range-block-title justifyLeft">3314 <div data-newbie-hidden name="startReplyWithBlock">
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>3315 <div>
3508 <small>3316 <small>
3509 <span data-i18n="JSON serialized array of strings">JSON serialized array of strings</span>3317 <span data-i18n="Start Reply With">
3318 Start Reply With
3319 </span>
3510 </small>3320 </small>
3321 <div>
3322 <div contenteditable="true" id="start_reply_with" class="text_pole textarea_compact"></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>
3511 </div>3330 </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>3331 </div>
3522 </div>3332 </div>
3523 <div data-newbie-hidden>3333 </div>
3524 <h4>3334 <div id="InstructSequencesColumn" class="flex-container flexNoGap flexFlowColumn flex1">
3525 <span data-i18n="Auto-Continue">Auto-Continue</span>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>
3526 </h4>3345 </h4>
3527 <div class="flex-container">3346 <div class="flex-container">
3528 <label class="checkbox_label" for="auto_continue_enabled">3347 <div class="flexAuto" title="Inserted before a System prompt." data-i18n="[title]Inserted before a System prompt.">
3529 <input id="auto_continue_enabled" type="checkbox" />3348 <label for="instruct_system_sequence_prefix">
3530 <span data-i18n="Enabled">3349 <small data-i18n="System Prompt Prefix">System Prompt Prefix</small>
3531 Enabled3350 </label>
3532 </span>3351 <div>
3533 </label>3352 <div contenteditable="true" id="instruct_system_sequence_prefix" class="text_pole textarea_compact"></div>
3534 <label class="checkbox_label" for="auto_continue_allow_chat_completions">3353 </div>
3535 <input id="auto_continue_allow_chat_completions" type="checkbox" />3354 </div>
3536 <span data-i18n="Allow for Chat Completion APIs">3355 <div class="flexAuto" title="Inserted after a System prompt." data-i18n="[title]Inserted after a System prompt.">
3537 Allow for Chat Completion APIs3356 <label for="instruct_system_sequence_suffix">
3538 </span>3357 <small data-i18n="System Prompt Suffix">System Prompt Suffix</small>
3358 </label>
3359 <div>
3360 <div contenteditable="true" id="instruct_system_sequence_suffix" class="text_pole wide100p textarea_compact"></div>
3361 </div>
3362 </div>
3363 </div>
3364 <div class="flex-container">
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.">
3366 <small data-i18n="User Prefix">User Message Prefix</small>
3367 <div contenteditable="true" id="instruct_input_sequence" class="text_pole textarea_compact"></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>
3372 </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>
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>
3382 </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>
3388 </div>
3389 <div class="flexAuto" id="instruct_system_suffix_block" title="Inserted after a System message." data-i18n="[title]Inserted after a System message.">
3390 <small data-i18n="System Suffix">System Message Suffix</small>
3391 <div contenteditable="true" id="instruct_system_suffix" class="text_pole wide100p textarea_compact"></div>
3392 </div>
3393 </div>
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.">
3395 <label class="checkbox_label" for="instruct_system_same_as_user">
3396 <input id="instruct_system_same_as_user" type="checkbox" />
3397 <small data-i18n="System same as User">System same as User</small>
3539 </label>3398 </label>
3540 </div>3399 </div>
35413400
3542 <div class="auto_continue_settings_block">3401 <h5 class="textAlignCenter" data-i18n="Misc. Sequences">
3543 <label for="auto_continue_target_length">3402 Misc. Sequences
3544 <span data-i18n="Target length (tokens)">Target length (tokens)</span>3403 </h5>
3545 <input id="auto_continue_target_length" type="number" class="text_pole textarea_compact" min="0" max="1024" />3404 <div class="flex-container">
3546 </label>3405 <div class="flexAuto" title="Inserted before the first Assistant's message." data-i18n="[title]Inserted before the first Assistant's message.">
3406 <small data-i18n="First Assistant Prefix">First Assistant Prefix</small>
3407 <div contenteditable="true" id="instruct_first_output_sequence" class="text_pole textarea_compact"></div>
3408 </div>
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">
3410 <small data-i18n="Last Assistant Prefix">Last Assistant Prefix</small>
3411 <div contenteditable="true" id="instruct_last_output_sequence" class="text_pole wide100p textarea_compact"></div>
3412 </div>
3413 </div>
3414 <div class="flex-container">
3415 <div class="flexAuto" title="Inserted before the first User's message." data-i18n="[title]Inserted before the first User's message.">
3416 <small data-i18n="First User Prefix">First User Prefix</small>
3417 <div contenteditable="true" id="instruct_first_input_sequence" class="text_pole textarea_compact"></div>
3418 </div>
3419 <div class="flexAuto" title="Inserted before the last User's message." data-i18n="[title]instruct_last_input_sequence">
3420 <small data-i18n="Last User Prefix">Last User Prefix</small>
3421 <div contenteditable="true" id="instruct_last_input_sequence" class="text_pole wide100p textarea_compact"></div>
3422 </div>
3423 </div>
3424 <div class="flex-container">
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.">
3426 <small data-i18n="System Instruction Prefix">System Instruction Prefix</small>
3427 <div contenteditable="true" id="instruct_last_system_sequence" class="text_pole textarea_compact"></div>
3428 </div>
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).">
3430 <small data-i18n="Stop Sequence">Stop Sequence</small>
3431 <div contenteditable="true" id="instruct_stop_sequence" class="text_pole textarea_compact"></div>
3432 </div>
3433 </div>
3434 <div class="flex-container">
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.">
3436 <small data-i18n="User Filler Message">User Filler Message</small>
3437 <div contenteditable="true" id="instruct_user_alignment_message" class="text_pole textarea_compact"></div>
3438 </div>
3547 </div>3439 </div>
3548 </div>3440 </div>
3549 </div>3441 </div>
@@ -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">
3560 <input type="checkbox" id="WI_panel_pin">3452 <div id="WI_panel_pin_div" title="Locked = World Editor will stay open" data-i18n="[title]Locked = World Editor will stay open">
3561 <label for="WI_panel_pin">3453 <input type="checkbox" id="WI_panel_pin">
3562 <div class="unchecked fa-solid fa-unlock "></div>3454 <label for="WI_panel_pin">
3563 <div class="checked fa-solid fa-lock "></div>3455 <div class="unchecked fa-solid fa-unlock "></div>
3564 </label>3456 <div class="checked fa-solid fa-lock "></div>
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,75 +4184,110 @@
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>
4299 </div>4193 <div data-newbie-hidden nane="AutoContiueBlock" class="inline-drawer wide100p flexFlowColumn">
4300 <div name="AutoCompleteToggle">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.">
4301 <h4 data-i18n="AutoComplete Settings">AutoComplete Settings</h4>4195 <b><span data-i18n="Auto-swipe">Auto-Continue</span></b>
4302 <label data-newbie-hidden class="checkbox_label" for="stscript_autocomplete_autoHide">4196 <div class="fa-solid fa-circle-chevron-down inline-drawer-icon down"></div>
4303 <input id="stscript_autocomplete_autoHide" type="checkbox" />
4304 <small data-i18n="Automatically hide details">
4305 Automatically hide details
4306 </small>
4307 </label>
4308 <div class="flex-container">
4309 <div class="flex1" title="Determines how entries are found for autocomplete." data-i18n="[title]Determines how entries are found for autocomplete.">
4310 <label for="stscript_matching" data-i18n="Autocomplete Matching"><small>Matching</small></label>
4311 <select id="stscript_matching">
4312 <option data-i18n="Starts with" value="strict">Starts with</option>
4313 <option data-i18n="Includes" value="includes">Includes</option>
4314 <option data-i18n="Fuzzy" value="fuzzy">Fuzzy</option>
4315 </select>
4316 </div>4197 </div>
4317 <div class="flex1" title="Sets the style of the autocomplete." data-i18n="[title]Sets the style of the autocomplete.">4198 <div class="inline-drawer-content">
4318 <label for="stscript_autocomplete_style" data-i18n="Autocomplete Style"><small>Style</small></label>4199 <div class="flex-container">
4319 <div class="flex-container flexFlowRow alignItemsBaseline">4200 <label class="checkbox_label" for="auto_continue_enabled">
4320 <select id="stscript_autocomplete_style">4201 <input id="auto_continue_enabled" type="checkbox" />
4321 <option data-i18n="Follow Theme" value="theme">Follow Theme</option>4202 <small data-i18n="Enabled">
4322 <option data-i18n="Dark" value="dark">Dark</option>4203 Enabled
4323 <option data-i18n="Light" value="light">Light</option>4204 </small>
4324 </select>4205 </label>
4325 <!-- <div class="menu_button fa-solid fa-pen-to-square" title="Customize colors"></div> -->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>
4326 </div>4218 </div>
4327 </div>4219 </div>
4220
4221
4328 </div>4222 </div>
4329 <div title="Determines which keys select an item from the AutoComplete suggestions">4223 </div>
4330 <label data-i18n="Keyboard">4224 <div name="AutoCompleteToggle" class="inline-drawer wide100p flexFlowColumn">
4331 <small>Keyboard:</small>4225 <div class="inline-drawer-toggle inline-drawer-header userSettingsInnerExpandable" title="Options for the various autocompelte input boxes.">
4332 </label>4226 <b><span data-i18n="AutoComplete Settings">AutoComplete Settings</span></b>
4333 <select id="stscript_autocomplete_select">4227 <div class="fa-solid fa-circle-chevron-down inline-drawer-icon down"></div>
4334 <option value="3" data-i18n="Select with Tab or Enter">Select with Tab or Enter</option>
4335 <option value="1" data-i18n="Select with Tab">Select with Tab</option>
4336 <option value="2" data-i18n="Select with Enter">Select with Enter</option>
4337 </select>
4338 </div>
4339 <div class="flex-container flexFlowColumn gap0" title="Sets the font size of the autocomplete." data-i18n="[title]Sets the font size of the autocomplete.">
4340 <label for="stscript_autocomplete_font_scale"><small>Font Scale</small></label>
4341 <input class="neo-range-slider" type="range" id="stscript_autocomplete_font_scale" min="0.5" max="2" step="0.01">
4342 <input class="neo-range-input" type="number" min="0.5" max="2" step="0.01" data-for="stscript_autocomplete_font_scale" id="stscript_autocomplete_font_scale_counter">
4343 </div>4228 </div>
4344 <div title="Sets the width of the autocomplete." data-i18n="[title]Sets the width of the autocomplete.">4229 <div class="inline-drawer-content">
4345 <label for="stscript_autocomplete_width" data-i18n="Autocomplete Width"><small>Width</small></label>4230 <label data-newbie-hidden class="checkbox_label" for="stscript_autocomplete_autoHide">
4346 <div class="doubleRangeContainer">4231 <input id="stscript_autocomplete_autoHide" type="checkbox" />
4347 <div class="doubleRangeInputContainer">4232 <small data-i18n="Automatically hide details">
4348 <input type="range" id="stscript_autocomplete_width_left" min="0" max="2" step="1">4233 Automatically hide details
4349 <datalist id="stscript_autocomplete_width_left_values">4234 </small>
4350 <option value="0" label="input" title="chat input box" data-i18n="[title]chat input box"></option>4235 </label>
4351 <option value="1" label="chat" title="entire chat width" data-i18n="[title]entire chat width"></option>4236 <div class="flex-container">
4352 <option value="2" label="full" title="full window width" data-i18n="[title]full window width"></option>4237 <div class="flex1" title="Determines how entries are found for autocomplete." data-i18n="[title]Determines how entries are found for autocomplete.">
4353 </datalist>4238 <label for="stscript_matching" data-i18n="Autocomplete Matching"><small>Matching</small></label>
4239 <select id="stscript_matching">
4240 <option data-i18n="Starts with" value="strict">Starts with</option>
4241 <option data-i18n="Includes" value="includes">Includes</option>
4242 <option data-i18n="Fuzzy" value="fuzzy">Fuzzy</option>
4243 </select>
4354 </div>4244 </div>
4355 <div class="doubleRangeInputContainer">4245 <div class="flex1" title="Sets the style of the autocomplete." data-i18n="[title]Sets the style of the autocomplete.">
4356 <input type="range" id="stscript_autocomplete_width_right" min="0" max="2" step="1">4246 <label for="stscript_autocomplete_style" data-i18n="Autocomplete Style"><small>Style</small></label>
4357 <datalist id="stscript_autocomplete_width_right_values">4247 <div class="flex-container flexFlowRow alignItemsBaseline">
4358 <option value="0" label="input" title="chat input box" data-i18n="[title]chat input box"></option>4248 <select id="stscript_autocomplete_style">
4359 <option value="1" label="chat" title="entire chat width" data-i18n="[title]entire chat width"></option>4249 <option data-i18n="Follow Theme" value="theme">Follow Theme</option>
4360 <option value="2" label="full" title="full window width" data-i18n="[title]full window width"></option>4250 <option data-i18n="Dark" value="dark">Dark</option>
4361 </datalist>4251 <option data-i18n="Light" value="light">Light</option>
4252 </select>
4253 <!-- <div class="menu_button fa-solid fa-pen-to-square" title="Customize colors"></div> -->
4254 </div>
4255 </div>
4256 </div>
4257 <div title="Determines which keys select an item from the AutoComplete suggestions">
4258 <label data-i18n="Keyboard">
4259 <small>Keyboard:</small>
4260 </label>
4261 <select id="stscript_autocomplete_select">
4262 <option value="3" data-i18n="Select with Tab or Enter">Select with Tab or Enter</option>
4263 <option value="1" data-i18n="Select with Tab">Select with Tab</option>
4264 <option value="2" data-i18n="Select with Enter">Select with Enter</option>
4265 </select>
4266 </div>
4267 <div class="flex-container flexFlowColumn gap0" title="Sets the font size of the autocomplete." data-i18n="[title]Sets the font size of the autocomplete.">
4268 <label for="stscript_autocomplete_font_scale"><small>Font Scale</small></label>
4269 <input class="neo-range-slider" type="range" id="stscript_autocomplete_font_scale" min="0.5" max="2" step="0.01">
4270 <input class="neo-range-input" type="number" min="0.5" max="2" step="0.01" data-for="stscript_autocomplete_font_scale" id="stscript_autocomplete_font_scale_counter">
4271 </div>
4272 <div title="Sets the width of the autocomplete." data-i18n="[title]Sets the width of the autocomplete.">
4273 <label for="stscript_autocomplete_width" data-i18n="Autocomplete Width"><small>Width</small></label>
4274 <div class="doubleRangeContainer">
4275 <div class="doubleRangeInputContainer">
4276 <input type="range" id="stscript_autocomplete_width_left" min="0" max="2" step="1">
4277 <datalist id="stscript_autocomplete_width_left_values">
4278 <option value="0" label="input" title="chat input box" data-i18n="[title]chat input box"></option>
4279 <option value="1" label="chat" title="entire chat width" data-i18n="[title]entire chat width"></option>
4280 <option value="2" label="full" title="full window width" data-i18n="[title]full window width"></option>
4281 </datalist>
4282 </div>
4283 <div class="doubleRangeInputContainer">
4284 <input type="range" id="stscript_autocomplete_width_right" min="0" max="2" step="1">
4285 <datalist id="stscript_autocomplete_width_right_values">
4286 <option value="0" label="input" title="chat input box" data-i18n="[title]chat input box"></option>
4287 <option value="1" label="chat" title="entire chat width" data-i18n="[title]entire chat width"></option>
4288 <option value="2" label="full" title="full window width" data-i18n="[title]full window width"></option>
4289 </datalist>
4290 </div>
4362 </div>4291 </div>
4363 </div>4292 </div>
4364 </div>4293 </div>
@@ -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,1048 +4916,1082 @@
4987 </div>4916 </div>
4988 </div>4917 </div>
4989 <!-- various fullscreen popups -->4918 <!-- various fullscreen popups -->
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 -->4919 <div name="templatesAndPopupsWrapper"> <!--this div is just for IDE sanity for quick collapsing-->
4991 <dialog class="popup">4920 <div id="export_format_popup" class="list-group">
4992 <div class="popup-body">4921 <div class="export_format list-group-item" data-format="png">PNG</div>
4993 <div class="popup-content">4922 <div class="export_format list-group-item" data-format="json">JSON</div>
4994 <h3 class="popup-header">text</h3>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>
4995 </div>4929 </div>
4996 <div class="popup-crop-wrap">4930 <div class="zoomed_avatar_container">
4997 <img class="popup-crop-image" src="">4931 <img class="zoomed_avatar_img" src="" data-izoomify-url="" data-izoomify-magnify="1.8" data-izoomify-duration="300" alt="">
4998 </div>4932 </div>
4999 <textarea class="popup-input text_pole result-control auto-select" rows="1" data-result="1" data-result-event="submit"></textarea>4933 </div>
5000 <div class="popup-inputs"></div>4934 </div>
5001 <div class="popup-controls">4935 <template id="generic_draggable_template">
5002 <div class="popup-button-ok menu_button result-control" data-result="1" data-i18n="Delete">Delete</div>4936 <div class="draggable">
5003 <div class="popup-button-cancel menu_button result-control" data-result="0" data-i18n="Cancel">Cancel</div>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>
5004 </div>4941 </div>
5005 </div>4942 </div>
5006 <div class="popup-button-close right_menu_button fa-solid fa-circle-xmark" data-result="0" title="Close popup" data-i18n="[title]Close popup"></div>4943 </template>
5007 </dialog>4944 <div id="user_avatar_template" class="template_element">
5008 </template>4945 <div class="avatar-container">
5009 <div id="shadow_popup">4946 <div imgfile="" class="avatar">
5010 <div id="dialogue_popup">4947 <img src="" alt="User Avatar">
5011 <div id="dialogue_popup_holder">
5012 <div id="dialogue_popup_text">
5013 <h3 class="margin0">text</h3>
5014 </div>4948 </div>
5015 <textarea id="dialogue_popup_input" class="text_pole" rows="1"></textarea>4949 <div class="flex-container wide100pLess70px character_select_container">
5016 <div id="dialogue_popup_controls">4950 <div class="wide100p character_name_block">
5017 <div id="dialogue_popup_ok" class="menu_button" data-i18n="Delete" data-result="1">Delete</div>4951 <span class="ch_name flex1"></span>
5018 <div id="dialogue_popup_cancel" class="menu_button" data-i18n="Cancel" data-result="0">Cancel</div>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>
5019 </div>4971 </div>
5020 </div>4972 </div>
5021 </div>4973 </div>
5022 </div>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 -->
5023 <div id="character_popup" class="flex-container flexFlowColumn flexNoGap">4975 <dialog class="popup">
5024 <div id="character_popup_text">4976 <div class="popup-body">
5025 <h3 id="character_popup-button-h3" class="margin0"></h3> <span data-i18n="Advanced Defininitions">- Advanced4977 <div class="popup-content">
5026 Definitions</span>4978 <h3 class="popup-header">text</h3>
5027 </div>4979 </div>
5028 <hr class="margin-bot-10px">4980 <div class="popup-crop-wrap">
5029 <div id="character_cross" class="fa-solid fa-circle-xmark"></div>4981 <img class="popup-crop-image" src="">
5030 <div class="inline-drawer">4982 </div>
5031 <div class="inline-drawer-toggle inline-drawer-header">4983 <textarea class="popup-input text_pole result-control" rows="1" data-result="1" data-result-event="submit"></textarea>
5032 <h4>4984 <div class="popup-inputs"></div>
5033 <span data-i18n="Prompt Overrides">Prompt Overrides</span>4985 <div class="popup-controls">
5034 <small data-i18n="(For Chat Completion and Instruct Mode)">(For Chat Completion and Instruct Mode)</small>4986 <div class="popup-button-ok menu_button result-control" data-result="1" data-i18n="Delete">Delete</div>
5035 </h4>4987 <div class="popup-button-cancel menu_button result-control" data-result="0" data-i18n="Cancel">Cancel</div>
5036 <div class="inline-drawer-icon fa-solid fa-circle-chevron-down down"></div>
5037 </div>
5038 <div class="inline-drawer-content">
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>
5040 <div>
5041 <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>
5043 <div class="extension_token_counter">
5044 <span data-i18n="extension_token_counter">Tokens:</span> <span data-token-counter="system_prompt_textarea">counting...</span>
5045 </div>4988 </div>
5046 </div>4989 </div>
5047 <div>4990 <div class="popup-button-close right_menu_button fa-solid fa-circle-xmark" data-result="0" title="Close popup" data-i18n="[title]Close popup"></div>
5048 <h4 data-i18n="Post-History Instructions">Post-History Instructions</h4>4991 </dialog>
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>4992 </template>
5050 <div class="extension_token_counter">4993 <div id="shadow_popup">
5051 <span data-i18n="extension_token_counter">Tokens:</span> <span data-token-counter="post_history_instructions_textarea">counting...</span>4994 <div id="dialogue_popup">
4995 <div id="dialogue_popup_holder">
4996 <div id="dialogue_popup_text">
4997 <h3 class="margin0">text</h3>
4998 </div>
4999 <textarea id="dialogue_popup_input" class="text_pole" rows="1"></textarea>
5000 <div id="dialogue_popup_controls">
5001 <div id="dialogue_popup_ok" class="menu_button" data-i18n="Delete" data-result="1">Delete</div>
5002 <div id="dialogue_popup_cancel" class="menu_button" data-i18n="Cancel" data-result="0">Cancel</div>
5052 </div>5003 </div>
5053 </div>5004 </div>
5054 </div>5005 </div>
5055 </div>5006 </div>
5056 <hr>5007 <div id="character_popup" class="flex-container flexFlowColumn flexNoGap">
5057 <div class="inline-drawer">5008 <div id="character_popup_text">
5058 <div class="inline-drawer-toggle inline-drawer-header">5009 <h3 id="character_popup-button-h3" class="margin0"></h3> <span data-i18n="Advanced Defininitions">- Advanced
5059 <h4 data-i18n="Creator's Metadata (Not sent with the AI prompt)"><!-- This data-i18n attribute on the left is kept for backward compatibility, use the ones below when translating -->5010 Definitions</span>
5060 <span data-i18n="Creator's Metadata">Creator's Metadata</span>
5061 <small data-i18n="(Not sent with the AI Prompt)">(Not sent with the AI Prompt)</small>
5062 </h4>
5063 <div class="inline-drawer-icon fa-solid fa-circle-chevron-down down"></div>
5064 </div>5011 </div>
5065 <div class="inline-drawer-content">5012 <hr class="margin-bot-10px">
5066 <small data-i18n="Everything here is optional">Everything here is optional</small>5013 <div id="character_cross" class="fa-solid fa-circle-xmark"></div>
5067 <div class="flex-container flexnowrap">5014 <div class="inline-drawer">
5068 <div class="flex1">5015 <div class="inline-drawer-toggle inline-drawer-header">
5069 <h4 data-i18n="Created by">Created by</h4>5016 <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>5017 <span data-i18n="Prompt Overrides">Prompt Overrides</span>
5018 <small data-i18n="(For Chat Completion and Instruct Mode)">(For Chat Completion and Instruct Mode)</small>
5019 </h4>
5020 <div class="inline-drawer-icon fa-solid fa-circle-chevron-down down"></div>
5021 </div>
5022 <div class="inline-drawer-content">
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>
5024 <div>
5025 <h4 data-i18n="Main Prompt">Main Prompt</h4>
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>
5027 <div class="extension_token_counter">
5028 <span data-i18n="extension_token_counter">Tokens:</span> <span data-token-counter="system_prompt_textarea">counting...</span>
5029 </div>
5071 </div>5030 </div>
5072 <div class="flex1">5031 <div>
5073 <h4 data-i18n="Character Version">Character Version</h4>5032 <h4 data-i18n="Post-History Instructions">Post-History Instructions</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>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>
5034 <div class="extension_token_counter">
5035 <span data-i18n="extension_token_counter">Tokens:</span> <span data-token-counter="post_history_instructions_textarea">counting...</span>
5036 </div>
5075 </div>5037 </div>
5076 </div>5038 </div>
5077 <div class="flex-container flexnowrap">5039 </div>
5078 <div class="flex1">5040 <hr>
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>5041 <div class="inline-drawer">
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>5042 <div class="inline-drawer-toggle inline-drawer-header">
5043 <h4 data-i18n="Creator's Metadata (Not sent with the AI prompt)"><!-- This data-i18n attribute on the left is kept for backward compatibility, use the ones below when translating -->
5044 <span data-i18n="Creator's Metadata">Creator's Metadata</span>
5045 <small data-i18n="(Not sent with the AI Prompt)">(Not sent with the AI Prompt)</small>
5046 </h4>
5047 <div class="inline-drawer-icon fa-solid fa-circle-chevron-down down"></div>
5048 </div>
5049 <div class="inline-drawer-content">
5050 <small data-i18n="Everything here is optional">Everything here is optional</small>
5051 <div class="flex-container flexnowrap">
5052 <div class="flex1">
5053 <h4 data-i18n="Created by">Created by</h4>
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>
5055 </div>
5056 <div class="flex1">
5057 <h4 data-i18n="Character Version">Character Version</h4>
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>
5059 </div>
5081 </div>5060 </div>
5082 <div class="flex1">5061 <div class="flex-container flexnowrap">
5083 <h4 data-i18n="Tags to Embed">Tags to Embed</h4>5062 <div class="flex1">
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>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>
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>
5065 </div>
5066 <div class="flex1">
5067 <h4 data-i18n="Tags to Embed">Tags to Embed</h4>
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>
5069 </div>
5085 </div>5070 </div>
5086 </div>5071 </div>
5087 </div>5072 </div>
5088 </div>5073 <hr>
5089 <hr>5074 <div id="personality_div">
5090 <div id="personality_div">
5091 <h4>
5092 <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>
5094 </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>
5096 <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>
5098 </div>
5099 </div>
5100 <div id="scenario_div">
5101 <h4>
5102 <span data-i18n="Scenario">Scenario</span>
5103 <a href="https://docs.sillytavern.app/usage/core-concepts/characterdesign/#scenario" class="notes-link" target="_blank">
5104 <span class="fa-solid fa-circle-question note-link-span"></span>
5105 </a>
5106 </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>
5108 <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>
5110 </div>
5111 </div>
5112 <div id="depth_prompt_div" class="flex-container">
5113 <div class="flex1">
5114 <h4>5075 <h4>
5115 <span data-i18n="Character's Note">5076 <span data-i18n="Personality summary">Personality summary</span>
5116 Character's Note5077 <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>
5117 </span>
5118 </h4>5078 </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>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>
5080 <div class="extension_token_counter">
5081 <span data-i18n="extension_token_counter">Tokens:</span> <span data-token-counter="personality_textarea" data-token-permanent="true">counting...</span>
5082 </div>
5120 </div>5083 </div>
5121 <div>5084 <div id="scenario_div">
5122 <h4>5085 <h4>
5123 <span data-i18n="@ Depth">5086 <span data-i18n="Scenario">Scenario</span>
5124 @ Depth5087 <a href="https://docs.sillytavern.app/usage/core-concepts/characterdesign/#scenario" class="notes-link" target="_blank">
5125 </span>5088 <span class="fa-solid fa-circle-question note-link-span"></span>
5089 </a>
5126 </h4>5090 </h4>
5127 <input id="depth_prompt_depth" name="depth_prompt_depth" class="text_pole textarea_compact m-t-0" type="number" min="0" max="999" value="4" form="form_create" />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>
5128 <h4>
5129 <span data-i18n="Role">
5130 Role
5131 </span>
5132 </h4>
5133 <select id="depth_prompt_role" name="depth_prompt_role" form="form_create" class="text_pole textarea_compact m-t-0">
5134 <option value="system" data-i18n="System">System</option>
5135 <option value="user" data-i18n="User">User</option>
5136 <option value="assistant" data-i18n="Assistant">Assistant</option>
5137 </select>
5138 <div class="extension_token_counter">5092 <div class="extension_token_counter">
5139 <span data-i18n="extension_token_counter">Tokens:</span> <span data-token-counter="depth_prompt_prompt" 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>
5140 </div>5094 </div>
5141 </div>5095 </div>
5142 </div>5096 <div id="depth_prompt_div" class="flex-container">
5143 <div id="talkativeness_div">5097 <div class="flex1">
5144 <h4><span data-i18n="Talkativeness">Talkativeness</span></h4>5098 <h4>
5145 <h5 data-i18n="How often the character speaks in group chats!"><!-- This data-i18n attribute on the left is kept for backward compatibility, use the ones below when translating -->5099 <span data-i18n="Character's Note">
5146 <span data-i18n="How often the character speaks in">How often the character speaks in</span>&nbsp;<span class="warning" data-i18n="group chats!">group chats!</span>5100 Character's Note
5147 </h5>5101 </span>
5148 <input id="talkativeness_slider" name="talkativeness" type="range" min="0" max="1" step="0.05" value="0.5" form="form_create">5102 </h4>
5149 <div class="slider_hint">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>
5150 <span data-i18n="Shy">Shy</span>5104 </div>
5151 <span data-i18n="Normal">Normal</span>5105 <div>
5152 <span data-i18n="Chatty">Chatty</span>5106 <h4>
5107 <span data-i18n="@ Depth">
5108 @ Depth
5109 </span>
5110 </h4>
5111 <input id="depth_prompt_depth" name="depth_prompt_depth" class="text_pole textarea_compact m-t-0" type="number" min="0" max="999" value="4" form="form_create" />
5112 <h4>
5113 <span data-i18n="Role">
5114 Role
5115 </span>
5116 </h4>
5117 <select id="depth_prompt_role" name="depth_prompt_role" form="form_create" class="text_pole textarea_compact m-t-0">
5118 <option value="system" data-i18n="System">System</option>
5119 <option value="user" data-i18n="User">User</option>
5120 <option value="assistant" data-i18n="Assistant">Assistant</option>
5121 </select>
5122 <div class="extension_token_counter">
5123 <span data-i18n="extension_token_counter">Tokens:</span> <span data-token-counter="depth_prompt_prompt" data-token-permanent="true">counting...</span>
5124 </div>
5125 </div>
5153 </div>5126 </div>
5154 </div>5127 <div id="talkativeness_div">
5155 <hr>5128 <h4><span data-i18n="Talkativeness">Talkativeness</span></h4>
5156 <div id="mes_example_div" class="flex-container flexFlowColumn">5129 <h5 data-i18n="How often the character speaks in group chats!"><!-- This data-i18n attribute on the left is kept for backward compatibility, use the ones below when translating -->
5157 <div>5130 <span data-i18n="How often the character speaks in">How often the character speaks in</span>&nbsp;<span class="warning" data-i18n="group chats!">group chats!</span>
5158 <h4><span data-i18n="Examples of dialogue">Examples of dialogue</span></h4>5131 </h5>
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>5132 <input id="talkativeness_slider" name="talkativeness" type="range" min="0" max="1" step="0.05" value="0.5" form="form_create">
5133 <div class="slider_hint">
5134 <span data-i18n="Shy">Shy</span>
5135 <span data-i18n="Normal">Normal</span>
5136 <span data-i18n="Chatty">Chatty</span>
5137 </div>
5160 </div>5138 </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>5139 <hr>
5162 <div class="extension_token_counter">5140 <div id="mes_example_div" class="flex-container flexFlowColumn">
5163 <span data-i18n="extension_token_counter">Tokens:</span> <span data-token-counter="mes_example_textarea">counting...</span>5141 <div>
5142 <h4><span data-i18n="Examples of dialogue">Examples of dialogue</span></h4>
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>
5144 </div>
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>
5146 <div class="extension_token_counter">
5147 <span data-i18n="extension_token_counter">Tokens:</span> <span data-token-counter="mes_example_textarea">counting...</span>
5148 </div>
5149 <!-- TODO: Example chats handhold-editor concept: https://gist.github.com/Cohee1207/50da02a4001ac1adae9b440f9b8e1079 -->
5164 </div>5150 </div>
5165 <!-- PLACEHOLDER CODE FOR NEW EXAMPLE CHAT HANDLING5151 <div id="character_popup_ok" class="menu_button" data-i18n="Save">Save</div>
5166 <div name="exampleChatsBlockTemplate" class="flex-container flexFlowColumn">5152 </div>
5167 <div class="flex-container alignitemscenter">5153
5168 <textarea class="flexShrink flexGrow wideMinContent" rows="1" placeholder="Name for this example chat"></textarea>5154 <div id="shadow_select_chat_popup">
5169 <div class="fa-solid fa-plus menu_button" title="Add a new message to this example chat block"></div>5155 <div id="select_chat_popup">
5156 <div name="selectChatPopupHeader" class="flex-container alignitemscenter justifySpaceBetween flexGap10">
5157 <div id="select_chat_import"> <!-- import chat popup header -->
5158 <form id="form_import_chat" action="javascript:void(null);" method="post" enctype="multipart/form-data" style="display: none;">
5159 <input type="file" id="chat_import_file" accept=".json, .jsonl" name="avatar">
5160 <input id="chat_import_file_type" name="file_type" class="text_pole" 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;">
5162 <input id="chat_import_character_name" name="character_name" class="text_pole" value="" autocomplete="off" style="display: none;">
5163 </form>
5170 </div>5164 </div>
5171 <div class="flex-container whitespacenowrap">5165 <div id="selectChatPopupHeaderText" class="TxtLrgBoldCenter">
5172 <div class="flex-container flexFlowColumn">5166 <span id="ChatHistoryCharName"></span><span data-i18n="Chat History">Chat History</span>
5173 <select>5167 <a href="https://docs.sillytavern.app/usage/core-concepts/chatfilemanagement/#chat-import" class="notes-link" target="_blank"><span class="fa-solid fa-circle-question note-link-span"></span></a>
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>5168 </div>
5182 <div class="flex-container whitespacenowrap">5169 <div id="newChatFromManageScreenButton" class="menu_button menu_button_icon">
5183 <div class="flex-container flexFlowColumn">5170 <i class="fa-solid fa-plus"></i>
5184 <select>5171 <span data-i18n="New Chat">New Chat</span>
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>5172 </div>
5173 <div id="chat_import_button" class="menu_button menu_button_icon">
5174 <i class="fa-solid fa-file-import"></i>
5175 <span data-i18n="Import Chat">Import Chat</span>
5176 </div>
5177 <input type="text" id="select_chat_search" class="text_pole flex1" data-i18n="[placeholder]Search..." placeholder="Search..." autocomplete="off">
5178 <div id="select_chat_cross" class="opacity50p hoverglow fa-solid fa-circle-xmark fontsize120p" alt="Close Past Chat Popup"></div>
5193 </div>5179 </div>
5194 -->5180 <div id="select_chat_div"></div>
5195 </div>5181 <div id="load_select_chat_div">
5196 <div id="character_popup_ok" class="menu_button" data-i18n="Save">Save</div>5182 <div class="fa-solid fa-hourglass fa-spin"></div>
5197 </div>
5198 <div id="shadow_select_chat_popup">
5199 <div id="select_chat_popup">
5200 <div name="selectChatPopupHeader" class="flex-container alignitemscenter justifySpaceBetween flexGap10">
5201 <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;">
5203 <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;">
5205 <input id="chat_import_avatar_url" name="avatar_url" class="text_pole" maxlength="999" size="2" 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;">
5207 </form>
5208 </div>
5209 <div id="selectChatPopupHeaderText" class="TxtLrgBoldCenter">
5210 <span id="ChatHistoryCharName"></span><span data-i18n="Chat History">Chat History</span>
5211 <a href="https://docs.sillytavern.app/usage/core-concepts/chatfilemanagement/#chat-import" class="notes-link" target="_blank"><span class="fa-solid fa-circle-question note-link-span"></span></a>
5212 </div>
5213 <div id="newChatFromManageScreenButton" class="menu_button menu_button_icon">
5214 <i class="fa-solid fa-plus"></i>
5215 <span data-i18n="New Chat">New Chat</span>
5216 </div>
5217 <div id="chat_import_button" class="menu_button menu_button_icon">
5218 <i class="fa-solid fa-file-import"></i>
5219 <span data-i18n="Import Chat">Import Chat</span>
5220 </div>5183 </div>
5221 <input type="text" id="select_chat_search" class="text_pole flex1" data-i18n="[placeholder]Search..." placeholder="Search..." autocomplete="off">
5222 <div id="select_chat_cross" class="opacity50p hoverglow fa-solid fa-circle-xmark fontsize120p" alt="Close Past Chat Popup"></div>
5223 </div>
5224 <div id="select_chat_div"></div>
5225 <div id="load_select_chat_div">
5226 <div class="fa-solid fa-hourglass fa-spin"></div>
5227 </div>5184 </div>
5228 </div>5185 </div>
5229 </div>5186 <div id="background_template" class="template_element">
5230 <div id="background_template" class="template_element">5187 <div class="bg_example flex-container" bgfile="" class="bg_example_img" title="">
5231 <div class="bg_example flex-container" bgfile="" class="bg_example_img" title="">5188 <div title="Copy to system backgrounds" data-i18n="[title]Copy to system backgrounds" class="bg_button bg_example_copy fa-solid fa-file-arrow-up"></div>
5232 <div title="Copy to system backgrounds" data-i18n="[title]Copy to system backgrounds" class="bg_button bg_example_copy fa-solid fa-file-arrow-up"></div>5189 <div title="Rename background" data-i18n="[title]Rename background" class="bg_button bg_example_edit fa-solid fa-pencil"></div>
5233 <div title="Rename background" data-i18n="[title]Rename background" class="bg_button bg_example_edit fa-solid fa-pencil"></div>5190 <div title="Lock" data-i18n="[title]Lock" class="bg_button bg_example_lock fa-solid fa-lock"></div>
5234 <div title="Lock" data-i18n="[title]Lock" class="bg_button bg_example_lock fa-solid fa-lock"></div>5191 <div title="Unlock" data-i18n="[title]Unlock" class="bg_button bg_example_unlock fa-solid fa-lock-open"></div>
5235 <div title="Unlock" data-i18n="[title]Unlock" class="bg_button bg_example_unlock fa-solid fa-lock-open"></div>5192 <div title="Delete background" data-i18n="[title]Delete background" class="bg_button bg_example_cross fa-solid fa-circle-xmark"></div>
5236 <div title="Delete background" data-i18n="[title]Delete background" class="bg_button bg_example_cross fa-solid fa-circle-xmark"></div>5193 <div class="BGSampleTitle">
5237 <div class="BGSampleTitle">5194 </div>
5238 </div>5195 </div>
5239 </div>5196 </div>
5240 </div>5197 <!-- templates for JS to reuse when needed -->
5241 <!-- templates for JS to reuse when needed -->5198 <div id="chat_world_template" class="template_element">
5242 <div id="chat_world_template" class="template_element">5199 <div class="chat_world range-block flexFlowColumn flex-container">
5243 <div class="chat_world range-block flexFlowColumn flex-container">5200 <div class="range-block-title">
5244 <div class="range-block-title">5201 <h4 data-i18n="Chat Lorebook"><!-- This data-i18n attribute is kept for backward compatibility, use the ones below when translating -->
5245 <h4 data-i18n="Chat Lorebook"><!-- This data-i18n attribute is kept for backward compatibility, use the ones below when translating -->5202 <span data-i18n="Chat Lorebook for">Chat Lorebook for</span> <span class="chat_name"></span>
5246 <span data-i18n="Chat Lorebook for">Chat Lorebook for</span> <span class="chat_name"></span>5203 </h4>
5247 </h4>5204 </div>
5248 </div>5205 <div class="range-block-counter justifyLeft flex-container flexFlowColumn margin-bot-10px">
5249 <div class="range-block-counter justifyLeft flex-container flexFlowColumn margin-bot-10px">5206 <span data-i18n="chat_world_template_txt">
5250 <span data-i18n="chat_world_template_txt">5207 A selected World Info will be bound to this chat. When generating an AI reply,
5251 A selected World Info will be bound to this chat. When generating an AI reply,5208 it will be combined with the entries from global and character lorebooks.
5252 it will be combined with the entries from global and character lorebooks.5209 </span>
5253 </span>5210 </div>
5254 </div>5211 <div class="range-block-range wide100p">
5255 <div class="range-block-range wide100p">5212 <select class="chat_world_info_selector wide100p">
5256 <select class="chat_world_info_selector wide100p">5213 <option value="">--- None ---</option>
5257 <option value="">--- None ---</option>5214 </select>
5258 </select>5215 </div>
5259 </div>5216 </div>
5260 </div>5217 </div>
5261 </div>5218 <div id="character_world_template" class="template_element">
5262 <div id="character_world_template" class="template_element">5219 <div class="character_world range-block flexFlowColumn flex-container">
5263 <div class="character_world range-block flexFlowColumn flex-container">5220 <div class="range-block-title">
5264 <div class="range-block-title">5221 <h3>
5265 <h3>5222 <span data-i18n="Select a World Info file for"> Select a World Info file for <span class="character_name"></span></span>:
5266 <span data-i18n="Select a World Info file for"> Select a World Info file for <span class="character_name"></span></span>:5223 </h3>
5267 </h3>5224 </div>
5268 </div>5225 <h4 data-i18n="Primary Lorebook">Primary Lorebook</h4>
5269 <h4 data-i18n="Primary Lorebook">Primary Lorebook</h4>5226 <div class="range-block-counter justifyLeft flex-container flexFlowColumn margin-bot-10px">
5270 <div class="range-block-counter justifyLeft flex-container flexFlowColumn margin-bot-10px">5227 <span data-i18n="A selected World Info will be bound to this character as its own Lorebook.">A selected World Info will be bound to this character as its own Lorebook.</span>
5271 <span data-i18n="A selected World Info will be bound to this character as its own Lorebook.">A selected World Info will be bound to this character as its own Lorebook.</span>5228 <span data-i18n="When generating an AI reply, it will be combined with the entries from a global World Info selector.">When generating an AI reply, it will be combined with the entries from a global World Info selector.</span>
5272 <span data-i18n="When generating an AI reply, it will be combined with the entries from a global World Info selector.">When generating an AI reply, it will be combined with the entries from a global World Info selector.</span>5229 <span data-i18n="Exporting a character would also export the selected Lorebook file embedded in the JSON data.">Exporting a character would also export the selected Lorebook file embedded in the JSON data.</span>
5273 <span data-i18n="Exporting a character would also export the selected Lorebook file embedded in the JSON data.">Exporting a character would also export the selected Lorebook file embedded in the JSON data.</span>5230 </div>
5274 </div>5231 <div class="range-block-range wide100p">
5275 <div class="range-block-range wide100p">5232 <select class="character_world_info_selector wide100p">
5276 <select class="character_world_info_selector wide100p">5233 <option value="">--- None ---</option>
5277 <option value="">--- None ---</option>5234 </select>
5278 </select>5235 </div>
5279 </div>5236 <div class="range-block-title">
5280 <div class="range-block-title">5237 <h4>
5281 <h4>5238 <span data-i18n="Additional Lorebooks">Additional Lorebooks</span>
5282 <span data-i18n="Additional Lorebooks">Additional Lorebooks</span>5239 </h4>
5283 </h4>5240 </div>
5284 </div>5241 <div class="range-block-counter justifyLeft flex-container flexFlowColumn margin-bot-10px">
5285 <div class="range-block-counter justifyLeft flex-container flexFlowColumn margin-bot-10px">5242 <span data-i18n="Associate one or more auxillary Lorebooks with this character.">Associate one or more auxillary Lorebooks with this character.</span><br>
5286 <span data-i18n="Associate one or more auxillary Lorebooks with this character.">Associate one or more auxillary Lorebooks with this character.</span><br>5243 <span data-i18n="NOTE: These choices are optional and won't be preserved on character export!">NOTE: These choices are optional and won't be preserved on character export!</span>
5287 <span data-i18n="NOTE: These choices are optional and won't be preserved on character export!">NOTE: These choices are optional and won't be preserved on character export!</span>5244 </div>
5288 </div>5245 <div class="range-block-range wide100p">
5289 <div class="range-block-range wide100p">5246 <select class="character_extra_world_info_selector wide100p" multiple>
5290 <select class="character_extra_world_info_selector wide100p" multiple>5247 <option value="" data-i18n="-- World Info not found --">-- World Info not found --</option>
5291 <option value="" data-i18n="-- World Info not found --">-- World Info not found --</option>5248 </select>
5292 </select>5249 </div>
5293 </div>5250 </div>
5294 </div>5251 </div>
5295 </div>5252 <div id="past_chat_template" class="template_element">
5296 <div id="past_chat_template" class="template_element">5253 <div class="select_chat_block_wrapper flex-container">
5297 <div class="select_chat_block_wrapper flex-container">5254 <div class="select_chat_block wide100p flex-container" file_name="">
5298 <div class="select_chat_block wide100p flex-container" file_name="">5255 <div id="select_chat_name_wrapper" class="flex-container alignitemscenter justifySpaceBetween wide100p">
5299 <div id="select_chat_name_wrapper" class="flex-container alignitemscenter justifySpaceBetween wide100p">5256 <div>
5300 <div>5257 <small class="select_chat_block_filename select_chat_block_filename_item"></small>
5301 <small class="select_chat_block_filename select_chat_block_filename_item"></small>5258 <div title="Rename chat file" class="renameChatButton hoverglow opacity50p fa-solid fa-pencil" data-i18n="[title]Rename chat file"></div>
5302 <div title="Rename chat file" class="renameChatButton hoverglow opacity50p fa-solid fa-pencil" data-i18n="[title]Rename chat file"></div>
5303 </div>
5304 <div class="flex-container gap10px">
5305 <div class="select_chat_info flex-container">
5306 <small class="chat_messages_date select_chat_block_filename_item"></small>
5307 <small class="chat_file_size select_chat_block_filename_item"></small>
5308 <small class="chat_messages_num select_chat_block_filename_item"></small>
5309 </div>5259 </div>
5310 <div class="flex-container gap10px">5260 <div class="flex-container gap10px">
5311 <div title="Export JSONL chat file" data-format="jsonl" class="exportRawChatButton opacity50p hoverglow fa-solid fa-file-export" data-i18n="[title]Export JSONL chat file"></div>5261 <div class="select_chat_info flex-container">
5312 <div title="Download chat as plain text document" data-format="txt" class="exportChatButton opacity50p hoverglow fa-solid fa-file-lines" data-i18n="[title]Download chat as plain text document"></div>5262 <small class="chat_messages_date select_chat_block_filename_item"></small>
5313 <div title="Delete chat file" file_name="" class="PastChat_cross opacity50p hoverglow fa-solid fa-skull" data-i18n="[title]Delete chat file"></div>5263 <small class="chat_file_size select_chat_block_filename_item"></small>
5264 <small class="chat_messages_num select_chat_block_filename_item"></small>
5265 </div>
5266 <div class="flex-container gap10px">
5267 <div title="Export JSONL chat file" data-format="jsonl" class="exportRawChatButton opacity50p hoverglow fa-solid fa-file-export" data-i18n="[title]Export JSONL chat file"></div>
5268 <div title="Download chat as plain text document" data-format="txt" class="exportChatButton opacity50p hoverglow fa-solid fa-file-lines" data-i18n="[title]Download chat as plain text document"></div>
5269 <div title="Delete chat file" file_name="" class="PastChat_cross opacity50p hoverglow fa-solid fa-skull" data-i18n="[title]Delete chat file"></div>
5270 </div>
5314 </div>5271 </div>
5315 </div>5272 </div>
5273 <div class="select_chat_block_mes"></div>
5316 </div>5274 </div>
5317 <div class="select_chat_block_mes"></div>
5318 </div>5275 </div>
5319 </div>5276 </div>
5320 </div>5277 <div id="tag_view_template" class="template_element">
5321 <div id="tag_view_template" class="template_element">5278 <div class="tag_view_item">
5322 <div class="tag_view_item">5279 <div class="drag-handle" data-i18n="[title]Drag to reorder tag">☰</div>
5323 <div class="drag-handle" data-i18n="[title]Drag to reorder tag">☰</div>5280 <div title="Tag as folder" class="tag_as_folder fa-solid fa-folder-open right_menu_button" data-i18n="[title]Use tag as folder">
5324 <div title="Tag as folder" class="tag_as_folder fa-solid fa-folder-open right_menu_button" data-i18n="[title]Use tag as folder">5281 <span class="tag_folder_indicator"></span>
5325 <span class="tag_folder_indicator"></span>5282 </div>
5283 <div class="tag_view_color_picker" data-value="color"></div>
5284 <div class="tag_view_color_picker" data-value="color2"></div>
5285 <div class="tag_view_name" contenteditable="true"></div>
5286 <div class="tag_view_counter"><span class="tag_view_counter_value"></span>&nbsp;entries</div>
5287 <div title="Delete tag" class="tag_delete fa-solid fa-trash-can right_menu_button" data-i18n="[title]Delete tag"></div>
5326 </div>5288 </div>
5327 <div class="tag_view_color_picker" data-value="color"></div>
5328 <div class="tag_view_color_picker" data-value="color2"></div>
5329 <div class="tag_view_name" contenteditable="true"></div>
5330 <div class="tag_view_counter"><span class="tag_view_counter_value"></span>&nbsp;entries</div>
5331 <div title="Delete tag" class="tag_delete fa-solid fa-trash-can right_menu_button" data-i18n="[title]Delete tag"></div>
5332 </div>5289 </div>
5333 </div>5290 <div id="entry_edit_template" class="template_element">
5334 <div id="entry_edit_template" class="template_element">5291 <div class="world_entry">
5335 <div class="world_entry">5292 <form class="world_entry_form wi-card-entry">
5336 <form class="world_entry_form wi-card-entry">5293 <div class="inline-drawer wide100p">
5337 <div class="inline-drawer wide100p">5294 <div class="inline-drawer-toggle inline-drawer-header gap5px padding0">
5338 <div class="inline-drawer-header gap5px padding0">5295 <span class="drag-handle">&#9776;</span>
5339 <span class="drag-handle">&#9776;</span>5296 <div class="gap5px world_entry_thin_controls wide100p alignitemscenter">
5340 <div class="gap5px world_entry_thin_controls wide100p alignitemscenter">5297 <div class="fa-fw fa-solid fa-circle-chevron-down inline-drawer-icon down"></div>
5341 <div class="inline-drawer-toggle fa-fw fa-solid fa-circle-chevron-down inline-drawer-icon down"></div>5298 <div class="flex-container alignitemscenter wide100p">
5342 <div class="fa-solid fa-toggle-on killSwitch" name="entryKillSwitch" title="Toggle entry's active state."></div>5299 <div class="WIEntryTitleAndStatus flex-container flex1 alignitemscenter">
5343 <div class="flex-container alignitemscenter wide100p">5300 <div class="flex-container flex1">
53445301 <textarea class="text_pole" rows="1" name="comment" data-i18n="[placeholder]Entry Title/Memo" placeholder="Entry Title/Memo"></textarea>
5345 <div class="WIEntryTitleAndStatus flex-container flex1 alignitemscenter">5302 </div>
53465303 <!-- <span class="world_entry_form_position_value"></span> -->
5347 <div class="flex-container flex1">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">
5348 <textarea class="text_pole" rows="1" name="comment" maxlength="5000" data-i18n="[placeholder]Entry Title/Memo" placeholder="Entry Title/Memo"></textarea>5305 <option value="constant" title="Constant" data-i18n="[title]WI_Entry_Status_Constant">🔵</option>
5349 </div>5306 <option value="normal" title="Normal" data-i18n="[title]WI_Entry_Status_Normal">🟢</option>
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">5307 <option value="vectorized" title="Vectorized" data-i18n="[title]WI_Entry_Status_Vectorized">🔗</option>
5351 <option value="constant" title="Constant" data-i18n="[title]WI_Entry_Status_Constant">🔵</option>5308 <option value="disabled" title="Disabled" data-i18n="[title]WI_Entry_Status_Disabled">❌</option>
5352 <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>
5354 </select>
5355 </div>
5356 <div class="WIEnteryHeaderControls flex-container">
5357 <div name="PositionBlock" class="world_entry_form_control world_entry_form_radios wi-enter-footer-text">
5358 <label for="position" class="WIEntryHeaderTitleMobile" data-i18n="Position:">Position:</label>
5359 <select name="position" class="text_pole widthNatural margin0" data-i18n="[title]T_Position" title="↑Char: Before Character Definitions&#13;↓Char: After Character Definitions&#13;↑EM: Before Example Messages&#13;↓EM: After Example Messages&#13;↑AN: Before Author's Note&#13;↓AN: After Author's Note&#13;@D ⚙️: at Depth (System)&#13;@D 👤: at Depth (User)&#13;@D 🤖: at Depth (Assistant)">
5360 <option value="0" data-role="" data-i18n="Before Char Defs">
5361 ↑Char
5362 </option>
5363 <option value="1" data-role="" data-i18n="After Char Defs">
5364 ↓Char
5365 </option>
5366 <option value="5" data-role="" data-i18n="Before EM">
5367 ↑EM
5368 </option>
5369 <option value="6" data-role="" data-i18n="After EM">
5370 ↓EM
5371 </option>
5372 <option value="2" data-role="" data-i18n="Before AN">
5373 ↑AN
5374 </option>
5375 <option value="3" data-role="" data-i18n="After AN">
5376 ↓AN
5377 </option>
5378 <option value="4" data-role="0" data-i18n="at Depth System">
5379 @D ⚙️
5380 </option>
5381 <option value="4" data-role="1" data-i18n="at Depth User">
5382 @D 👤
5383 </option>
5384 <option value="4" data-role="2" data-i18n="at Depth AI">
5385 @D 🤖
5386 </option>
5387 </select>5309 </select>
5388 </div>5310 </div>
5389 <div class="world_entry_form_control wi-enter-footer-text flex-container flexNoGap">5311 <div class="WIEnteryHeaderControls flex-container">
5390 <label for="depth" class="WIEntryHeaderTitleMobile" data-i18n="Depth:">Depth:</label>5312 <div name="PositionBlock" class="world_entry_form_control world_entry_form_radios wi-enter-footer-text">
5391 <input title="Depth" class="text_pole wideMax100px margin0" type="number" name="depth" data-i18n="[title]Depth" placeholder="" min="0" max="999" />5313 <label for="position" class="WIEntryHeaderTitleMobile" data-i18n="Position:">Position:</label>
5392 </div>5314 <select name="position" class="text_pole widthNatural margin0" data-i18n="[title]T_Position" title="↑Char: Before Character Definitions&#13;↓Char: After Character Definitions&#13;↑EM: Before Example Messages&#13;↓EM: After Example Messages&#13;↑AN: Before Author's Note&#13;↓AN: After Author's Note&#13;@D ⚙️: at Depth (System)&#13;@D 👤: at Depth (User)&#13;@D 🤖: at Depth (Assistant)">
5393 <div class="world_entry_form_control wi-enter-footer-text flex-container flexNoGap">5315 <option value="0" data-role="" data-i18n="Before Char Defs">
5394 <label for="order" class="WIEntryHeaderTitleMobile" data-i18n="Order:">Order:</label>5316 ↑Char
5395 <input title="Order" data-i18n="[title]Order" class="text_pole wideMax100px margin0" type="number" name="order" placeholder="" min="0" max="999" />5317 </option>
5396 </div>5318 <option value="1" data-role="" data-i18n="After Char Defs">
5397 <div class="world_entry_form_control wi-enter-footer-text flex-container flexNoGap probabilityContainer">5319 ↓Char
5398 <label for="order" class="WIEntryHeaderTitleMobile" data-i18n="Trigger %:">Trigger %:</label>5320 </option>
5399 <input title="Probability" data-i18n="[title]Probability" class="text_pole wideMax100px margin0" type="number" name="probability" placeholder="" min="0" max="100" />5321 <option value="5" data-role="" data-i18n="Before EM">
5400 </div>5322 ↑EM
5401 </div>5323 </option>
5402 </div>5324 <option value="6" data-role="" data-i18n="After EM">
5403 </div>5325 ↓EM
5404 <i class="menu_button duplicate_entry_button fa-solid fa-paste" title="Duplicate world info entry" data-i18n="[title]Duplicate world info entry" type="submit" value=""></i>5326 </option>
5405 <i class="menu_button delete_entry_button fa-solid fa-trash-can" title="Delete world info entry" data-i18n="[title]Delete world info entry" type="submit" value=""></i>5327 <option value="2" data-role="" data-i18n="Before AN">
5406 </div>5328 ↑AN
5407 <div class="inline-drawer-content flex-container paddingBottom5px wide100p">5329 </option>
5408 <div class="flex-container wide100p alignitemscenter">5330 <option value="3" data-role="" data-i18n="After AN">
5409 <div name="keywordsAndLogicBlock" class="flex-container wide100p alignitemscenter">5331 ↓AN
5410 <div class="world_entry_form_control flex1">5332 </option>
5411 <small class="displayNone">5333 <option value="4" data-role="0" data-i18n="at Depth System">
5412 <span data-i18n="Comma separated (required)">5334 @D ⚙️
5413 Comma separated (required)5335 </option>
5414 </span>5336 <option value="4" data-role="1" data-i18n="at Depth User">
5415 </small>5337 @D 👤
5416 <small class="textAlignCenter" data-i18n="Primary Keywords">Primary Keywords</small>5338 </option>
5417 <select class="keyprimaryselect keyselect select2_multi_sameline" name="key" data-i18n="[placeholder]Keywords or Regexes" placeholder="Keywords or Regexes" multiple="multiple"></select>5339 <option value="4" data-role="2" data-i18n="at Depth AI">
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>5340 @D 🤖
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">5341 </option>
5420 ⌨️5342 </select>
5421 </button>5343 </div>
5422 </div>5344 <div class="world_entry_form_control wi-enter-footer-text flex-container flexNoGap">
5423 <div class="world_entry_form_control">5345 <label for="depth" class="WIEntryHeaderTitleMobile" data-i18n="Depth:">Depth:</label>
5424 <small class="textAlignCenter" data-i18n="Logic">Logic</small>5346 <input title="Depth" class="text_pole wideMax100px margin0" type="number" name="depth" data-i18n="[title]Depth" placeholder="" min="0" max="999" />
5425 <select name="entryLogicType" class="text_pole widthFitContent margin0">5347 </div>
5426 <option value="0" data-i18n="AND ANY">AND ANY</option>5348 <div class="world_entry_form_control wi-enter-footer-text flex-container flexNoGap">
5427 <option value="3" data-i18n="AND ALL">AND ALL</option>5349 <label for="order" class="WIEntryHeaderTitleMobile" data-i18n="Order:">Order:</label>
5428 <option value="1" data-i18n="NOT ALL">NOT ALL</option>5350 <input title="Order" data-i18n="[title]Order" class="text_pole wideMax100px margin0" type="number" name="order" placeholder="" min="0" max="999" />
5429 <option value="2" data-i18n="NOT ANY">NOT ANY</option>5351 </div>
5430 </select>5352 <div class="world_entry_form_control wi-enter-footer-text flex-container flexNoGap probabilityContainer">
5431 </div>5353 <label for="order" class="WIEntryHeaderTitleMobile" data-i18n="Trigger %:">Trigger %:</label>
5432 <div class="world_entry_form_control keysecondary flex1">5354 <input title="Probability" data-i18n="[title]Probability" class="text_pole wideMax100px margin0" type="number" name="probability" placeholder="" min="0" max="100" />
5433 <small class="displayNone">5355 </div>
5434 <span data-i18n="(ignored if empty)">5356 </div>
5435 (ignored if empty)
5436 </span>
5437 </small>
5438 <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>
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>
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">
5442 ⌨️
5443 </button>
5444 </div>
5445 </div>
5446 <div name="perEntryOverridesBlock" class="flex-container wide100p alignitemscenter">
5447 <div class="world_entry_form_control flex1">
5448 <small class="textAlignCenter" data-i18n="Scan Depth">Scan Depth</small>
5449 <input class="text_pole margin0" name="scanDepth" type="number" placeholder="Use global setting" data-i18n="[placeholder]Use global setting" max="1000">
5450 </div>
5451 <div class="world_entry_form_control flex1">
5452 <small class="textAlignCenter" data-i18n="Case-Sensitive">Case-Sensitive</small>
5453 <select name="caseSensitive" class="text_pole widthNatural margin0">
5454 <option value="null" data-i18n="Use global setting">Use global setting</option>
5455 <option value="true" data-i18n="Yes">Yes</option>
5456 <option value="false" data-i18n="No">No</option>
5457 </select>
5458 </div>
5459 <div class="world_entry_form_control flex1">
5460 <small class="textAlignCenter" data-i18n="Match Whole Words">Match Whole Words</small>
5461 <select name="matchWholeWords" class="text_pole widthNatural margin0">
5462 <option value="null" data-i18n="Use global setting">Use global setting</option>
5463 <option value="true" data-i18n="Yes">Yes</option>
5464 <option value="false" data-i18n="No">No</option>
5465 </select>
5466 </div>
5467 <div class="world_entry_form_control flex1">
5468 <small class="textAlignCenter" data-i18n="Use Group Scoring">Use Group Scoring</small>
5469 <select name="useGroupScoring" class="text_pole widthNatural margin0">
5470 <option value="null" data-i18n="Use global setting">Use global setting</option>
5471 <option value="true" data-i18n="Yes">Yes</option>
5472 <option value="false" data-i18n="No">No</option>
5473 </select>
5474 </div>
5475 <div class="world_entry_form_control flex1" title="Can be used to automatically activate Quick Replies" data-i18n="[title]Can be used to automatically activate Quick Replies">
5476 <small class="textAlignCenter" data-i18n="Automation ID">Automation ID</small>
5477 <input class="text_pole margin0" name="automationId" type="text" placeholder="( None )" data-i18n="[placeholder]( None )">
5478 </div>5357 </div>
5479 </div>5358 </div>
5480 <div name="contentAndCharFilterBlock" class="world_entry_thin_controls flex2">5359 <i class="menu_button duplicate_entry_button fa-solid fa-paste" title="Duplicate world info entry" data-i18n="[title]Duplicate world info entry" type="submit" value=""></i>
5481 <div class="world_entry_form_control flex1">5360 <i class="menu_button delete_entry_button fa-solid fa-trash-can" title="Delete world info entry" data-i18n="[title]Delete world info entry" type="submit" value=""></i>
5482 <label for="content ">5361 </div>
5483 <small>5362 <div class="inline-drawer-content flex-container paddingBottom5px wide100p">
5484 <span class="alignitemscenter flex-container flexnowrap wide100p justifySpaceBetween">5363 <div class="flex-container wide100p alignitemscenter">
5485 <span data-i18n="Content" class="alignitemscenter flex-container flexNoGap">5364 <div name="keywordsAndLogicBlock" class="flex-container wide100p alignitemscenter">
5486 Content5365 <div class="world_entry_form_control flex1">
5487 </span>5366 <small class="displayNone">
5488 <span>5367 <span data-i18n="Comma separated (required)">
5489 (<span data-i18n="extension_token_counter">Tokens:</span>&nbsp; <span class="world_entry_form_token_counter" data-first-run="true">counting...</span>)&nbsp;5368 Comma separated (required)
5490 <span class="world_entry_form_uid_value" data-first-run="true"></span>
5491 </span>
5492 <div>
5493 <label class="checkbox flex-container alignitemscenter flexNoGap">
5494 <input type="checkbox" name="exclude_recursion" />
5495 <span data-i18n="Exclude from recursion">
5496 Non-recursable (this entry will not be activated by another)
5497 </span>
5498 </label>
5499 <label class="checkbox flex-container alignitemscenter flexNoGap">
5500 <input type="checkbox" name="prevent_recursion" />
5501 <span data-i18n="Prevent further recursion (this entry will not activate others)">
5502 Prevent further recursion (this entry will not activate others)
5503 </span>
5504 </label>
5505 <label class="checkbox flex-container alignitemscenter flexNoGap">
5506 <input type="checkbox" name="delay_until_recursion" />
5507 <span data-i18n="Delay until recursion (this entry can only be activated on recursive checking)">
5508 Delay until recursion (this entry can only be activated on recursive checking)
5509 </span>
5510 </label>
5511 </div>
5512 </span>5369 </span>
5513 </small>5370 </small>
5371 <small class="textAlignCenter" data-i18n="Primary Keywords">Primary Keywords</small>
5372 <select class="keyprimaryselect keyselect select2_multi_sameline" name="key" data-i18n="[placeholder]Keywords or Regexes" placeholder="Keywords or Regexes" multiple="multiple"></select>
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>
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">
5375 ⌨️
5376 </button>
5377 </div>
5378 <div class="world_entry_form_control">
5379 <small class="textAlignCenter" data-i18n="Logic">Logic</small>
5380 <select name="entryLogicType" class="text_pole widthFitContent margin0">
5381 <option value="0" data-i18n="AND ANY">AND ANY</option>
5382 <option value="3" data-i18n="AND ALL">AND ALL</option>
5383 <option value="1" data-i18n="NOT ALL">NOT ALL</option>
5384 <option value="2" data-i18n="NOT ANY">NOT ANY</option>
5385 </select>
5386 </div>
5387 <div class="world_entry_form_control keysecondary flex1">
5514 <small class="displayNone">5388 <small class="displayNone">
5515 <span data-i18n="What this keyword should mean to the AI, sent verbatim">5389 <span data-i18n="(ignored if empty)">
5516 What this keyword should mean to the AI, sent verbatim5390 (ignored if empty)
5517 </span>5391 </span>
5518 </small>5392 </small>
5519 </label>5393 <small class="textAlignCenter" data-i18n="Optional Filter">Optional Filter</small>
5520 <textarea class="text_pole" name="content" rows="8" data-i18n="[placeholder]What this keyword should mean to the AI, sent verbatim" placeholder="What this keyword should mean to the AI, sent verbatim"></textarea>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>
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>
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">
5397 ⌨️
5398 </button>
5399 </div>
5400 </div>
5401 <div name="perEntryOverridesBlock" class="flex-container wide100p alignitemscenter">
5402 <div class="world_entry_form_control flex1">
5403 <small class="textAlignCenter" data-i18n="Scan Depth">Scan Depth</small>
5404 <input class="text_pole margin0" name="scanDepth" type="number" placeholder="Use global setting" data-i18n="[placeholder]Use global setting" max="1000">
5405 </div>
5406 <div class="world_entry_form_control flex1">
5407 <small class="textAlignCenter" data-i18n="Case-Sensitive">Case-Sensitive</small>
5408 <select name="caseSensitive" class="text_pole widthNatural margin0">
5409 <option value="null" data-i18n="Use global setting">Use global setting</option>
5410 <option value="true" data-i18n="Yes">Yes</option>
5411 <option value="false" data-i18n="No">No</option>
5412 </select>
5413 </div>
5414 <div class="world_entry_form_control flex1">
5415 <small class="textAlignCenter" data-i18n="Match Whole Words">Match Whole Words</small>
5416 <select name="matchWholeWords" class="text_pole widthNatural margin0">
5417 <option value="null" data-i18n="Use global setting">Use global setting</option>
5418 <option value="true" data-i18n="Yes">Yes</option>
5419 <option value="false" data-i18n="No">No</option>
5420 </select>
5421 </div>
5422 <div class="world_entry_form_control flex1">
5423 <small class="textAlignCenter" data-i18n="Use Group Scoring">Use Group Scoring</small>
5424 <select name="useGroupScoring" class="text_pole widthNatural margin0">
5425 <option value="null" data-i18n="Use global setting">Use global setting</option>
5426 <option value="true" data-i18n="Yes">Yes</option>
5427 <option value="false" data-i18n="No">No</option>
5428 </select>
5429 </div>
5430 <div class="world_entry_form_control flex1" title="Can be used to automatically activate Quick Replies" data-i18n="[title]Can be used to automatically activate Quick Replies">
5431 <small class="textAlignCenter" data-i18n="Automation ID">Automation ID</small>
5432 <input class="text_pole margin0" name="automationId" type="text" placeholder="( None )" data-i18n="[placeholder]( None )">
5433 </div>
5521 </div>5434 </div>
5522 </div>5435 <div name="contentAndCharFilterBlock" class="world_entry_thin_controls flex2">
5523 <div class="world_entry_thin_controls commentContainer">5436 <div class="world_entry_form_control flex1">
5524 </div>5437 <label for="content ">
5525 </div>5438 <small>
5526 <div class="flex-container wide100p flexGap10">5439 <span class="alignitemscenter flex-container flexnowrap wide100p justifySpaceBetween">
5527 <div class="flex4 flex-container flexFlowColumn flexNoGap">5440 <span data-i18n="Content" class="alignitemscenter flex-container flexNoGap">
5528 <div class="flex-container justifySpaceBetween">5441 Content
5529 <small for="group">5442 </span>
5530 <span data-i18n="Inclusion Group">Inclusion Group</span>5443 <span>
5531 <a href="https://docs.sillytavern.app/usage/core-concepts/worldinfo/#inclusion-group" class="notes-link" target="_blank" title="Inclusion Groups ensure only one entry from a group is activated at a time, if multiple are triggered.&#13;Supports multiple comma-separated groups.&#13;&#13;Documentation: World Info - Inclusion Group" data-i18n="[title]Inclusion Groups ensure only one entry from a group is activated at a time, if multiple are triggered.Documentation: World Info - Inclusion Group">5444 (<span data-i18n="extension_token_counter">Tokens:</span>&nbsp; <span class="world_entry_form_token_counter" data-first-run="true">counting...</span>)&nbsp;
5532 <span class="fa-solid fa-circle-question note-link-span"></span>5445 <span class="world_entry_form_uid_value" data-first-run="true"></span>
5533 </a>5446 </span>
5534 </small>5447 <div>
5535 <label class="checkbox_label flexNoGap margin-r5" for="groupOverride">5448 <label class="checkbox flex-container alignitemscenter flexNoGap">
5536 <input type="checkbox" name="groupOverride" />5449 <input type="checkbox" name="exclude_recursion" />
5537 <span>5450 <span data-i18n="Exclude from recursion">
5538 <small title="Prioritize this entry: When checked, this entry is prioritized out of all selections.&#13;If multiple are prioritized, the one with the highest 'Order' is chosen.&#13;" data-i18n="[title]Prioritize this entry: When checked, this entry is prioritized out of all selections.If multiple are prioritized, the one with the highest 'Order' is chosen.">5451 Non-recursable (this entry will not be activated by another)
5539 <span data-i18n="Prioritize">Prioritize</span>5452 </span>
5540 <div class="fa-solid fa-circle-info opacity50p"></div>5453 </label>
5454 <label class="checkbox flex-container alignitemscenter flexNoGap">
5455 <input type="checkbox" name="prevent_recursion" />
5456 <span data-i18n="Prevent further recursion (this entry will not activate others)">
5457 Prevent further recursion (this entry will not activate others)
5458 </span>
5459 </label>
5460 <label class="checkbox flex-container alignitemscenter flexNoGap">
5461 <input type="checkbox" name="delay_until_recursion" />
5462 <span data-i18n="Delay until recursion (this entry can only be activated on recursive checking)">
5463 Delay until recursion (this entry can only be activated on recursive checking)
5464 </span>
5465 </label>
5466 </div>
5467 </span>
5541 </small>5468 </small>
5542 </span>5469 <small class="displayNone">
5543 </label>5470 <span data-i18n="What this keyword should mean to the AI, sent verbatim">
5471 What this keyword should mean to the AI, sent verbatim
5472 </span>
5473 </small>
5474 </label>
5475 <textarea class="text_pole" name="content" rows="8" data-i18n="[placeholder]What this keyword should mean to the AI, sent verbatim" placeholder="What this keyword should mean to the AI, sent verbatim"></textarea>
5476 </div>
5544 </div>5477 </div>
5545 <div class="range-block-range">5478 <div class="world_entry_thin_controls commentContainer">
5546 <input type="text" class="text_pole margin0" name="group" rows="1" data-i18n="[placeholder]Only one entry with the same label will be activated" placeholder="Only one entry with the same label will be activated">
5547 </div>5479 </div>
5548 </div>5480 </div>
5549 <div class="flex2 flex-container flexFlowColumn flexNoGap" data-i18n="[title]A relative likelihood of entry activation within the group" title="A relative likelihood of entry activation within the group">5481 <div class="flex-container wide100p flexGap10">
5550 <div class="flex-container justifySpaceBetween marginBot5">5482 <div class="flex4 flex-container flexFlowColumn flexNoGap">
5551 <small for="groupWeight" data-i18n="Group Weight">5483 <div class="flex-container justifySpaceBetween">
5552 Group Weight5484 <small for="group">
5553 </small>5485 <span data-i18n="Inclusion Group">Inclusion Group</span>
5554 </div>5486 <a href="https://docs.sillytavern.app/usage/core-concepts/worldinfo/#inclusion-group" class="notes-link" target="_blank" title="Inclusion Groups ensure only one entry from a group is activated at a time, if multiple are triggered.&#13;Supports multiple comma-separated groups.&#13;&#13;Documentation: World Info - Inclusion Group" data-i18n="[title]Inclusion Groups ensure only one entry from a group is activated at a time, if multiple are triggered.Documentation: World Info - Inclusion Group">
5555 <div class="range-block-range">5487 <span class="fa-solid fa-circle-question note-link-span"></span>
5556 <input type="number" class="text_pole margin0" name="groupWeight" rows="1" placeholder="100" min="1" max="999999">5488 </a>
5489 </small>
5490 <label class="checkbox_label flexNoGap margin-r5" for="groupOverride">
5491 <input type="checkbox" name="groupOverride" />
5492 <span>
5493 <small title="Prioritize this entry: When checked, this entry is prioritized out of all selections.&#13;If multiple are prioritized, the one with the highest 'Order' is chosen.&#13;" data-i18n="[title]Prioritize this entry: When checked, this entry is prioritized out of all selections.If multiple are prioritized, the one with the highest 'Order' is chosen.">
5494 <span data-i18n="Prioritize">Prioritize</span>
5495 <div class="fa-solid fa-circle-info opacity50p"></div>
5496 </small>
5497 </span>
5498 </label>
5499 </div>
5500 <div class="range-block-range">
5501 <input type="text" class="text_pole margin0" name="group" rows="1" data-i18n="[placeholder]Only one entry with the same label will be activated" placeholder="Only one entry with the same label will be activated">
5502 </div>
5557 </div>5503 </div>
5558 </div>5504 <div class="flex2 flex-container flexFlowColumn flexNoGap" data-i18n="[title]A relative likelihood of entry activation within the group" title="A relative likelihood of entry activation within the group">
5559 <div class="flex2 flex-container flexFlowColumn flexNoGap" data-i18n="[title]Sticky entries will stay active for N messages after being triggered." title="Sticky entries will stay active for N messages after being triggered.">5505 <div class="flex-container justifySpaceBetween marginBot5">
5560 <div class="flex-container justifySpaceBetween marginBot5">5506 <small for="groupWeight" data-i18n="Group Weight">
5561 <small class="flex-container alignItemsBaseline" for="sticky" data-i18n="Sticky">5507 Group Weight
5562 <span data-i18n="Sticky">5508 </small>
5563 Sticky5509 </div>
5564 </span>5510 <div class="range-block-range">
5565 <i class="fa-solid fa-comments fa-xs"></i>5511 <input type="number" class="text_pole margin0" name="groupWeight" rows="1" placeholder="100" min="1" max="999999">
5566 </small>5512 </div>
5567 </div>5513 </div>
5568 <div class="range-block-range">5514 <div class="flex2 flex-container flexFlowColumn flexNoGap" data-i18n="[title]Sticky entries will stay active for N messages after being triggered." title="Sticky entries will stay active for N messages after being triggered.">
5569 <input class="text_pole margin0" name="sticky" type="number" placeholder="Non-sticky" min="0" max="999999">5515 <div class="flex-container justifySpaceBetween marginBot5">
5516 <small class="flex-container alignItemsBaseline" for="sticky" data-i18n="Sticky">
5517 <span data-i18n="Sticky">
5518 Sticky
5519 </span>
5520 <i class="fa-solid fa-comments fa-xs"></i>
5521 </small>
5522 </div>
5523 <div class="range-block-range">
5524 <input class="text_pole margin0" name="sticky" type="number" placeholder="Non-sticky" min="0" max="999999">
5525 </div>
5570 </div>5526 </div>
5571 </div>5527 <div class="flex2 flex-container flexFlowColumn flexNoGap" data-i18n="[title]Entries with a cooldown can't be activated N messages after being triggered." title="Entries with a cooldown can't be activated N messages after being triggered.">
5572 <div class="flex2 flex-container flexFlowColumn flexNoGap" data-i18n="[title]Entries with a cooldown can't be activated N messages after being triggered." title="Entries with a cooldown can't be activated N messages after being triggered.">5528 <div class="flex-container justifySpaceBetween marginBot5">
5573 <div class="flex-container justifySpaceBetween marginBot5">5529 <small class="flex-container alignItemsBaseline" for="cooldown" data-i18n="Cooldown">
5574 <small class="flex-container alignItemsBaseline" for="cooldown" data-i18n="Cooldown">5530 <span data-i18n="Cooldown">
5575 <span data-i18n="Cooldown">5531 Cooldown
5576 Cooldown5532 </span>
5577 </span>5533 <i class="fa-solid fa-comments fa-xs"></i>
5578 <i class="fa-solid fa-comments fa-xs"></i>5534 </small>
5579 </small>5535 </div>
5536 <div class="range-block-range">
5537 <input class="text_pole margin0" name="cooldown" type="number" placeholder="No cooldown" min="0" max="999999">
5538 </div>
5580 </div>5539 </div>
5581 <div class="range-block-range">5540 <div class="flex2 flex-container flexFlowColumn flexNoGap" data-i18n="[title]Entries with a delay can't be activated until there are N messages present in the chat." title="Entries with a delay can't be activated until there are N messages present in the chat.">
5582 <input class="text_pole margin0" name="cooldown" type="number" placeholder="No cooldown" min="0" max="999999">5541 <div class="flex-container justifySpaceBetween marginBot5">
5542 <small class="flex-container alignItemsBaseline" for="delay" data-i18n="Delay">
5543 <span data-i18n="Delay">
5544 Delay
5545 </span>
5546 <i class="fa-solid fa-comments fa-xs"></i>
5547 </small>
5548 </div>
5549 <div class="range-block-range">
5550 <input class="text_pole margin0" name="delay" type="number" placeholder="No delay" min="0" max="999999">
5551 </div>
5583 </div>5552 </div>
5584 </div>5553 </div>
5585 <div class="flex2 flex-container flexFlowColumn flexNoGap" data-i18n="[title]Entries with a delay can't be activated until there are N messages present in the chat." title="Entries with a delay can't be activated until there are N messages present in the chat.">5554 <div class="flex-container wide100p flexGap10">
5586 <div class="flex-container justifySpaceBetween marginBot5">5555 <div class="flex4 flex-container flexFlowColumn flexNoGap">
5587 <small class="flex-container alignItemsBaseline" for="delay" data-i18n="Delay">5556 <div class="flex-container justifySpaceBetween">
5588 <span data-i18n="Delay">5557 <small for="characterFilter" data-i18n="Filter to Character(s)">
5589 Delay5558 Filter to Character(s)
5590 </span>5559 </small>
5591 <i class="fa-solid fa-comments fa-xs"></i>5560 <label class="checkbox_label flexNoGap margin-r5" for="character_exclusion">
5592 </small>5561 <input type="checkbox" name="character_exclusion" />
5593 </div>5562 <span>
5594 <div class="range-block-range">5563 <small data-i18n="Character Exclusion">Character Exclusion</small>
5595 <input class="text_pole margin0" name="delay" type="number" placeholder="No delay" min="0" max="999999">5564 </span>
5565 </label>
5566 </div>
5567 <div class="range-block-range">
5568 <select name="characterFilter" class="select2_multi_sameline" multiple>
5569 <option value="">
5570 <span data-i18n="-- Characters not found --">-- Characters not found --</span>
5571 </option>
5572 </select>
5573 </div>
5596 </div>5574 </div>
5597 </div>5575 </div>
5598 </div>5576 <div name="WIEntryBottomControls" class="flex-container flex1 justifySpaceBetween world_entry_form_horizontal">
5599 <div class="flex-container wide100p flexGap10">5577 <div class="flex-container flexFlowColumn flexNoGap wi-enter-footer-text ">
5600 <div class="flex4 flex-container flexFlowColumn flexNoGap">5578 <label class="checkbox flex-container">
5601 <div class="flex-container justifySpaceBetween">5579 <input type="checkbox" name="selective" />
5602 <small for="characterFilter" data-i18n="Filter to Characters or Tags">5580 <span data-i18n="Selective">Selective</span>
5603 Filter to Characters or Tags5581 </label>
5604 </small>5582 <label class="checkbox flex-container">
5605 <label class="checkbox_label flexNoGap margin-r5" for="character_exclusion">5583 <input type="checkbox" name="useProbability" />
5606 <input type="checkbox" name="character_exclusion" />5584 <span data-i18n="Use Probability">Use Probability</span>
5607 <span>5585 </label>
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">5586 <label class="checkbox flex-container">
5609 <span data-i18n="Exclude">Exclude</span>5587 <input type="checkbox" name="addMemo">
5610 <div class="fa-solid fa-circle-info opacity50p"></div>5588 <span data-i18n="Add Memo">Add Memo</span>
5611 </small>
5612 </span>
5613 </label>5589 </label>
5614 </div>5590 </div>
5615 <div class="range-block-range">
5616 <select name="characterFilter" class="select2_multi_sameline" multiple>
5617 <option value="">
5618 <span data-i18n="-- Characters not found --">-- Characters not found --</span>
5619 </option>
5620 </select>
5621 </div>
5622 </div>
5623 </div>
5624 <div name="WIEntryBottomControls" class="flex-container flex1 justifySpaceBetween world_entry_form_horizontal">
5625 <div class="flex-container flexFlowColumn flexNoGap wi-enter-footer-text ">
5626 <label class="checkbox flex-container">
5627 <input type="checkbox" name="selective" />
5628 <span data-i18n="Selective">Selective</span>
5629 </label>
5630 <label class="checkbox flex-container">
5631 <input type="checkbox" name="useProbability" />
5632 <span data-i18n="Use Probability">Use Probability</span>
5633 </label>
5634 <label class="checkbox flex-container">
5635 <input type="checkbox" name="addMemo">
5636 <span data-i18n="Add Memo">Add Memo</span>
5637 </label>
5638 </div>5591 </div>
5639 </div>5592 </div>
5640 </div>5593 </div>
5641 </div>5594 </form>
5642 </form>
5643 </div>
5644 </div>
5645 <div id="character_template" class="template_element">
5646 <div class="character_select entity_block flex-container wide100p alignitemsflexstart" chid="" id="">
5647 <div class="avatar" title="">
5648 <img src="">
5649 </div>5595 </div>
5650 <div class="flex-container wide100pLess70px character_select_container">5596 </div>
5651 <div class="wide100p character_name_block">5597 <div id="character_template" class="template_element">
5652 <span class="ch_name"></span>5598 <div class="character_select entity_block flex-container wide100p alignitemsflexstart" chid="" id="">
5653 <small class="ch_additional_info ch_add_placeholder">+++</small>5599 <div class="avatar" title="">
5654 <small class="ch_additional_info character_version"></small>5600 <img src="">
5655 <small class="ch_additional_info ch_avatar_url"></small>5601 </div>
5602 <div class="flex-container wide100pLess70px character_select_container">
5603 <div class="wide100p character_name_block">
5604 <span class="ch_name"></span>
5605 <small class="ch_additional_info ch_add_placeholder">+++</small>
5606 <small class="ch_additional_info character_version"></small>
5607 <small class="ch_additional_info ch_avatar_url"></small>
5608 </div>
5609 <i class="ch_fav_icon fa-solid fa-star"></i>
5610 <input class="ch_fav" value="" hidden />
5611 <div class="ch_description"></div>
5612 <div class="tags tags_inline"></div>
5656 </div>5613 </div>
5657 <i class="ch_fav_icon fa-solid fa-star"></i>
5658 <input class="ch_fav" value="" hidden />
5659 <div class="ch_description"></div>
5660 <div class="tags tags_inline"></div>
5661 </div>5614 </div>
5662 </div>5615 </div>
5663 </div>5616 <div id="tag_template" class="template_element">
5664 <div id="tag_template" class="template_element">5617 <span id="" class="tag">
5665 <span id="" class="tag">5618 <span class="tag_name"></span>
5666 <span class="tag_name"></span>5619 <i class="fa-solid fa-circle-xmark tag_remove"></i>
5667 <i class="fa-solid fa-circle-xmark tag_remove"></i>5620 </span>
5668 </span>
5669 </div>
5670 <div id="openai_logit_bias_template" class="template_element">
5671 <div class="openai_logit_bias_form">
5672 <input class="openai_logit_bias_text text_pole" data-i18n="[placeholder]Text or token ids" placeholder="Text or [token ids]" />
5673 <input class="openai_logit_bias_value text_pole" type="number" min="-100" value="0" max="100" />
5674 <i class="menu_button fa-solid fa-xmark openai_logit_bias_remove"></i>
5675 </form>
5676 </div>
5677 </div>
5678 <div id="logit_bias_template" class="template_element">
5679 <div class="logit_bias_form">
5680 <input class="logit_bias_text text_pole" data-i18n="[placeholder]Type here..." placeholder="type here..." />
5681 <input class="logit_bias_value text_pole" type="number" min="-100" value="0" max="100" step="0.01" />
5682 <i class="menu_button fa-solid fa-xmark logit_bias_remove"></i>
5683 </div>5621 </div>
5684 </div>5622 <div id="openai_logit_bias_template" class="template_element">
5685 <div id="completion_prompt_manager_popup" class="drawer-content" style="display:none;">5623 <div class="openai_logit_bias_form">
5686 <div id="completion_prompt_manager_popup_inspect">5624 <input class="openai_logit_bias_text text_pole" data-i18n="[placeholder]Text or token ids" placeholder="Text or [token ids]" />
5687 <h3>Inspect</h3>5625 <input class="openai_logit_bias_value text_pole" type="number" min="-100" value="0" max="100" />
5688 <div class="completion_prompt_manager_popup_entry">5626 <i class="menu_button fa-solid fa-xmark openai_logit_bias_remove"></i>
5689 <form class="completion_prompt_manager_popup_entry_form">
5690 <div class="completion_prompt_manager_popup_entry_form_control">
5691 <div class="completion_prompt_manager_popup_header">
5692 <label for="completion_prompt_manager_popup_entry_form_prompt">
5693 <span>Prompt List</span>
5694 </label>
5695 <a id="completion_prompt_manager_popup_close_button" title="close" data-i18n="[title]close" class="fa-solid fa-close menu_button"></a>
5696 </div>
5697 <div class="text_muted">The list of prompts associated with this marker.</div>
5698 <div id="completion_prompt_manager_popup_entry_form_inspect_list"></div>
5699 </div>
5700 </form>5627 </form>
5701 </div>5628 </div>
5702 </div>5629 </div>
5703 <div id="completion_prompt_manager_popup_edit">5630 <div id="logit_bias_template" class="template_element">
5704 <h3 data-i18n="prompt_manager_edit">Edit</h3>5631 <div class="logit_bias_form">
5705 <div class="completion_prompt_manager_popup_entry">5632 <input class="logit_bias_text text_pole" data-i18n="[placeholder]Type here..." placeholder="type here..." />
5706 <form class="completion_prompt_manager_popup_entry_form">5633 <input class="logit_bias_value text_pole" type="number" min="-100" value="0" max="100" step="0.01" />
5707 <div class="flex-container gap10px">5634 <i class="menu_button fa-solid fa-xmark logit_bias_remove"></i>
5708 <div class="completion_prompt_manager_popup_entry_form_control flex1">5635 </div>
5709 <label for="completion_prompt_manager_popup_entry_form_name">5636 </div>
5710 <span data-i18n="prompt_manager_name">Name</span>5637 <div id="completion_prompt_manager_popup" class="drawer-content" style="display:none;">
5711 </label>5638 <div id="completion_prompt_manager_popup_inspect">
5712 <div class="text_muted" data-i18n="A name for this prompt.">A name for this prompt.</div>5639 <h3>Inspect</h3>
5713 <input id="completion_prompt_manager_popup_entry_form_name" class="text_pole" type="text" name="name" />5640 <div class="completion_prompt_manager_popup_entry">
5714 </div>5641 <form class="completion_prompt_manager_popup_entry_form">
5715 <div class="completion_prompt_manager_popup_entry_form_control flex1">5642 <div class="completion_prompt_manager_popup_entry_form_control">
5716 <label for="completion_prompt_manager_popup_entry_form_role">5643 <div class="completion_prompt_manager_popup_header">
5717 <span data-i18n="Role">Role</span>5644 <label for="completion_prompt_manager_popup_entry_form_prompt">
5718 </label>5645 <span>Prompt List</span>
5719 <div class="text_muted" data-i18n="To whom this message will be attributed.">To whom this message will be attributed.</div>5646 </label>
5720 <select id="completion_prompt_manager_popup_entry_form_role" class="text_pole" name="role">5647 <a id="completion_prompt_manager_popup_close_button" title="close" data-i18n="[title]close" class="fa-solid fa-close menu_button"></a>
5721 <option data-i18n="System" value="system">System</option>5648 </div>
5722 <option data-i18n="User" value="user">User</option>5649 <div class="text_muted">The list of prompts associated with this marker.</div>
5723 <option data-i18n="AI Assistant" value="assistant">AI Assistant</option>5650 <div id="completion_prompt_manager_popup_entry_form_inspect_list"></div>
5724 </select>
5725 </div>
5726 </div>
5727 <div class="flex-container gap10px">
5728 <div class="completion_prompt_manager_popup_entry_form_control flex1">
5729 <label for="completion_prompt_manager_popup_entry_form_injection_position">
5730 <span data-i18n="prompt_manager_position">Position</span>
5731 </label>
5732 <div class="text_muted" data-i18n="Injection position. Relative (to other prompts in prompt manager) or In-chat @ Depth.">Injection position. Relative (to other prompts in prompt manager) or In-chat @ Depth.</div>
5733 <select id="completion_prompt_manager_popup_entry_form_injection_position" class="text_pole" name="injection_position">
5734 <option data-i18n="prompt_manager_relative" value="0">Relative</option>
5735 <option data-i18n="prompt_manager_in_chat" value="1">In-chat</option>
5736 </select>
5737 </div>5651 </div>
5738 <div id="completion_prompt_manager_depth_block" class="completion_prompt_manager_popup_entry_form_control flex1">5652 </form>
5739 <label for="completion_prompt_manager_popup_entry_form_injection_depth">5653 </div>
5740 <span data-i18n="prompt_manager_depth">Depth</span>5654 </div>
5741 </label>5655 <div id="completion_prompt_manager_popup_edit">
5742 <div class="text_muted" data-i18n="Injection depth. 0 = after the last message, 1 = before the last message, etc.">Injection depth. 0 = after the last message, 1 = before the last message, etc.</div>5656 <h3 data-i18n="prompt_manager_edit">Edit</h3>
5743 <input id="completion_prompt_manager_popup_entry_form_injection_depth" class="text_pole" type="number" name="injection_depth" min="0" max="999" value="4" />5657 <div class="completion_prompt_manager_popup_entry">
5658 <form class="completion_prompt_manager_popup_entry_form">
5659 <div class="flex-container gap10px">
5660 <div class="completion_prompt_manager_popup_entry_form_control flex1">
5661 <label for="completion_prompt_manager_popup_entry_form_name">
5662 <span data-i18n="prompt_manager_name">Name</span>
5663 </label>
5664 <div class="text_muted" data-i18n="A name for this prompt.">A name for this prompt.</div>
5665 <input id="completion_prompt_manager_popup_entry_form_name" class="text_pole" type="text" name="name" />
5666 </div>
5667 <div class="completion_prompt_manager_popup_entry_form_control flex1">
5668 <label for="completion_prompt_manager_popup_entry_form_role">
5669 <span data-i18n="Role">Role</span>
5670 </label>
5671 <div class="text_muted" data-i18n="To whom this message will be attributed.">To whom this message will be attributed.</div>
5672 <select id="completion_prompt_manager_popup_entry_form_role" class="text_pole" name="role">
5673 <option data-i18n="System" value="system">System</option>
5674 <option data-i18n="User" value="user">User</option>
5675 <option data-i18n="AI Assistant" value="assistant">AI Assistant</option>
5676 </select>
5677 </div>
5744 </div>5678 </div>
5745 </div>5679 <div class="flex-container gap10px">
5746 <div class="completion_prompt_manager_popup_entry_form_control">5680 <div class="completion_prompt_manager_popup_entry_form_control flex1">
5747 <div class="flex-container alignItemsCenter">5681 <label for="completion_prompt_manager_popup_entry_form_injection_position">
5748 <div class="flex1">5682 <span data-i18n="prompt_manager_position">Position</span>
5749 <label for="completion_prompt_manager_popup_entry_form_prompt">
5750 <span data-i18n="Prompt">Prompt</span>
5751 </label>5683 </label>
5752 <div class="text_muted" data-i18n="The prompt to be sent.">The prompt to be sent.</div>5684 <div class="text_muted" data-i18n="Injection position. Relative (to other prompts in prompt manager) or In-chat @ Depth.">Injection position. Relative (to other prompts in prompt manager) or In-chat @ Depth.</div>
5685 <select id="completion_prompt_manager_popup_entry_form_injection_position" class="text_pole" name="injection_position">
5686 <option data-i18n="prompt_manager_relative" value="0">Relative</option>
5687 <option data-i18n="prompt_manager_in_chat" value="1">In-chat</option>
5688 </select>
5753 </div>5689 </div>
5754 <div id="completion_prompt_manager_forbid_overrides_block">5690 <div id="completion_prompt_manager_depth_block" class="completion_prompt_manager_popup_entry_form_control flex1">
5755 <label class="checkbox_label" for="completion_prompt_manager_popup_entry_form_forbid_overrides" title="This prompt cannot be overridden by character cards, even if overrides are preferred." data-i18n="[title]This prompt cannot be overridden by character cards, even if overrides are preferred.">5691 <label for="completion_prompt_manager_popup_entry_form_injection_depth">
5756 <input type="checkbox" id="completion_prompt_manager_popup_entry_form_forbid_overrides" name="forbid_overrides" />5692 <span data-i18n="prompt_manager_depth">Depth</span>
5757 <span data-i18n="prompt_manager_forbid_overrides">Forbid Overrides</span>
5758 </label>5693 </label>
5694 <div class="text_muted" data-i18n="Injection depth. 0 = after the last message, 1 = before the last message, etc.">Injection depth. 0 = after the last message, 1 = before the last message, etc.</div>
5695 <input id="completion_prompt_manager_popup_entry_form_injection_depth" class="text_pole" type="number" name="injection_depth" min="0" max="999" value="4" />
5759 </div>5696 </div>
5760 </div>5697 </div>
5761 <textarea id="completion_prompt_manager_popup_entry_form_prompt" class="text_pole" name="prompt">5698 <div class="completion_prompt_manager_popup_entry_form_control">
5699 <div class="flex-container alignItemsCenter">
5700 <div class="flex1">
5701 <label for="completion_prompt_manager_popup_entry_form_prompt">
5702 <span data-i18n="Prompt">Prompt</span>
5703 </label>
5704 <div class="text_muted" data-i18n="The prompt to be sent.">The prompt to be sent.</div>
5705 </div>
5706 <div id="completion_prompt_manager_forbid_overrides_block">
5707 <label class="checkbox_label" for="completion_prompt_manager_popup_entry_form_forbid_overrides" title="This prompt cannot be overridden by character cards, even if overrides are preferred." data-i18n="[title]This prompt cannot be overridden by character cards, even if overrides are preferred.">
5708 <input type="checkbox" id="completion_prompt_manager_popup_entry_form_forbid_overrides" name="forbid_overrides" />
5709 <span data-i18n="prompt_manager_forbid_overrides">Forbid Overrides</span>
5710 </label>
5711 </div>
5712 </div>
5713 <textarea id="completion_prompt_manager_popup_entry_form_prompt" class="text_pole" name="prompt">
5762 </textarea>5714 </textarea>
5763 </div>5715 </div>
5764 <div class="completion_prompt_manager_popup_entry_form_footer">5716 <div class="completion_prompt_manager_popup_entry_form_footer">
5765 <a id="completion_prompt_manager_popup_entry_form_close" title="close" data-i18n="[title]close" class="fa-solid fa-close menu_button"></a>5717 <a id="completion_prompt_manager_popup_entry_form_close" title="close" data-i18n="[title]close" class="fa-solid fa-close menu_button"></a>
5766 <a id="completion_prompt_manager_popup_entry_form_reset" title="reset" data-i18n="[title]reset" class="fa-solid fa-undo menu_button"></a>5718 <a id="completion_prompt_manager_popup_entry_form_reset" title="reset" data-i18n="[title]reset" class="fa-solid fa-undo menu_button"></a>
5767 <a id="completion_prompt_manager_popup_entry_form_save" title="save" data-i18n="[title]save" class="fa-solid fa-save menu_button" data-pm-prompt=""></a>5719 <a id="completion_prompt_manager_popup_entry_form_save" title="save" data-i18n="[title]save" class="fa-solid fa-save menu_button" data-pm-prompt=""></a>
5768 </div>5720 </div>
5769 </form>5721 </form>
5722 </div>
5770 </div>5723 </div>
5771 </div>5724 </div>
5772 </div>5725 <div id="message_template" class="template_element">
5773 <div id="message_template" class="template_element">5726 <div class="mes" mesid="" ch_name="" is_user="" is_system="" bookmark_link="">
5774 <div class="mes" mesid="" ch_name="" is_user="" is_system="" bookmark_link="">5727 <div class="for_checkbox"></div><input type="checkbox" class="del_checkbox">
5775 <div class="for_checkbox"></div><input type="checkbox" class="del_checkbox">5728 <div class="mesAvatarWrapper">
5776 <div class="mesAvatarWrapper">5729 <div class="avatar">
5777 <div class="avatar">5730 <img src="">
5778 <img src="">5731 </div>
5732 <div class="mesIDDisplay"></div>
5733 <div class="mes_timer"></div>
5734 <div class="tokenCounterDisplay"></div>
5779 </div>5735 </div>
5780 <div class="mesIDDisplay"></div>5736 <div class="swipe_left fa-solid fa-chevron-left" style="display: none;"></div>
5781 <div class="mes_timer"></div>5737 <div class="mes_block">
5782 <div class="tokenCounterDisplay"></div>5738 <div class="ch_name flex-container justifySpaceBetween">
5783 </div>5739 <div class="flex-container flex1 alignitemscenter">
5784 <div class="swipe_left fa-solid fa-chevron-left" style="display: none;"></div>5740 <div class="flex-container alignItemsBaseline">
5785 <div class="mes_block">5741 <span class="name_text">${characterName}</span>
5786 <div class="ch_name flex-container justifySpaceBetween">5742 <i class="mes_ghost fa-solid fa-ghost" title="This message is invisible for the AI" data-i18n="[title]This message is invisible for the AI"></i>
5787 <div class="flex-container flex1 alignitemscenter">5743 <small class="timestamp"></small>
5788 <div class="flex-container alignItemsBaseline">5744 </div>
5789 <span class="name_text">${characterName}</span>
5790 <i class="mes_ghost fa-solid fa-ghost" title="This message is invisible for the AI" data-i18n="[title]This message is invisible for the AI"></i>
5791 <small class="timestamp"></small>
5792 </div>5745 </div>
5793 </div>5746 <div class="mes_buttons">
5794 <div class="mes_buttons">5747 <div title="Message Actions" class="mes_button extraMesButtonsHint fa-solid fa-ellipsis" data-i18n="[title]Message Actions"></div>
5795 <div title="Message Actions" class="mes_button extraMesButtonsHint fa-solid fa-ellipsis" data-i18n="[title]Message Actions"></div>5748 <div class="extraMesButtons">
5796 <div class="extraMesButtons">5749 <div title="Translate message" class="mes_button mes_translate fa-solid fa-language" data-i18n="[title]Translate message"></div>
5797 <div title="Translate message" class="mes_button mes_translate fa-solid fa-language" data-i18n="[title]Translate message"></div>5750 <div title="Generate Image" class="mes_button sd_message_gen fa-solid fa-paintbrush" data-i18n="[title]Generate Image"></div>
5798 <div title="Generate Image" class="mes_button sd_message_gen fa-solid fa-paintbrush" data-i18n="[title]Generate Image"></div>5751 <div title="Narrate" class="mes_button mes_narrate fa-solid fa-bullhorn" data-i18n="[title]Narrate"></div>
5799 <div title="Narrate" class="mes_button mes_narrate fa-solid fa-bullhorn" data-i18n="[title]Narrate"></div>5752 <div title="Prompt" class="mes_button mes_prompt fa-solid fa-square-poll-horizontal " data-i18n="[title]Prompt" style="display: none;"></div>
5800 <div title="Prompt" class="mes_button mes_prompt fa-solid fa-square-poll-horizontal " data-i18n="[title]Prompt" style="display: none;"></div>5753 <div title="Exclude message from prompts" class="mes_button mes_hide fa-solid fa-eye" data-i18n="[title]Exclude message from prompts"></div>
5801 <div title="Exclude message from prompts" class="mes_button mes_hide fa-solid fa-eye" data-i18n="[title]Exclude message from prompts"></div>5754 <div title="Include message in prompts" class="mes_button mes_unhide fa-solid fa-eye-slash" data-i18n="[title]Include message in prompts"></div>
5802 <div title="Include message in prompts" class="mes_button mes_unhide fa-solid fa-eye-slash" data-i18n="[title]Include message in prompts"></div>5755 <div title="Embed file or image" class="mes_button mes_embed fa-solid fa-paperclip" data-i18n="[title]Embed file or image"></div>
5803 <div title="Embed file or image" class="mes_button mes_embed fa-solid fa-paperclip" data-i18n="[title]Embed file or image"></div>5756 <div title="Create checkpoint" class="mes_button mes_create_bookmark fa-regular fa-solid fa-flag-checkered" data-i18n="[title]Create checkpoint"></div>
5804 <div title="Create checkpoint" class="mes_button mes_create_bookmark fa-regular fa-solid fa-flag-checkered" data-i18n="[title]Create checkpoint"></div>5757 <div title="Create branch" class="mes_button mes_create_branch fa-regular fa-code-branch" data-i18n="[title]Create Branch"></div>
5805 <div title="Create branch" class="mes_button mes_create_branch fa-regular fa-code-branch" data-i18n="[title]Create Branch"></div>5758 <div title="Copy" class="mes_button mes_copy fa-solid fa-copy " data-i18n="[title]Copy"></div>
5806 <div title="Copy" class="mes_button mes_copy fa-solid fa-copy " data-i18n="[title]Copy"></div>5759 </div>
5760 <div title="Open checkpoint chat" class="mes_button mes_bookmark fa-solid fa-flag" data-i18n="[title]Open checkpoint chat"></div>
5761 <div title="Edit" class="mes_button mes_edit fa-solid fa-pencil " data-i18n="[title]Edit"></div>
5807 </div>5762 </div>
5808 <div title="Open checkpoint chat" class="mes_button mes_bookmark fa-solid fa-flag" data-i18n="[title]Open checkpoint chat"></div>5763 <div class="mes_edit_buttons">
5809 <div title="Edit" class="mes_button mes_edit fa-solid fa-pencil " data-i18n="[title]Edit"></div>5764 <div class="mes_edit_done menu_button fa-solid fa-check" title="Confirm" data-i18n="[title]Confirm"></div>
5810 </div>5765 <div class="mes_edit_copy menu_button fa-solid fa-copy" title="Copy this message" data-i18n="[title]Copy this message"></div>
5811 <div class="mes_edit_buttons">5766 <div class="mes_edit_delete menu_button fa-solid fa-trash-can" title="Delete this message" data-i18n="[title]Delete this message">
5812 <div class="mes_edit_done menu_button fa-solid fa-check" title="Confirm" data-i18n="[title]Confirm"></div>5767 </div>
5813 <div class="mes_edit_copy menu_button fa-solid fa-copy" title="Copy this message" data-i18n="[title]Copy this message"></div>5768 <div class="mes_edit_up menu_button fa-solid fa-chevron-up " title="Move message up" data-i18n="[title]Move message up"></div>
5814 <div class="mes_edit_delete menu_button fa-solid fa-trash-can" title="Delete this message" data-i18n="[title]Delete this message">5769 <div class="mes_edit_down menu_button fa-solid fa-chevron-down" title="Move message down" data-i18n="[title]Move message down">
5770 </div>
5771 <div class="mes_edit_cancel menu_button fa-solid fa-xmark" title="Cancel" data-i18n="[title]Cancel"></div>
5815 </div>5772 </div>
5816 <div class="mes_edit_up menu_button fa-solid fa-chevron-up " title="Move message up" data-i18n="[title]Move message up"></div>5773 </div>
5817 <div class="mes_edit_down menu_button fa-solid fa-chevron-down" title="Move message down" data-i18n="[title]Move message down">5774 <div class="mes_text"></div>
5775 <div class="mes_img_container">
5776 <div class="mes_img_controls">
5777 <div title="Enlarge" class="right_menu_button fa-lg fa-solid fa-magnifying-glass mes_img_enlarge" data-i18n="[title]Enlarge"></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>
5779 <div title="Delete" class="right_menu_button fa-lg fa-solid fa-trash-can mes_img_delete" data-i18n="[title]Delete"></div>
5818 </div>5780 </div>
5819 <div class="mes_edit_cancel menu_button fa-solid fa-xmark" title="Cancel" data-i18n="[title]Cancel"></div>5781 <img class="mes_img" src="" />
5820 </div>5782 </div>
5783 <div class="mes_bias"></div>
5821 </div>5784 </div>
5822 <div class="mes_text"></div>5785 <div class="swipe_right fa-solid fa-chevron-right" style="display: none;">
5823 <div class="mes_img_container">5786 <div class="swipes-counter"></div>
5824 <div class="mes_img_controls">
5825 <div title="Enlarge" class="right_menu_button fa-lg fa-solid fa-magnifying-glass mes_img_enlarge" data-i18n="[title]Enlarge"></div>
5826 <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>
5828 </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="" />
5835 </div>5787 </div>
5836 <div class="mes_bias"></div>
5837 </div>
5838 <div class="swipe_right fa-solid fa-chevron-right" style="display: none;">
5839 <div class="swipes-counter"></div>
5840 </div>5788 </div>
5841 </div>5789 </div>
5842 </div>5790 <div id="group_avatars_template" class="template_element">
5843 <div id="group_avatars_template" class="template_element">5791 <div class="avatar avatar_collage collage_1">
5844 <div class="avatar avatar_collage collage_1">5792 <img alt="img1" class="img_1" src="">
5845 <img alt="img1" class="img_1" src="">5793 </div>
5846 </div>5794 <div class="avatar avatar_collage collage_2">
5847 <div class="avatar avatar_collage collage_2">5795 <img alt="img1" class="img_1" src="">
5848 <img alt="img1" class="img_1" src="">5796 <img alt="img2" class="img_2" src="">
5849 <img alt="img2" class="img_2" src="">5797 </div>
5850 </div>5798 <div class="avatar avatar_collage collage_3">
5851 <div class="avatar avatar_collage collage_3">5799 <img alt="img1" class="img_1" src="">
5852 <img alt="img1" class="img_1" src="">5800 <img alt="img2" class="img_2" src="">
5853 <img alt="img2" class="img_2" src="">5801 <img alt="img3" class="img_3" src="">
5854 <img alt="img3" class="img_3" src="">5802 </div>
5855 </div>5803 <div class="avatar avatar_collage collage_4">
5856 <div class="avatar avatar_collage collage_4">5804 <img alt="img1" class="img_1" src="">
5857 <img alt="img1" class="img_1" src="">5805 <img alt="img2" class="img_2" src="">
5858 <img alt="img2" class="img_2" src="">5806 <img alt="img3" class="img_3" src="">
5859 <img alt="img3" class="img_3" src="">5807 <img alt="img4" class="img_4" src="">
5860 <img alt="img4" class="img_4" src="">5808 </div>
5861 </div>5809 </div>
5862 </div>
58635810
5864 <div id="onboarding_template" class="template_element">5811 <div id="onboarding_template" class="template_element">
5865 <div class="onboarding">5812 <div class="onboarding">
5866 <h3 data-i18n="Welcome to SillyTavern!">Welcome to SillyTavern!</h3>5813 <h3 data-i18n="Welcome to SillyTavern!">Welcome to SillyTavern!</h3>
5867 <ul class="justifyLeft margin-bot-10px">5814 <ul class="justifyLeft margin-bot-10px">
5868 <li><span data-i18n="welcome_message_part_1">Read the</span> <a href="https://docs.sillytavern.app/" target="_blank" data-i18n="welcome_message_part_2">Official Documentation</a><span data-i18n="welcome_message_part_3">.</span></li>5815 <li><span data-i18n="welcome_message_part_1">Read the</span> <a href="https://docs.sillytavern.app/" target="_blank" data-i18n="welcome_message_part_2">Official Documentation</a><span data-i18n="welcome_message_part_3">.</span></li>
5869 <li><span data-i18n="welcome_message_part_4">Type</span> <code>/help</code> <span data-i18n="welcome_message_part_5">in chat for commands and macros.</span></li>5816 <li><span data-i18n="welcome_message_part_4">Type</span> <code>/help</code> <span data-i18n="welcome_message_part_5">in chat for commands and macros.</span></li>
5870 <li><span data-i18n="welcome_message_part_6">Join the</span> <a href="https://discord.gg/sillytavern" data-i18n="Discord server" target="_blank">Discord server</a> <span data-i18n="welcome_message_part_7">for info and announcements.</span></li>5817 <li><span data-i18n="welcome_message_part_6">Join the</span> <a href="https://discord.gg/sillytavern" data-i18n="Discord server" target="_blank">Discord server</a> <span data-i18n="welcome_message_part_7">for info and announcements.</span></li>
5871 </ul>5818 </ul>
5872 <div id="onboarding-UI-language-block" class="flex-container alignItemsBaseline">5819 <div id="onboarding-UI-language-block" class="flex-container alignItemsBaseline">
5873 <span data-i18n="UI Language">Language:</span>5820 <span data-i18n="UI Language">Language:</span>
5874 <select id="onboarding_ui_language_select" class="flex1 margin0">5821 <select id="onboarding_ui_language_select" class="flex1 margin0">
5875 <option value="en">English</option>5822 <option value="en">English</option>
5876 </select>5823 </select>
5877 </div>5824 </div>
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>
5881 <div class="expander"></div>5828 <div>
5882 <div class="textAlignCenter">5829 <span data-i18n="If you're new to this, enable the simplified UI mode below.">
5883 <h3 data-i18n="Looking for AI characters?">5830 If you're new to this, enable the simplified UI mode below.
5884 Looking for AI characters?
5885 </h3>
5886 <span>
5887 <span class="menu_button menu_button_icon external_import_button">
5888 <i class="fa-solid fa-cloud-arrow-down"></i>
5889 <span data-i18n="onboarding_import">Import</span>
5890 </span>5831 </span>
5891 <span data-i18n="from supported sources or view">5832 <br>
5892 from supported sources or view5833 <span data-i18n="Change it later in the 'User Settings' panel.">
5834 Change it later in the 'User Settings' panel.
5893 </span>5835 </span>
5894 <span class="open_characters_library menu_button menu_button_icon">5836 </div>
5895 <i class="fa-solid fa-image-portrait"></i>5837 <label class="checkbox_label">
5896 <span data-i18n="Sample characters">Sample characters</span>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>
5843 <div class="expander"></div>
5844 <div class="textAlignCenter">
5845 <h3 data-i18n="Looking for AI characters?">
5846 Looking for AI characters?
5847 </h3>
5848 <span>
5849 <span class="menu_button menu_button_icon external_import_button">
5850 <i class="fa-solid fa-cloud-arrow-down"></i>
5851 <span data-i18n="onboarding_import">Import</span>
5852 </span>
5853 <span data-i18n="from supported sources or view">
5854 from supported sources or view
5855 </span>
5856 <span class="open_characters_library menu_button menu_button_icon">
5857 <i class="fa-solid fa-image-portrait"></i>
5858 <span data-i18n="Sample characters">Sample characters</span>
5859 </span>
5897 </span>5860 </span>
5898 </span>
5899 </div>
5900 <div class="expander"></div>
5901 <h3 data-i18n="Your Persona">
5902 Your Persona
5903 </h3>
5904 <div class="justifyLeft margin-bot-10px">
5905 <span data-i18n="Before you get started, you must select a persona name.">
5906 Before you get started, you must select a persona name.
5907 </span>
5908 <br>
5909 <span data-i18n="welcome_message_part_8">This can be changed at any time via the</span> <code><i class="fa-solid fa-face-smile"></i></code> <span data-i18n="welcome_message_part_9">icon.</span>
5910 </div>
5911 <h4 data-i18n="Persona Name:">Persona Name:</h4>
5912 </div>
5913 </div>
5914 <div id="group_member_template" class="template_element">
5915 <div class="group_member">
5916 <div class="avatar">
5917 <img alt="Avatar" src="" />
5918 </div>
5919 <div class="group_member_name">
5920 <div class="ch_name"></div>
5921 <div class="tags tags_inline"></div>
5922 </div>
5923 <input class="ch_fav" value="" hidden />
5924 <div class="queue_position"></div>
5925 <div class="group_member_icon">
5926 <div title="Temporarily disable automatic replies from this character" data-action="disable" class="right_menu_button fa-solid fa-lg fa-comment-slash" data-i18n="[title]Temporarily disable automatic replies from this character"></div>
5927 <div title="Enable automatic replies from this character" data-action="enable" class="right_menu_button fa-solid fa-lg fa-comment-slash" data-i18n="[title]Enable automatic replies from this character"></div>
5928 <div title="Trigger a message from this character" data-action="speak" class="right_menu_button fa-solid fa-lg fa-comment" data-i18n="[title]Trigger a message from this character"></div>
5929 <div class="flexFlowColumn flex-container">
5930 <div title="Move up" data-action="up" class="right_menu_button fa-solid fa-chevron-up" data-i18n="[title]Move up"></div>
5931 <div title="Move down" data-action="down" class="right_menu_button fa-solid fa-chevron-down" data-i18n="[title]Move down"></div>
5932 </div>5861 </div>
5933 <div title="View character card" data-action="view" class="right_menu_button fa-solid fa-xl fa-image-portrait" data-i18n="[title]View character card"></div>5862 <div class="expander"></div>
5934 <div title="Remove from group" data-action="remove" class="right_menu_button fa-solid fa-2xl fa-xmark" data-i18n="[title]Remove from group">5863 <h3 data-i18n="Your Persona">
5864 Your Persona
5865 </h3>
5866 <div class="justifyLeft margin-bot-10px">
5867 <span data-i18n="Before you get started, you must select a persona name.">
5868 Before you get started, you must select a persona name.
5869 </span>
5870 <br>
5871 <span data-i18n="welcome_message_part_8">This can be changed at any time via the</span> <code><i class="fa-solid fa-face-smile"></i></code> <span data-i18n="welcome_message_part_9">icon.</span>
5935 </div>5872 </div>
5936 <div title="Add to group" data-action="add" class="right_menu_button fa-solid fa-2xl fa-plus" data-i18n="[title]Add to group"></div>5873 <h4 data-i18n="Persona Name:">Persona Name:</h4>
5937 </div>5874 </div>
5938 </div>5875 </div>
5939 </div>5876 <div id="group_member_template" class="template_element">
5940 <div id="group_list_template" class="template_element">5877 <div class="group_member">
5941 <div class="group_select entity_block flex-container wide100p alignitemsflexstart">5878 <div class="avatar">
5942 <div class="avatar">5879 <img alt="Avatar" src="" />
5943 <img src="">5880 </div>
5944 </div>5881 <div class="group_member_name">
5945 <div class="flex-container wide100pLess70px gap5px group_select_container">
5946 <div class="wide100p group_name_block character_name_block">
5947 <div class="ch_name"></div>5882 <div class="ch_name"></div>
5948 <small class="ch_additional_info group_select_counter"></small>5883 <div class="tags tags_inline"></div>
5949 </div>5884 </div>
5950 <small class="character_name_block_sub_line">in this group</small>
5951 <i class='group_fav_icon fa-solid fa-star'></i>
5952 <input class="ch_fav" value="" hidden />5885 <input class="ch_fav" value="" hidden />
5953 <div class="group_select_block_list ch_description"></div>5886 <div class="queue_position"></div>
5954 <div class="tags tags_inline"></div>5887 <div class="group_member_icon">
5888 <div title="Temporarily disable automatic replies from this character" data-action="disable" class="right_menu_button fa-solid fa-lg fa-comment-slash" data-i18n="[title]Temporarily disable automatic replies from this character"></div>
5889 <div title="Enable automatic replies from this character" data-action="enable" class="right_menu_button fa-solid fa-lg fa-comment-slash" data-i18n="[title]Enable automatic replies from this character"></div>
5890 <div title="Trigger a message from this character" data-action="speak" class="right_menu_button fa-solid fa-lg fa-comment" data-i18n="[title]Trigger a message from this character"></div>
5891 <div class="flexFlowColumn flex-container">
5892 <div title="Move up" data-action="up" class="right_menu_button fa-solid fa-chevron-up" data-i18n="[title]Move up"></div>
5893 <div title="Move down" data-action="down" class="right_menu_button fa-solid fa-chevron-down" data-i18n="[title]Move down"></div>
5894 </div>
5895 <div title="View character card" data-action="view" class="right_menu_button fa-solid fa-xl fa-image-portrait" data-i18n="[title]View character card"></div>
5896 <div title="Remove from group" data-action="remove" class="right_menu_button fa-solid fa-2xl fa-xmark" data-i18n="[title]Remove from group">
5897 </div>
5898 <div title="Add to group" data-action="add" class="right_menu_button fa-solid fa-2xl fa-plus" data-i18n="[title]Add to group"></div>
5899 </div>
5955 </div>5900 </div>
5956 </div>5901 </div>
5957 </div>5902 <div id="group_list_template" class="template_element">
5958 <div id="bogus_folder_template" class="template_element">5903 <div class="group_select entity_block flex-container wide100p alignitemsflexstart">
5959 <div class="bogus_folder_select entity_block flex-container wide100p alignitemsflexstart">5904 <div class="avatar">
5960 <div class="avatar flex alignitemscenter textAlignCenter">5905 <img src="">
5961 <i class="bogus_folder_icon fa-solid fa-xl"></i>5906 </div>
5962 </div>5907 <div class="flex-container wide100pLess70px gap5px group_select_container">
5963 <div class="flex-container wide100pLess70px character_select_container">5908 <div class="wide100p group_name_block character_name_block">
5964 <div class="wide100p character_name_block">5909 <div class="ch_name"></div>
5965 <span class="ch_name"></span>5910 <small class="ch_additional_info group_select_counter"></small>
5966 <small class="ch_additional_info bogus_folder_counter"></small>5911 </div>
5912 <small class="character_name_block_sub_line">in this group</small>
5913 <i class='group_fav_icon fa-solid fa-star'></i>
5914 <input class="ch_fav" value="" hidden />
5915 <div class="group_select_block_list ch_description"></div>
5916 <div class="tags tags_inline"></div>
5967 </div>5917 </div>
5968 <small class="character_name_block_sub_line bogus_folder_hidden_counter"></small>
5969 <div class="bogus_folder_avatars_block avatars_inline avatars_inline_small tags tags_inline"></div>
5970 </div>5918 </div>
5971 </div>5919 </div>
5972 </div>5920 <div id="bogus_folder_template" class="template_element">
5973 <div id="bogus_folder_back_template" class="template_element">5921 <div class="bogus_folder_select entity_block flex-container wide100p alignitemsflexstart">
5974 <div class="bogus_folder_select bogus_folder_select_back flex-container wide100p alignitemsflexstart" id="BogusFolderBack" tagid="back">5922 <div class="avatar flex alignitemscenter textAlignCenter">
5975 <div class="avatar flex alignitemscenter textAlignCenter">5923 <i class="bogus_folder_icon fa-solid fa-xl"></i>
5976 <i class="bogus_folder_icon fa-solid fa-xl fa-right-from-bracket fa-flip-horizontal"></i>5924 </div>
5977 </div>5925 <div class="flex-container wide100pLess70px character_select_container">
5978 <div class="bogus_folder_back_placeholder flex alignitemscenter textAlignCenter">5926 <div class="wide100p character_name_block">
5979 <i class="bogus_folder_icon fa-solid fa-xl fa-right-from-bracket fa-flip-horizontal"></i>5927 <span class="ch_name"></span>
5980 </div>5928 <small class="ch_additional_info bogus_folder_counter"></small>
5981 <div class="flex-container wide100pLess70px character_select_container height100p alignitemscenter">5929 </div>
5982 <div class="wide100p character_name_block">5930 <small class="character_name_block_sub_line bogus_folder_hidden_counter"></small>
5983 <span class="ch_name">Go back</span>5931 <div class="bogus_folder_avatars_block avatars_inline avatars_inline_small tags tags_inline"></div>
5984 </div>5932 </div>
5985 </div>5933 </div>
5986 </div>5934 </div>
5987 </div>5935 <div id="bogus_folder_back_template" class="template_element">
5988 <div id="inline_avatar_template" class="template_element">5936 <div class="bogus_folder_select bogus_folder_select_back flex-container wide100p alignitemsflexstart" id="BogusFolderBack" tagid="back">
5989 <div class="avatar inline_avatar flex alignitemscenter textAlignCenter">5937 <div class="avatar flex alignitemscenter textAlignCenter">
5990 <img src="">5938 <i class="bogus_folder_icon fa-solid fa-xl fa-right-from-bracket fa-flip-horizontal"></i>
5939 </div>
5940 <div class="bogus_folder_back_placeholder flex alignitemscenter textAlignCenter">
5941 <i class="bogus_folder_icon fa-solid fa-xl fa-right-from-bracket fa-flip-horizontal"></i>
5942 </div>
5943 <div class="flex-container wide100pLess70px character_select_container height100p alignitemscenter">
5944 <div class="wide100p character_name_block">
5945 <span class="ch_name">Go back</span>
5946 </div>
5947 </div>
5948 </div>
5991 </div>5949 </div>
5992 </div>5950 <div id="inline_avatar_template" class="template_element">
5993 <div id="alternate_greetings_template" class="template_element">5951 <div class="avatar inline_avatar flex alignitemscenter textAlignCenter">
5994 <div class="alternate_grettings flexFlowColumn flex-container">5952 <img src="">
5995 <div class="title_restorable">
5996 <h3><span data-i18n="Alternate Greetings">Alternate Greetings</span></h3>
5997 <div title="Add" class="menu_button fa-solid fa-plus add_alternate_greeting" data-i18n="[title]Add"></div>
5998 </div>5953 </div>
5999 <small class="justifyLeft" data-i18n="Alternate_Greetings_desc">5954 </div>
6000 These will be displayed as swipes on the first message when starting a new chat.5955 <div id="alternate_greetings_template" class="template_element">
6001 Group members can select one of them to initiate the conversation.5956 <div class="alternate_grettings flexFlowColumn flex-container">
6002 </small>5957 <div class="title_restorable">
6003 <hr>5958 <h3><span data-i18n="Alternate Greetings">Alternate Greetings</span></h3>
6004 <div class="alternate_greetings_list flexFlowColumn flex-container wide100p">5959 <div title="Add" class="menu_button fa-solid fa-plus add_alternate_greeting" data-i18n="[title]Add"></div>
6005 <strong class="alternate_grettings_hint margin-bot-10px">5960 </div>
6006 <span data-i18n="alternate_greetings_hint_1">Click the</span> <i class="fa-solid fa-plus"></i> <span data-i18n="alternate_greetings_hint_2">button to get started!</span>5961 <small class="justifyLeft" data-i18n="Alternate_Greetings_desc">
6007 </strong>5962 These will be displayed as swipes on the first message when starting a new chat.
5963 Group members can select one of them to initiate the conversation.
5964 </small>
5965 <hr>
5966 <div class="alternate_greetings_list flexFlowColumn flex-container wide100p">
5967 <strong class="alternate_grettings_hint margin-bot-10px">
5968 <span data-i18n="alternate_greetings_hint_1">Click the</span> <i class="fa-solid fa-plus"></i> <span data-i18n="alternate_greetings_hint_2">button to get started!</span>
5969 </strong>
5970 </div>
6008 </div>5971 </div>
6009 </div>5972 </div>
6010 </div>5973 <div id="alternate_greeting_form_template" class="template_element">
6011 <div id="alternate_greeting_form_template" class="template_element">5974 <div class="alternate_greeting">
6012 <div class="alternate_greeting">5975 <div class="title_restorable">
6013 <div class="title_restorable">5976 <strong><span data-i18n="Alternate Greeting #">Alternate Greeting #</span><span class="greeting_index"></span></strong>
6014 <strong><span data-i18n="Alternate Greeting #">Alternate Greeting #</span><span class="greeting_index"></span></strong>5977 <div class="menu_button fa-solid fa-trash-alt delete_alternate_greeting"></div>
6015 <div class="menu_button fa-solid fa-trash-alt delete_alternate_greeting"></div>5978 </div>
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>
6016 </div>5980 </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>
6018 </div>5981 </div>
6019 </div>
60205982
6021 <!-- chat and input bar -->5983 <!-- chat and input bar -->
6022 <div id="typing_indicator_template" class="template_element">5984 <div id="typing_indicator_template" class="template_element">
6023 <div class="typing_indicator"><span class="typing_indicator_name">CHAR</span> is typing</div>5985 <div class="typing_indicator"><span class="typing_indicator_name">CHAR</span> is typing</div>
6024 </div>5986 </div>
6025 <div id="message_file_template" class="template_element">5987 <div id="message_file_template" class="template_element">
6026 <div class="mes_file_container">5988 <div class="mes_file_container">
6027 <div class="fa-lg fa-solid fa-file-alt mes_file_icon"></div>5989 <div class="fa-lg fa-solid fa-file-alt mes_file_icon"></div>
6028 <div class="mes_file_name"></div>5990 <div class="mes_file_name"></div>
6029 <div class="mes_file_size"></div>5991 <div class="mes_file_size"></div>
6030 <div class="right_menu_button mes_file_open fa-solid fa-magnifying-glass" title="View contents" data-i18n="[title]View contents"></div>5992 <div class="right_menu_button mes_file_open fa-solid fa-magnifying-glass" title="View contents" data-i18n="[title]View contents"></div>
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>
5994 </div>
6032 </div>5995 </div>
6033 </div>5996 </div>
6034 <div id="movingDivs">5997 <div id="movingDivs">
@@ -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+46 -24
@@ -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,19 +645,29 @@ async function summarizeChatWebLLM(context, force) {
650 params.max_tokens = extension_settings.memory.overrideResponseLength;645 params.max_tokens = extension_settings.memory.overrideResponseLength;
651 }646 }
652647
653 const summary = await generateWebLlmChatPrompt(messages, params);648 try {
654 const newContext = getContext();649 inApiCall = true;
650 const summary = await generateWebLlmChatPrompt(messages, params);
651 const newContext = getContext();
655652
656 // something changed during summarization request653 if (!summary) {
657 if (newContext.groupId !== context.groupId ||654 console.warn('Empty summary received');
658 newContext.chatId !== context.chatId ||655 return;
659 (!newContext.groupId && (newContext.characterId !== context.characterId))) {656 }
660 console.log('Context changed, summary discarded');
661 return;
662 }
663657
664 setMemoryContext(summary, true, lastUsedIndex);658 // something changed during summarization request
665 return summary;659 if (newContext.groupId !== context.groupId ||
660 newContext.chatId !== context.chatId ||
661 (!newContext.groupId && (newContext.characterId !== context.characterId))) {
662 console.log('Context changed, summary discarded');
663 return;
664 }
665
666 setMemoryContext(summary, true, lastUsedIndex);
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) {
680 summary = await generateQuietPrompt(prompt, false, skipWIAN, '', '', extension_settings.memory.overrideResponseLength);685 try {
686 inApiCall = true;
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+60 -19
@@ -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,23 +667,28 @@ 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 if (!value) {670 function getResult() {
671 return 0;671 if (!value) {
672 }672 return 0;
673 }
673674
674 const array = parseNumericSeries(value, scope);675 const array = parseNumericSeries(value, scope);
675676
676 if (array.length === 0) {677 if (array.length === 0) {
677 return 0;678 return 0;
678 }679 }
679680
680 const result = singleOperand ? operation(array[0]) : operation(array);681 const result = singleOperand ? operation(array[0]) : operation(array);
681682
682 if (isNaN(result) || !isFinite(result)) {683 if (isNaN(result) || !isFinite(result)) {
683 return 0;684 return 0;
685 }
686
687 return result;
684 }688 }
685689
686 return result;690 const result = getResult();
691 return String(result);
687}692}
688693
689function addValuesCallback(args, value) {694function addValuesCallback(args, value) {
@@ -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+32 -15
@@ -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);
@@ -1776,11 +1778,13 @@ body[data-stscript-style] .hljs.language-stscript {
1776 padding: 0.25em 0.25em 0.5em 0.25em;1778 padding: 0.25em 0.25em 0.5em 0.25em;
1777 border-bottom: 1px solid var(--ac-color-border);1779 border-bottom: 1px solid var(--ac-color-border);
17781780
1779 > .head {1781 >.head {
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 }
1793 > .head > .source {1797
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 {
@@ -5417,22 +5429,23 @@ body:not(.movingUI) .drawer-content.maximized {
5417.faPicker {5429.faPicker {
5418 flex: 1 1 auto;5430 flex: 1 1 auto;
5419 overflow: auto;5431 overflow: auto;
5420 gap: 1em;5432 gap: 1em;
5421 display: grid;5433 display: grid;
5422 grid-template-columns: repeat(auto-fill, minmax(3.5em, 1fr));5434 grid-template-columns: repeat(auto-fill, minmax(3.5em, 1fr));
54235435
5424 .menu_button {5436 .menu_button {
5425 aspect-ratio: 1 / 1;5437 aspect-ratio: 1 / 1;
5426 font-size: 2em;5438 font-size: 2em;
5427 height: 1lh;5439 height: 1lh;
5428 line-height: 1.2;5440 line-height: 1.2;
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 }
5435 }5448 }
5436}5449}
54375450
5438.faPicker:not(:has(:not(.hidden)))::after {5451.faPicker:not(:has(:not(.hidden)))::after {
@@ -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}