Merge branch 'staging' into neo-server

This commit is contained in:
Cohee 2024-04-17 19:39:57 +03:00
commit 88637adfe2
4 changed files with 12 additions and 6 deletions

View File

@ -2362,7 +2362,7 @@
</div> </div>
</div> </div>
<div class="wide100p"> <div class="wide100p">
<input id="openai_reverse_proxy" type="text" class="text_pole" placeholder="https://api.openai.com/v1" maxlength="500" /> <input id="openai_reverse_proxy" type="text" class="text_pole" placeholder="https://api.openai.com/v1" maxlength="5000" />
<small class="reverse_proxy_warning"> <small class="reverse_proxy_warning">
<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> <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>
</small> </small>
@ -2376,7 +2376,7 @@
</span> </span>
</div> </div>
<div class="flex-container width100p"> <div class="flex-container width100p">
<input id="openai_proxy_password" type="password" class="text_pole flex1" placeholder="" maxlength="500" form="openai_form" autocomplete="off" /> <input id="openai_proxy_password" type="password" class="text_pole flex1" placeholder="" maxlength="5000" form="openai_form" autocomplete="off" />
<div id="openai_proxy_password_show" title="Peek a password" class="menu_button fa-solid fa-eye-slash fa-fw"></div> <div id="openai_proxy_password_show" title="Peek a password" class="menu_button fa-solid fa-eye-slash fa-fw"></div>
</div> </div>
</div> </div>
@ -2733,7 +2733,7 @@
<form id="custom_form" data-source="custom"> <form id="custom_form" data-source="custom">
<h4 data-i18n="Custom Endpoint (Base URL)">Custom Endpoint (Base URL)</h4> <h4 data-i18n="Custom Endpoint (Base URL)">Custom Endpoint (Base URL)</h4>
<div class="flex-container"> <div class="flex-container">
<input id="custom_api_url_text" class="text_pole wide100p" maxlength="500" value="" autocomplete="off" placeholder="Example: http://localhost:1234/v1"> <input id="custom_api_url_text" class="text_pole wide100p" maxlength="5000" value="" autocomplete="off" placeholder="Example: http://localhost:1234/v1">
</div> </div>
<div> <div>
<small> <small>
@ -2745,7 +2745,7 @@
<small>(Optional)</small> <small>(Optional)</small>
</h4> </h4>
<div class="flex-container"> <div class="flex-container">
<input id="api_key_custom" name="api_key_custom" class="text_pole flex1" maxlength="500" value="" type="text" autocomplete="off"> <input id="api_key_custom" name="api_key_custom" class="text_pole flex1" maxlength="5000" value="" type="text" autocomplete="off">
<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> <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>
</div> </div>
<div data-for="api_key_custom" class="neutral_warning"> <div data-for="api_key_custom" class="neutral_warning">

View File

@ -10223,7 +10223,7 @@ jQuery(async function () {
} }
$('.zoomed_avatar').on('mouseup', (e) => { $('.zoomed_avatar').on('mouseup', (e) => {
if (e.target.closest('.drag-grabber')) { if (e.target.closest('.drag-grabber') || e.button !== 0) {
return; return;
} }
$(`.zoomed_avatar[forChar="${charname}"]`).fadeOut(animation_duration, () => { $(`.zoomed_avatar[forChar="${charname}"]`).fadeOut(animation_duration, () => {

View File

@ -417,7 +417,8 @@ export function decodeStyleTags(text) {
return text.replaceAll(styleDecodeRegex, (_, style) => { return text.replaceAll(styleDecodeRegex, (_, style) => {
try { try {
const ast = css.parse(unescape(style)); let styleCleaned = unescape(style).replaceAll(/<br\/>/g, '');
const ast = css.parse(styleCleaned);
const rules = ast?.stylesheet?.rules; const rules = ast?.stylesheet?.rules;
if (rules) { if (rules) {
for (const rule of rules) { for (const rule of rules) {

View File

@ -1806,6 +1806,11 @@ async function fetchImagesNoCache() {
} }
function migrateSettings() { function migrateSettings() {
if (extension_settings.expressions.api === undefined) {
extension_settings.expressions.api = EXPRESSION_API.extras;
saveSettingsDebounced();
}
if (Object.keys(extension_settings.expressions).includes('local')) { if (Object.keys(extension_settings.expressions).includes('local')) {
if (extension_settings.expressions.local) { if (extension_settings.expressions.local) {
extension_settings.expressions.api = EXPRESSION_API.local; extension_settings.expressions.api = EXPRESSION_API.local;