Merge branch 'staging' into ffmpeg-videobg

2fa6a11650ea4d647b078fa5966ffd9bac5682c6

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

32 files changed, +243 -135Showing whitespace changes
package-lock.json+18 -25
@@ -48,6 +48,7 @@
4848 "cookie-parser": "^1.4.6",
4949 "cookie-session": "^2.1.0",
5050 "cors": "^2.8.5",
51+ "crc": "^4.3.2",
5152 "csrf-sync": "^4.0.3",
5253 "diff-match-patch": "^1.0.5",
5354 "dompurify": "^3.2.4",
@@ -76,7 +77,6 @@
7677 "node-persist": "^4.0.4",
7778 "open": "^8.4.2",
7879 "png-chunk-text": "^1.0.0",
79- "png-chunks-encode": "^1.0.0",
8080 "png-chunks-extract": "^1.0.0",
8181 "proxy-agent": "^6.5.0",
8282 "rate-limiter-flexible": "^5.0.5",
@@ -121,7 +121,6 @@
121121 "@types/node": "^18.19.80",
122122 "@types/node-persist": "^3.1.8",
123123 "@types/png-chunk-text": "^1.0.3",
124- "@types/png-chunks-encode": "^1.0.2",
125124 "@types/png-chunks-extract": "^1.0.2",
126125 "@types/response-time": "^2.3.8",
127126 "@types/select2": "^4.0.63",
@@ -2033,13 +2032,6 @@
20332032 "dev": true,
20342033 "license": "MIT"
20352034 },
2036- "node_modules/@types/png-chunks-encode": {
2037- "version": "1.0.2",
2038- "resolved": "https://registry.npmjs.org/@types/png-chunks-encode/-/png-chunks-encode-1.0.2.tgz",
2039- "integrity": "sha512-Dxn0aXEcSg1wVeHjvNlygm/+fKBDzWMCdxJYhjGUTeefFW/jYxWcrg+W7ppLBfH44iJMqeVBHtHBwtYQUeYvgw==",
2040- "dev": true,
2041- "license": "MIT"
2042- },
20432035 "node_modules/@types/png-chunks-extract": {
20442036 "version": "1.0.2",
20452037 "resolved": "https://registry.npmjs.org/@types/png-chunks-extract/-/png-chunks-extract-1.0.2.tgz",
@@ -3542,6 +3534,23 @@
35423534 "node": ">= 0.10"
35433535 }
35443536 },
3537+ "node_modules/crc": {
3538+ "version": "4.3.2",
3539+ "resolved": "https://registry.npmjs.org/crc/-/crc-4.3.2.tgz",
3540+ "integrity": "sha512-uGDHf4KLLh2zsHa8D8hIQ1H/HtFQhyHrc0uhHBcoKGol/Xnb+MPYfUMw7cvON6ze/GUESTudKayDcJC5HnJv1A==",
3541+ "license": "MIT",
3542+ "engines": {
3543+ "node": ">=12"
3544+ },
3545+ "peerDependencies": {
3546+ "buffer": ">=6.0.3"
3547+ },
3548+ "peerDependenciesMeta": {
3549+ "buffer": {
3550+ "optional": true
3551+ }
3552+ }
3553+ },
35453554 "node_modules/crc-32": {
35463555 "version": "0.3.0",
35473556 "resolved": "https://registry.npmjs.org/crc-32/-/crc-32-0.3.0.tgz",
@@ -6686,16 +6695,6 @@
66866695 "integrity": "sha512-DEROKU3SkkLGWNMzru3xPVgxyd48UGuMSZvioErCure6yhOc/pRH2ZV+SEn7nmaf7WNf3NdIpH+UTrRdKyq9Lw==",
66876696 "license": "MIT"
66886697 },
6689- "node_modules/png-chunks-encode": {
6690- "version": "1.0.0",
6691- "resolved": "https://registry.npmjs.org/png-chunks-encode/-/png-chunks-encode-1.0.0.tgz",
6692- "integrity": "sha512-J1jcHgbQRsIIgx5wxW9UmCymV3wwn4qCCJl6KYgEU/yHCh/L2Mwq/nMOkRPtmV79TLxRZj5w3tH69pvygFkDqA==",
6693- "license": "MIT",
6694- "dependencies": {
6695- "crc-32": "^0.3.0",
6696- "sliced": "^1.0.1"
6697- }
6698- },
66996698 "node_modules/png-chunks-extract": {
67006699 "version": "1.0.0",
67016700 "resolved": "https://registry.npmjs.org/png-chunks-extract/-/png-chunks-extract-1.0.0.tgz",
@@ -7532,12 +7531,6 @@
75327531 "dev": true,
75337532 "license": "ISC"
75347533 },
7535- "node_modules/sliced": {
7536- "version": "1.0.1",
7537- "resolved": "https://registry.npmjs.org/sliced/-/sliced-1.0.1.tgz",
7538- "integrity": "sha512-VZBmZP8WU3sMOZm1bdgTadsQbcscK0UM8oKxKVBs4XAhUo2Xxzm/OFMGBkPusxw9xL3Uy8LrzEqGqJhclsr0yA==",
7539- "license": "MIT"
7540- },
75417534 "node_modules/slidetoggle": {
75427535 "version": "4.0.0",
75437536 "resolved": "https://registry.npmjs.org/slidetoggle/-/slidetoggle-4.0.0.tgz",
package.json+1 -2
@@ -38,6 +38,7 @@
3838 "cookie-parser": "^1.4.6",
3939 "cookie-session": "^2.1.0",
4040 "cors": "^2.8.5",
41+ "crc": "^4.3.2",
4142 "csrf-sync": "^4.0.3",
4243 "diff-match-patch": "^1.0.5",
4344 "dompurify": "^3.2.4",
@@ -66,7 +67,6 @@
6667 "node-persist": "^4.0.4",
6768 "open": "^8.4.2",
6869 "png-chunk-text": "^1.0.0",
69- "png-chunks-encode": "^1.0.0",
7070 "png-chunks-extract": "^1.0.0",
7171 "proxy-agent": "^6.5.0",
7272 "rate-limiter-flexible": "^5.0.5",
@@ -151,7 +151,6 @@
151151 "@types/node": "^18.19.80",
152152 "@types/node-persist": "^3.1.8",
153153 "@types/png-chunk-text": "^1.0.3",
154- "@types/png-chunks-encode": "^1.0.2",
155154 "@types/png-chunks-extract": "^1.0.2",
156155 "@types/response-time": "^2.3.8",
157156 "@types/select2": "^4.0.63",
public/index.html+14 -12
@@ -2432,7 +2432,7 @@
24322432 </div>
24332433 <div class="flex1">
24342434 <h4 data-i18n="Server url">Server URL</h4>
24352435 <small data-i18n="Example: http://127.0.0.1:5000">Example: http://127.0.0.1:5000</small>
24362436 <input id="generic_api_url_text" name="generic_api_url" class="text_pole wide100p" value="" autocomplete="off" data-server-history="generic">
24372437 </div>
24382438 <datalist id="generic_model_fill"></datalist>
@@ -2461,7 +2461,7 @@
24612461 </div>
24622462 <div class="flex1">
24632463 <h4 data-i18n="Server url">Server URL</h4>
24642464 <small data-i18n="Example: http://127.0.0.1:5000">Example: http://127.0.0.1:5000</small>
24652465 <input id="textgenerationwebui_api_url_text" name="textgenerationwebui_api_url" class="text_pole wide100p" value="" autocomplete="off" data-server-history="ooba_blocking">
24662466 </div>
24672467 <input id="custom_model_textgenerationwebui" class="text_pole wide100p" placeholder="Custom model (optional)" data-i18n="[placeholder]Custom model (optional)" type="text">
@@ -2534,7 +2534,7 @@
25342534 </div>
25352535 <div class="flex1">
25362536 <h4 data-i18n="API url">API URL</h4>
25372537 <small data-i18n="Example: http://127.0.0.1:8000">Example: http://127.0.0.1:8000</small>
25382538 <input id="vllm_api_url_text" class="text_pole wide100p" value="" autocomplete="off" data-server-history="vllm">
25392539 </div>
25402540 <div>
@@ -2580,7 +2580,7 @@
25802580 </div>
25812581 <div class="flex1">
25822582 <h4 data-i18n="API url">API URL</h4>
25832583 <small data-i18n="Example: http://127.0.0.1:5000">Example: http://127.0.0.1:5000</small>
25842584 <input id="aphrodite_api_url_text" class="text_pole wide100p" value="" autocomplete="off" data-server-history="aphrodite">
25852585 </div>
25862586 <div>
@@ -2609,7 +2609,7 @@
26092609 </div>
26102610 <div class="flex1">
26112611 <h4 data-i18n="API url">API URL</h4>
26122612 <small data-i18n="Example: http://127.0.0.1:8080">Example: http://127.0.0.1:8080</small>
26132613 <input id="llamacpp_api_url_text" class="text_pole wide100p" value="" autocomplete="off" data-server-history="llamacpp">
26142614 </div>
26152615 </div>
@@ -2621,7 +2621,7 @@
26212621 </div>
26222622 <div class="flex1">
26232623 <h4 data-i18n="API url">API URL</h4>
26242624 <small data-i18n="Example: http://127.0.0.1:11434">Example: http://127.0.0.1:11434</small>
26252625 <input id="ollama_api_url_text" class="text_pole wide100p" value="" autocomplete="off" data-server-history="ollama">
26262626 </div>
26272627 <div class="flex1">
@@ -2656,7 +2656,7 @@
26562656 </div>
26572657 <div class="flex1">
26582658 <h4 data-i18n="API url">API URL</h4>
26592659 <small data-i18n="Example: http://127.0.0.1:5000">Example: http://127.0.0.1:5000</small>
26602660 <input id="tabby_api_url_text" class="text_pole wide100p" value="" autocomplete="off" data-server-history="tabby">
26612661 </div>
26622662 <div class="flex1">
@@ -2708,7 +2708,7 @@
27082708 </div>
27092709 <div class="flex1">
27102710 <h4 data-i18n="API url">API URL</h4>
27112711 <small data-i18n="Example: http://127.0.0.1:5001">Example: http://127.0.0.1:5001</small>
27122712 <input id="koboldcpp_api_url_text" class="text_pole wide100p" value="" autocomplete="off" data-server-history="koboldcpp">
27132713 </div>
27142714 </div>
@@ -3140,6 +3140,7 @@
31403140 <option value="gemma-3-27b-it">Gemma 3 27B</option>
31413141 </optgroup>
31423142 <optgroup label="Subversions">
3143+ <option value="gemini-2.5-pro-preview-03-25">Gemini 2.5 Pro Preview 2025-03-25</option>
31433144 <option value="gemini-2.5-pro-exp-03-25">Gemini 2.5 Pro Experimental 2025-03-25</option>
31443145 <option value="gemini-2.0-pro-exp">Gemini 2.0 Pro Experimental</option>
31453146 <option value="gemini-2.0-pro-exp-02-05">Gemini 2.0 Pro Experimental 2025-02-05</option>
@@ -3248,16 +3249,16 @@
32483249 <option value="qwen-2.5-32b">qwen-2.5-32b</option>
32493250 <option value="qwen-2.5-coder-32b">qwen-2.5-coder-32b</option>
32503251 </optgroup>
32513252 <optgroup label="DeepSeek / Alibaba Cloud">
32523253 <option value="deepseek-r1-distill-qwen-32b">deepseek-r1-distill-qwen-32b</option>
3253- </optgroup>
3254- <optgroup label="DeepSeek / Meta">
32553254 <option value="deepseek-r1-distill-llama-70b">deepseek-r1-distill-llama-70b</option>
32563255 </optgroup>
32573256 <optgroup label="Google">
32583257 <option value="gemma2-9b-it">gemma2-9b-it</option>
32593258 </optgroup>
32603259 <optgroup label="Meta">
3260+ <option value="meta-llama/llama-4-scout-17b-16e-instruct">meta-llama/llama-4-scout-17b-16e-instruct</option>
3261+ <option value="meta-llama/llama-4-maverick-17b-128e-instruct">meta-llama/llama-4-maverick-17b-128e-instruct</option>
32613262 <option value="llama-3.1-8b-instant">llama-3.1-8b-instant</option>
32623263 <option value="llama-3.2-11b-vision-preview">llama-3.2-11b-vision-preview </option>
32633264 <option value="llama-3.2-1b-preview">llama-3.2-1b-preview </option>
@@ -3270,6 +3271,7 @@
32703271 <option value="llama3-8b-8192">llama3-8b-8192</option>
32713272 </optgroup>
32723273 <optgroup label="Mistral AI">
3274+ <option value="mistral-saba-24b">mistral-saba-24b</option>
32733275 <option value="mixtral-8x7b-32768">mixtral-8x7b-32768</option>
32743276 </optgroup>
32753277 </select>
@@ -6450,7 +6452,7 @@
64506452 <div class="mes_text"></div>
64516453 <div class="mes_img_container">
64526454 <div class="mes_img_controls">
64536455 <div title="EnlargeExpand and zoom" class="right_menu_button fa-lg fa-solid fa-magnifying-glass mes_img_enlarge" data-i18n="[title]EnlargeExpand and zoom"></div>
64546456 <div title="Caption" class="right_menu_button fa-lg fa-solid fa-envelope-open-text mes_img_caption" data-i18n="[title]Caption"></div>
64556457 <div title="Delete" class="right_menu_button fa-lg fa-solid fa-trash-can mes_img_delete" data-i18n="[title]Delete"></div>
64566458 </div>
public/locales/ar-sa.json+5 -5
@@ -318,23 +318,23 @@
318318 "flag": "وضع علامة",
319319 "API key (optional)": "مفتاح API (اختياري)",
320320 "Server url": "رابط الخادم",
321321 "Example: http://127.0.0.1:5000": "مثال: http://127.0.0.1:5000",
322322 "Custom model (optional)": "نموذج مخصص (اختياري)",
323323 "vllm-project/vllm": "vllm-project/vllm (وضع غلاف OpenAI API)",
324324 "vLLM API key": "مفتاح واجهة برمجة التطبيقات vLLM",
325325 "Example: http://127.0.0.1:8000": "مثال: http://127.0.0.1:8000",
326326 "vLLM Model": "نموذج vLLM",
327327 "PygmalionAI/aphrodite-engine": "PygmalionAI/aphrodite-engine (وضع التغليف لواجهة برمجة التطبيقات OpenAI)",
328328 "Aphrodite API key": "مفتاح واجهة برمجة التطبيقات Aphrodite",
329329 "Aphrodite Model": "نموذج أفروديت",
330330 "ggerganov/llama.cpp": "ggerganov/llama.cpp (خادم إخراج)",
331331 "Example: http://127.0.0.1:8080": "مثال: http://127.0.0.1:8080",
332332 "Example: http://127.0.0.1:11434": "مثال: http://127.0.0.1:11434",
333333 "Ollama Model": "نموذج Ollama",
334334 "Download": "تحميل",
335335 "Tabby API key": "مفتاح API لـ Tabby",
336336 "koboldcpp API key (optional)": "مفتاح koboldcpp API (اختياري)",
337337 "Example: http://127.0.0.1:5001": "مثال: http://127.0.0.1:5001",
338338 "Authorize": "تفويض",
339339 "Get your OpenRouter API token using OAuth flow. You will be redirected to openrouter.ai": "احصل على رمز واجهة برمجة التطبيقات الخاص بك لموزع الاتصالات باستخدام تدفق OAuth. سيتم توجيهك إلى openrouter.ai",
340340 "Bypass status check": "تجاوز فحص الحالة",
public/locales/de-de.json+5 -5
@@ -318,23 +318,23 @@
318318 "flag": "Flagge",
319319 "API key (optional)": "API-Schlüssel (optional)",
320320 "Server url": "Server-URL",
321321 "Example: http://127.0.0.1:5000": "Beispiel: http://127.0.0.1:5000",
322322 "Custom model (optional)": "Benutzerdefiniertes Modell (optional)",
323323 "vllm-project/vllm": "vllm-project/vllm (OpenAI API-Wrappermodus)",
324324 "vLLM API key": "vLLM-API-Schlüssel",
325325 "Example: http://127.0.0.1:8000": "Beispiel: http://127.0.0.1:8000",
326326 "vLLM Model": "vLLM-Modell",
327327 "PygmalionAI/aphrodite-engine": "PygmalionAI/aphrodite-engine (Wrappermodus für OpenAI API)",
328328 "Aphrodite API key": "Aphrodite API-Schlüssel",
329329 "Aphrodite Model": "Aphrodite-Modell",
330330 "ggerganov/llama.cpp": "ggerganov/llama.cpp (Output-Server)",
331331 "Example: http://127.0.0.1:8080": "Beispiel: http://127.0.0.1:8080",
332332 "Example: http://127.0.0.1:11434": "Beispiel: http://127.0.0.1:11434",
333333 "Ollama Model": "Ollama-Modell",
334334 "Download": "Herunterladen",
335335 "Tabby API key": "Tabby API-Schlüssel",
336336 "koboldcpp API key (optional)": "koboldcpp API-Schlüssel (optional)",
337337 "Example: http://127.0.0.1:5001": "Beispiel: http://127.0.0.1:5001",
338338 "Authorize": "Autorisieren",
339339 "Get your OpenRouter API token using OAuth flow. You will be redirected to openrouter.ai": "Hole dein OpenRouter-API-Token mit OAuth-Fluss. Du wirst zu openrouter.ai weitergeleitet",
340340 "Bypass status check": "Umgehe Statusüberprüfung",
public/locales/es-es.json+5 -5
@@ -318,23 +318,23 @@
318318 "flag": "bandera",
319319 "API key (optional)": "Clave API (opcional)",
320320 "Server url": "URL del servidor",
321321 "Example: http://127.0.0.1:5000": "Ejemplo: http://127.0.0.1:5000",
322322 "Custom model (optional)": "Modelo personalizado (opcional)",
323323 "vllm-project/vllm": "vllm-project/vllm (modo contenedor de API OpenAI)",
324324 "vLLM API key": "Clave API vLLM",
325325 "Example: http://127.0.0.1:8000": "Ejemplo: http://127.0.0.1:8000",
326326 "vLLM Model": "Modelo vLLM",
327327 "PygmalionAI/aphrodite-engine": "PygmalionAI/aphrodite-engine (Modo envolvente para API de OpenAI)",
328328 "Aphrodite API key": "Clave de API de Aphrodite",
329329 "Aphrodite Model": "Modelo Afrodita",
330330 "ggerganov/llama.cpp": "ggerganov/llama.cpp (Servidor de salida)",
331331 "Example: http://127.0.0.1:8080": "Ejemplo: http://127.0.0.1:8080",
332332 "Example: http://127.0.0.1:11434": "Ejemplo: http://127.0.0.1:11434",
333333 "Ollama Model": "Modelo Ollama",
334334 "Download": "Descargar",
335335 "Tabby API key": "Clave API de Tabby",
336336 "koboldcpp API key (optional)": "Clave API de koboldcpp (opcional)",
337337 "Example: http://127.0.0.1:5001": "Ejemplo: http://127.0.0.1:5001",
338338 "Authorize": "Autorizar",
339339 "Get your OpenRouter API token using OAuth flow. You will be redirected to openrouter.ai": "Obtenga su token de API de OpenRouter utilizando el flujo OAuth. Será redirigido a openrouter.ai",
340340 "Bypass status check": "Saltar la verificación del estado",
public/locales/fr-fr.json+5 -5
@@ -301,23 +301,23 @@
301301 "flag": "fanion",
302302 "API key (optional)": "Clé API (optionnelle)",
303303 "Server url": "URL du serveur",
304304 "Example: http://127.0.0.1:5000": "Exemple : http://127.0.0.1:5000",
305305 "Custom model (optional)": "Modèle personnalisé (optionnel)",
306306 "vllm-project/vllm": "vllm-project/vllm (mode wrapper de l'API OpenAI)",
307307 "vLLM API key": "Clé API vLLM",
308308 "Example: http://127.0.0.1:8000": "Exemple : http://127.0.0.1:8000",
309309 "vLLM Model": "Modèle vLLM",
310310 "PygmalionAI/aphrodite-engine": "PygmalionAI/aphrodite-engine (mode wrapper pour l'API OpenAI)",
311311 "Aphrodite API key": "Clé API Aphrodite",
312312 "Aphrodite Model": "Modèle Aphrodite",
313313 "ggerganov/llama.cpp": "ggerganov/llama.cpp",
314314 "Example: http://127.0.0.1:8080": "Exemple : http://127.0.0.1:8080",
315315 "Example: http://127.0.0.1:11434": "Exemple : http://127.0.0.1:11434",
316316 "Ollama Model": "Modèle Ollama",
317317 "Download": "Télécharger",
318318 "Tabby API key": "Clé API de Tabby",
319319 "koboldcpp API key (optional)": "Clé API koboldcpp (facultatif)",
320320 "Example: http://127.0.0.1:5001": "Exemple : http://127.0.0.1:5001",
321321 "Authorize": "Autoriser",
322322 "Get your OpenRouter API token using OAuth flow. You will be redirected to openrouter.ai": "Obtenez votre jeton API OpenRouter en utilisant le flux OAuth. Vous serez redirigé vers openrouter.ai",
323323 "Bypass status check": "Contourner la vérification de l'état",
public/locales/is-is.json+5 -5
@@ -318,23 +318,23 @@
318318 "flag": "merki",
319319 "API key (optional)": "API lykill (valkvæmt)",
320320 "Server url": "URL þjóns",
321321 "Example: http://127.0.0.1:5000": "Dæmi: http://127.0.0.1:5000",
322322 "Custom model (optional)": "Sérsniðið módel (valkvæmt)",
323323 "vllm-project/vllm": "vllm-project/vllm (OpenAI API umbúðastilling)",
324324 "vLLM API key": "vLLM API lykill",
325325 "Example: http://127.0.0.1:8000": "Dæmi: http://127.0.0.1:8000",
326326 "vLLM Model": "vLLM líkan",
327327 "PygmalionAI/aphrodite-engine": "PygmalionAI/aphrodite-engine (OpenAI forritunargrensl)",
328328 "Aphrodite API key": "Aphrodite API lykill",
329329 "Aphrodite Model": "Afródíta fyrirmynd",
330330 "ggerganov/llama.cpp": "ggerganov/llama.cpp (úttak þjónn)",
331331 "Example: http://127.0.0.1:8080": "Dæmi: http://127.0.0.1:8080",
332332 "Example: http://127.0.0.1:11434": "Dæmi: http://127.0.0.1:11434",
333333 "Ollama Model": "Ollama módel",
334334 "Download": "Niðurhal",
335335 "Tabby API key": "Tabby API lykill",
336336 "koboldcpp API key (optional)": "koboldcpp API lykill (valfrjálst)",
337337 "Example: http://127.0.0.1:5001": "Dæmi: http://127.0.0.1:5001",
338338 "Authorize": "Heimild",
339339 "Get your OpenRouter API token using OAuth flow. You will be redirected to openrouter.ai": "Fáðu API lykilinn þinn fyrir OpenRouter með því að nota OAuth strauminn. Þú verður endurvísað(ð/ur) á openrouter.ai",
340340 "Bypass status check": "Hlaupa framhjá stöðutík",
public/locales/it-it.json+5 -5
@@ -318,23 +318,23 @@
318318 "flag": "bandiera",
319319 "API key (optional)": "Chiave API (opzionale)",
320320 "Server url": "URL del server",
321321 "Example: http://127.0.0.1:5000": "Esempio: http://127.0.0.1:5000",
322322 "Custom model (optional)": "Modello personalizzato (opzionale)",
323323 "vllm-project/vllm": "vllm-project/vllm (modalità wrapper API OpenAI)",
324324 "vLLM API key": "Chiave API vLLM",
325325 "Example: http://127.0.0.1:8000": "Esempio: http://127.0.0.1:8000",
326326 "vLLM Model": "Modello vLLM",
327327 "PygmalionAI/aphrodite-engine": "PygmalionAI/aphrodite-engine (Modalità wrapper per l'API OpenAI)",
328328 "Aphrodite API key": "Chiave API di Aphrodite",
329329 "Aphrodite Model": "Modello di Afrodite",
330330 "ggerganov/llama.cpp": "ggerganov/llama.cpp (Server di output)",
331331 "Example: http://127.0.0.1:8080": "Esempio: http://127.0.0.1:8080",
332332 "Example: http://127.0.0.1:11434": "Esempio: http://127.0.0.1:11434",
333333 "Ollama Model": "Modello Ollama",
334334 "Download": "Scarica",
335335 "Tabby API key": "Chiave API di Tabby",
336336 "koboldcpp API key (optional)": "Chiave API koboldcpp (opzionale)",
337337 "Example: http://127.0.0.1:5001": "Esempio: http://127.0.0.1:5001",
338338 "Authorize": "Autorizzare",
339339 "Get your OpenRouter API token using OAuth flow. You will be redirected to openrouter.ai": "Ottieni il tuo token API di OpenRouter utilizzando il flusso OAuth. Sarai reindirizzato su openrouter.ai",
340340 "Bypass status check": "Ignora controllo stato",
public/locales/ja-jp.json+5 -5
@@ -318,23 +318,23 @@
318318 "flag": "フラグ",
319319 "API key (optional)": "APIキー(オプション)",
320320 "Server url": "サーバーURL",
321321 "Example: http://127.0.0.1:5000": "例: http://127.0.0.1:5000",
322322 "Custom model (optional)": "カスタムモデル(オプション)",
323323 "vllm-project/vllm": "vllm-project/vllm (OpenAI API ラッパーモード)",
324324 "vLLM API key": "vLLM API キー",
325325 "Example: http://127.0.0.1:8000": "例: http://127.0.0.1:8000",
326326 "vLLM Model": "vLLM モデル",
327327 "PygmalionAI/aphrodite-engine": "PygmalionAI/aphrodite-engine(OpenAI APIエンドポイントのパッケージングモード)",
328328 "Aphrodite API key": "アフロディーテAPIキー",
329329 "Aphrodite Model": "アフロディーテモデル",
330330 "ggerganov/llama.cpp": "ggerganov/llama.cpp(出力サーバー)",
331331 "Example: http://127.0.0.1:8080": "例: http://127.0.0.1:8080",
332332 "Example: http://127.0.0.1:11434": "例: http://127.0.0.1:11434",
333333 "Ollama Model": "Ollamaモデル",
334334 "Download": "ダウンロード",
335335 "Tabby API key": "TabbyのAPIキー",
336336 "koboldcpp API key (optional)": "koboldcpp API キー (オプション)",
337337 "Example: http://127.0.0.1:5001": "例: http://127.0.0.1:5001",
338338 "Authorize": "承認",
339339 "Get your OpenRouter API token using OAuth flow. You will be redirected to openrouter.ai": "OAuthフローを使用してOpenRouter APIトークンを取得します。 openrouter.aiにリダイレクトされます",
340340 "Bypass status check": "ステータスのチェックをバイパスする",
public/locales/ko-kr.json+5 -5
@@ -320,23 +320,23 @@
320320 "flag": "깃발",
321321 "API key (optional)": "API 키 (선택 사항)",
322322 "Server url": "서버 URL",
323323 "Example: http://127.0.0.1:5000": "예시: http://127.0.0.1:5000",
324324 "Custom model (optional)": "사용자 정의 모델 (선택 사항)",
325325 "vllm-project/vllm": "vllm-project/vllm(OpenAI API 래퍼 모드)",
326326 "vLLM API key": "vLLM API 키",
327327 "Example: http://127.0.0.1:8000": "예: http://127.0.0.1:8000",
328328 "vLLM Model": "vLLM 모델",
329329 "PygmalionAI/aphrodite-engine": "PygmalionAI/aphrodite-engine (OpenAI API의 래퍼 모드)",
330330 "Aphrodite API key": "Aphrodite API 키",
331331 "Aphrodite Model": "Aphrodite 모델",
332332 "ggerganov/llama.cpp": "ggerganov/llama.cpp (출력 서버)",
333333 "Example: http://127.0.0.1:8080": "예: http://127.0.0.1:8080",
334334 "Example: http://127.0.0.1:11434": "예: http://127.0.0.1:11434",
335335 "Ollama Model": "Ollama 모델",
336336 "Download": "다운로드",
337337 "Tabby API key": "Tabby API 키",
338338 "koboldcpp API key (optional)": "koboldcpp API 키(선택사항)",
339339 "Example: http://127.0.0.1:5001": "예: http://127.0.0.1:5001",
340340 "Authorize": "승인하기",
341341 "Get your OpenRouter API token using OAuth flow. You will be redirected to openrouter.ai": "OAuth 플로우를 사용하여 OpenRouter API 토큰을 가져옵니다. openrouter.ai로 리디렉션됩니다.",
342342 "Legacy API (pre-OAI, no streaming)": "레거시 API (OAI 이전, 스트리밍 없음)",
public/locales/nl-nl.json+5 -5
@@ -318,23 +318,23 @@
318318 "flag": "vlag",
319319 "API key (optional)": "API-sleutel (optioneel)",
320320 "Server url": "Server-URL",
321321 "Example: http://127.0.0.1:5000": "Voorbeeld: http://127.0.0.1:5000",
322322 "Custom model (optional)": "Aangepast model (optioneel)",
323323 "vllm-project/vllm": "vllm-project/vllm (OpenAI API-wrappermodus)",
324324 "vLLM API key": "vLLM API-sleutel",
325325 "Example: http://127.0.0.1:8000": "Voorbeeld: http://127.0.0.1:8000",
326326 "vLLM Model": "vLLM-model",
327327 "PygmalionAI/aphrodite-engine": "PygmalionAI/aphrodite-engine (Wrappermodus voor OpenAI API)",
328328 "Aphrodite API key": "Aphrodite API-sleutel",
329329 "Aphrodite Model": "Aphrodite-model",
330330 "ggerganov/llama.cpp": "ggerganov/llama.cpp (Output-server)",
331331 "Example: http://127.0.0.1:8080": "Voorbeeld: http://127.0.0.1:8080",
332332 "Example: http://127.0.0.1:11434": "Voorbeeld: http://127.0.0.1:11434",
333333 "Ollama Model": "Ollama-model",
334334 "Download": "Downloaden",
335335 "Tabby API key": "Tabby API-sleutel",
336336 "koboldcpp API key (optional)": "koboldcpp API-sleutel (optioneel)",
337337 "Example: http://127.0.0.1:5001": "Voorbeeld: http://127.0.0.1:5001",
338338 "Authorize": "Toestemming geven",
339339 "Get your OpenRouter API token using OAuth flow. You will be redirected to openrouter.ai": "Haal uw OpenRouter API-token op met behulp van OAuth-flow. U wordt doorgestuurd naar openrouter.ai",
340340 "Bypass status check": "Omzeil statuscontrole",
public/locales/pt-pt.json+5 -5
@@ -318,23 +318,23 @@
318318 "flag": "bandeira",
319319 "API key (optional)": "Chave da API (opcional)",
320320 "Server url": "URL do servidor",
321321 "Example: http://127.0.0.1:5000": "Exemplo: http://127.0.0.1:5000",
322322 "Custom model (optional)": "Modelo personalizado (opcional)",
323323 "vllm-project/vllm": "vllm-project/vllm (modo wrapper da API OpenAI)",
324324 "vLLM API key": "Chave de API vLLM",
325325 "Example: http://127.0.0.1:8000": "Exemplo: http://127.0.0.1:8000",
326326 "vLLM Model": "Modelo vLLM",
327327 "PygmalionAI/aphrodite-engine": "PygmalionAI/aphrodite-engine (Modo Wrapper para API OpenAI)",
328328 "Aphrodite API key": "Chave da API Aphrodite",
329329 "Aphrodite Model": "Modelo Afrodite",
330330 "ggerganov/llama.cpp": "ggerganov/llama.cpp (Servidor de Saída)",
331331 "Example: http://127.0.0.1:8080": "Exemplo: http://127.0.0.1:8080",
332332 "Example: http://127.0.0.1:11434": "Exemplo: http://127.0.0.1:11434",
333333 "Ollama Model": "Modelo Ollama",
334334 "Download": "Baixar",
335335 "Tabby API key": "Chave da API do Tabby",
336336 "koboldcpp API key (optional)": "Chave API koboldcpp (opcional)",
337337 "Example: http://127.0.0.1:5001": "Exemplo: http://127.0.0.1:5001",
338338 "Authorize": "Autorizar",
339339 "Get your OpenRouter API token using OAuth flow. You will be redirected to openrouter.ai": "Obtenha seu token da API do OpenRouter usando o fluxo OAuth. Você será redirecionado para openrouter.ai",
340340 "Bypass status check": "Ignorar verificação de status",
public/locales/ru-ru.json+5 -6
@@ -109,10 +109,10 @@
109109 "Get it here:": "Получите здесь:",
110110 "Register": "Зарегистрироваться",
111111 "TogetherAI Model": "Модель TogetherAI",
112112 "Example: http://127.0.0.1:5001": "Пример: http://127.0.0.1:5001",
113113 "ggerganov/llama.cpp": "ggerganov/llama.cpp (сервер вывода)",
114114 "Example: http://127.0.0.1:8080": "Пример: http://127.0.0.1:8080",
115115 "Example: http://127.0.0.1:11434": "Пример: http://127.0.0.1:11434",
116116 "Ollama Model": "Модель Ollama",
117117 "Download": "Скачать",
118118 "TogetherAI API Key": "TogetherAI API-ключ",
@@ -133,7 +133,7 @@
133133 "Server url": "URL-адрес сервера",
134134 "Custom model (optional)": "Пользовательская модель (необязательно)",
135135 "Bypass API status check": "Обход проверки статуса API",
136136 "Example: http://127.0.0.1:5000": "Пример: http://127.0.0.1:5000",
137137 "Bypass status check": "Обход проверки статуса",
138138 "Mancer API key": "Ключ от Mancer API",
139139 "to get your OpenAI API key.": "для получения ключа от API OpenAI",
@@ -1252,7 +1252,6 @@
12521252 "DreamGen Model": "Модель DreamGen",
12531253 "vllm-project/vllm": "vllm-project/vllm (режим враппера OpenAI API)",
12541254 "vLLM API key": "Ключ от API vLLM",
1255- "Example: 127.0.0.1:8000": "Example: http://127.0.0.1:8000",
12561255 "vLLM Model": "Модель vLLM",
12571256 "Aphrodite Model": "Модель Aphrodite",
12581257 "Peek a password": "Посмотреть пароль",
@@ -2033,7 +2032,7 @@
20332032 "[Currently loaded]": "[Загруженная сейчас]",
20342033 "Search providers...": "Искать по провайдерам...",
20352034 "Automatically chooses an alternative provider if chosen providers can't serve your request.": "Автоматически переключаться на другого провайдера, если текущий не может обслужить запрос.",
20362035 "Example: http://127.0.0.1:8000": "Пример: http://127.0.0.1:8000",
20372036 "Edit a connection profile": "Редактировать профиль соединения",
20382037 "System Prompt Name": "Название системного промпта",
20392038 "Use System Prompt": "Использовать системный промпт",
public/locales/uk-ua.json+5 -5
@@ -318,23 +318,23 @@
318318 "flag": "прапорцем",
319319 "API key (optional)": "Ключ API (необов'язково)",
320320 "Server url": "URL-адреса сервера",
321321 "Example: http://127.0.0.1:5000": "Приклад: http://127.0.0.1:5000",
322322 "Custom model (optional)": "Власна модель (необов'язково)",
323323 "vllm-project/vllm": "vllm-project/vllm (режим оболонки OpenAI API)",
324324 "vLLM API key": "Ключ API vLLM",
325325 "Example: http://127.0.0.1:8000": "Приклад: http://127.0.0.1:8000",
326326 "vLLM Model": "Модель vLLM",
327327 "PygmalionAI/aphrodite-engine": "PygmalionAI/aphrodite-engine (режим OpenAI API)",
328328 "Aphrodite API key": "Ключ API для Aphrodite",
329329 "Aphrodite Model": "Модель Афродіта",
330330 "ggerganov/llama.cpp": "ggerganov/llama.cpp (сервер виведення)",
331331 "Example: http://127.0.0.1:8080": "Приклад: http://127.0.0.1:8080",
332332 "Example: http://127.0.0.1:11434": "Приклад: http://127.0.0.1:11434",
333333 "Ollama Model": "Модель Ollama",
334334 "Download": "Завантажити",
335335 "Tabby API key": "Ключ API для Tabby",
336336 "koboldcpp API key (optional)": "API-ключ koboldcpp (необов’язково)",
337337 "Example: http://127.0.0.1:5001": "Приклад: http://127.0.0.1:5001",
338338 "Authorize": "Авторизувати",
339339 "Get your OpenRouter API token using OAuth flow. You will be redirected to openrouter.ai": "Отримайте свій токен API OpenRouter за допомогою OAuth. Вас буде перенаправлено на openrouter.ai",
340340 "Bypass status check": "Обійти перевірку статусу",
public/locales/vi-vn.json+5 -5
@@ -318,23 +318,23 @@
318318 "flag": "cờ",
319319 "API key (optional)": "Key API (tùy chọn)",
320320 "Server url": "URL máy chủ",
321321 "Example: http://127.0.0.1:5000": "Ví dụ: http://127.0.0.1:5000",
322322 "Custom model (optional)": "Model tùy chỉnh (tùy chọn)",
323323 "vllm-project/vllm": "vllm-project/vllm (Chế độ trình bao bọc API OpenAI)",
324324 "vLLM API key": "Key API vLLM",
325325 "Example: http://127.0.0.1:8000": "Ví dụ: http://127.0.0.1:8000",
326326 "vLLM Model": "Model vLLM",
327327 "PygmalionAI/aphrodite-engine": "PygmalionAI/aphrodite-engine (Chế độ đóng gói cho Giao diện lập trình ứng dụng OpenAI)",
328328 "Aphrodite API key": "Key API Aphrodite",
329329 "Aphrodite Model": "Moddel cho Aphrodite",
330330 "ggerganov/llama.cpp": "ggerganov/llama.cpp",
331331 "Example: http://127.0.0.1:8080": "Ví dụ: http://127.0.0.1:8080",
332332 "Example: http://127.0.0.1:11434": "Ví dụ: http://127.0.0.1:11434",
333333 "Ollama Model": "Model Ollama",
334334 "Download": "Tải xuống",
335335 "Tabby API key": "Key API Tabby",
336336 "koboldcpp API key (optional)": "Key API koboldcpp (tùy chọn)",
337337 "Example: http://127.0.0.1:5001": "Ví dụ: http://127.0.0.1:5001",
338338 "Cho phép": "Ủy quyền",
339339 "Get your OpenRouter API token using OAuth flow. You will be redirected to openrouter.ai": "Nhận mã thông báo API OpenRouter của bạn bằng cách sử dụng luồng OAuth. Bạn sẽ được chuyển hướng đến openrouter.ai",
340340 "Bypass status check": "Bỏ qua check trạng thái",
public/locales/zh-cn.json+5 -5
@@ -347,7 +347,7 @@
347347 "Mancer Model": "Mancer 模型",
348348 "API key (optional)": "API密钥(可选)",
349349 "Server url": "服务器URL",
350350 "Example: http://127.0.0.1:5000": "示例:http://127.0.0.1:5000",
351351 "Model ID (optional)": "模型 ID(可选)",
352352 "Make sure you run it with": "确保您在运行时加上",
353353 "flag": "标志",
@@ -364,7 +364,7 @@
364364 "No model description": "[无描述]",
365365 "vllm-project/vllm": "vllm-project/vllm(OpenAI API 包装器模式)",
366366 "vLLM API key": "vLLM API 密钥",
367367 "Example: http://127.0.0.1:8000": "示例:http://127.0.0.1:8000",
368368 "vLLM Model": "vLLM 模型",
369369 "HuggingFace Token": "HuggingFace 代币",
370370 "Endpoint URL": "端点 URL",
@@ -373,8 +373,8 @@
373373 "Aphrodite API key": "Aphrodite API 密钥",
374374 "Aphrodite Model": "Aphrodite 模型",
375375 "ggerganov/llama.cpp": "ggerganov/llama.cpp",
376376 "Example: http://127.0.0.1:8080": "示例:http://127.0.0.1:8080",
377377 "Example: http://127.0.0.1:11434": "示例:http://127.0.0.1:11434",
378378 "Ollama Model": "Ollama 模型",
379379 "Download": "下载",
380380 "Tabby API key": "Tabby API 密钥",
@@ -382,7 +382,7 @@
382382 "must be set in Tabby's config.yml to switch models.": "必须在Tabby的config.yml内设置以切换模型",
383383 "Use an admin API key.": "使用管理员API密钥。",
384384 "koboldcpp API key (optional)": "koboldcpp API 密钥(可选)",
385385 "Example: http://127.0.0.1:5001": "示例:http://127.0.0.1:5001",
386386 "Bypass status check": "跳过状态检查",
387387 "Derive context size from backend": "从后端获取上下文长度",
388388 "Authorize": "授权",
public/locales/zh-tw.json+5 -5
@@ -319,23 +319,23 @@
319319 "flag": "旗標",
320320 "API key (optional)": "API 金鑰(可選)",
321321 "Server url": "伺服器 URL",
322322 "Example: http://127.0.0.1:5000": "範例:http://127.0.0.1:5000",
323323 "Custom model (optional)": "自訂模型(選填)",
324324 "vllm-project/vllm": "vllm-project/vllm",
325325 "vLLM API key": "vLLM API 金鑰",
326326 "Example: http://127.0.0.1:8000": "範例:http://127.0.0.1:8000",
327327 "vLLM Model": "vLLM 模型",
328328 "PygmalionAI/aphrodite-engine": "PygmalionAI/aphrodite 引擎",
329329 "Aphrodite API key": "Aphrodite API 金鑰",
330330 "Aphrodite Model": "Aphrodite 模型",
331331 "ggerganov/llama.cpp": "ggerganov/llama.cpp",
332332 "Example: http://127.0.0.1:8080": "範例:http://127.0.0.1:8080",
333333 "Example: http://127.0.0.1:11434": "範例:http://127.0.0.1:11434",
334334 "Ollama Model": "Ollama 模型",
335335 "Download": "下載",
336336 "Tabby API key": "Tabby API 金鑰",
337337 "koboldcpp API key (optional)": "KoboldCpp API 金鑰(可選)",
338338 "Example: http://127.0.0.1:5001": "範例:http://127.0.0.1:5001",
339339 "Authorize": "授權",
340340 "Get your OpenRouter API token using OAuth flow. You will be redirected to openrouter.ai": "使用 OAuth 流程取得您的 OpenRouter API 符元。您將被重新導向到 openrouter.ai",
341341 "Bypass status check": "繞過狀態檢查",
public/script.js+18 -1
@@ -173,6 +173,7 @@ import {
173173 escapeHtml,
174174 saveBase64AsFile,
175175 uuidv4,
176+ equalsIgnoreCaseAndAccents,
176177} from './scripts/utils.js';
177178import { debounce_timeout, IGNORE_SYMBOL } from './scripts/constants.js';
178179
@@ -2133,7 +2134,7 @@ export function messageFormatting(mes, ch_name, isSystem, isUser, messageId, san
21332134 }
21342135
21352136 mes = mes.replace(
21362137 /<style>[\s\S]*?<\/style>|```[\s\S]*?```|~~~[\s\S]*?~~~|``[\s\S]*?``|`[\s\S]*?`|(".*?")|(\u201C.*?\u201D)|(\u00AB.*?\u00BB)|(\u300C.*?\u300D)|(\u300E.*?\u300F)|(\uFF02.*?\uFF02)/gmgim,
21372138 function (match, p1, p2, p3, p4, p5, p6) {
21382139 if (p1) {
21392140 // English double quotes
@@ -9878,6 +9879,15 @@ export async function renameChat(oldFileName, newName) {
98789879 renamed_file: `${newName.trim()}.jsonl`,
98799880 };
98809881
9882+ if (body.original_file === body.renamed_file) {
9883+ console.debug('Chat rename cancelled, old and new names are the same');
9884+ return;
9885+ }
9886+ if (equalsIgnoreCaseAndAccents(body.original_file, body.renamed_file)) {
9887+ toastr.warning(t`Name not accepted, as it is the same as before (ignoring case and accents).`, t`Rename Chat`);
9888+ return;
9889+ }
9890+
98819891 try {
98829892 showLoader();
98839893 const response = await fetch('/api/chats/rename', {
@@ -12209,4 +12219,11 @@ jQuery(async function () {
1220912219 });
1221012220
1221112221 initCustomSelectedSamplers();
12222+
12223+ window.addEventListener('beforeunload', (e) => {
12224+ if (isChatSaving) {
12225+ e.preventDefault();
12226+ e.returnValue = true;
12227+ }
12228+ });
1221212229});
public/scripts/chats.js+1 -1
@@ -459,7 +459,7 @@ export async function appendFileContent(message, messageText) {
459459 * @copyright https://github.com/kwaroran/risuAI
460460 */
461461export function encodeStyleTags(text) {
462462 const styleRegex = /<style>(.+?)<\/style>/gmsgims;
463463 return text.replaceAll(styleRegex, (_, match) => {
464464 return `<custom-style>${escape(match)}</custom-style>`;
465465 });
public/scripts/extensions/caption/settings.html+1 -0
@@ -65,6 +65,7 @@
6565 <option data-type="anthropic" value="claude-3-opus-20240229">claude-3-opus-20240229</option>
6666 <option data-type="anthropic" value="claude-3-sonnet-20240229">claude-3-sonnet-20240229</option>
6767 <option data-type="anthropic" value="claude-3-haiku-20240307">claude-3-haiku-20240307</option>
68+ <option data-type="google" value="gemini-2.5-pro-preview-03-25">gemini-2.5-pro-preview-03-25</option>
6869 <option data-type="google" value="gemini-2.5-pro-exp-03-25">gemini-2.5-pro-exp-03-25</option>
6970 <option data-type="google" value="gemini-2.0-pro-exp">gemini-2.0-pro-exp</option>
7071 <option data-type="google" value="gemini-2.0-pro-exp-02-05">gemini-2.0-pro-exp-02-05</option>
public/scripts/login.js+10 -5
@@ -180,13 +180,18 @@ function displayError(message) {
180180 * Preserves the query string.
181181 */
182182function redirectToHome() {
183183 // AfterCreate a loginURL theresobject nobased needon tothe preservecurrent thelocation
184- // noauto (if present)
184+ const currentUrl = new URL(window.location.href);
185- const urlParams = new URLSearchParams(window.location.search);
186185
187- urlParams.delete('noauto');
186+ // After a login there's no need to preserve the
187+ // noauto parameter (if present)
188+ currentUrl.searchParams.delete('noauto');
188189
189- window.location.href = '/' + urlParams.toString();
190+ // Set the pathname to root and keep the updated query string
191+ currentUrl.pathname = '/';
192+
193+ // Redirect to the new URL
194+ window.location.href = currentUrl.toString();
190195}
191196
192197/**
public/scripts/openai.js+5 -1
@@ -4193,6 +4193,9 @@ function getGroqMaxContext(model, isUnlocked) {
41934193 'qwen-2.5-32b': max_128k,
41944194 'deepseek-r1-distill-qwen-32b': max_128k,
41954195 'deepseek-r1-distill-llama-70b-specdec': max_128k,
4196+ 'mistral-saba-24b': max_32k,
4197+ 'meta-llama/llama-4-scout-17b-16e-instruct': max_128k,
4198+ 'meta-llama/llama-4-maverick-17b-128e-instruct': max_128k,
41964199 };
41974200
41984201 // Return context size if model found, otherwise default to 128k
@@ -4327,7 +4330,7 @@ async function onModelChange() {
43274330 $('#openai_max_context').attr('max', max_32k);
43284331 } else if (value.includes('gemini-1.5-pro') || value.includes('gemini-exp-1206') || value.includes('gemini-2.0-pro')) {
43294332 $('#openai_max_context').attr('max', max_2mil);
43304333 } else if (value.includes('gemini-1.5-flash') || value.includes('gemini-2.0-flash') || value.includes('gemini-2.5-pro-exp-03-25') || value.includes('gemini-2.5-pro-preview-03-25')) {
43314334 $('#openai_max_context').attr('max', max_1mil);
43324335 } else if (value.includes('gemini-1.0-pro') || value === 'gemini-pro') {
43334336 $('#openai_max_context').attr('max', max_32k);
@@ -4961,6 +4964,7 @@ export function isImageInliningSupported() {
49614964 const visionSupportedModels = [
49624965 'gpt-4-vision',
49634966 'gemini-2.5-pro-exp-03-25',
4967+ 'gemini-2.5-pro-preview-03-25',
49644968 'gemini-2.0-pro-exp',
49654969 'gemini-2.0-pro-exp-02-05',
49664970 'gemini-2.0-flash-lite-preview',
public/scripts/preset-manager.js+8 -1
@@ -36,7 +36,7 @@ import {
3636 textgenerationwebui_presets,
3737 textgenerationwebui_settings as textgen_settings,
3838} from './textgen-settings.js';
3939import { download, equalsIgnoreCaseAndAccents, parseJsonFile, waitUntilCondition } from './utils.js';
4040import { t } from './i18n.js';
4141import { reasoning_templates } from './reasoning.js';
4242
@@ -454,6 +454,9 @@ class PresetManager {
454454
455455 async renamePreset(newName) {
456456 const oldName = this.getSelectedPresetName();
457+ if (equalsIgnoreCaseAndAccents(oldName, newName)) {
458+ throw new Error('New name must be different from old name');
459+ }
457460 try {
458461 await this.savePreset(newName);
459462 await this.deletePreset(oldName);
@@ -892,6 +895,10 @@ export async function initPresetManager() {
892895 console.debug(!presetManager.isAdvancedFormatting() ? 'Preset rename cancelled' : 'Template rename cancelled');
893896 return;
894897 }
898+ if (equalsIgnoreCaseAndAccents(oldName, newName)) {
899+ toastr.warning(t`Name not accepted, as it is the same as before (ignoring case and accents).`, t`Rename Preset`);
900+ return;
901+ }
895902
896903 await presetManager.renamePreset(newName);
897904
public/scripts/reasoning.js+9 -0
@@ -832,6 +832,12 @@ function registerReasoningSlashCommands() {
832832 typeList: ARGUMENT_TYPE.NUMBER,
833833 enumProvider: commonEnumProviders.messages(),
834834 }),
835+ SlashCommandNamedArgument.fromProps({
836+ name: 'collapse',
837+ description: 'Whether to collapse the reasoning block. (If not provided, uses the default expand setting)',
838+ typeList: [ARGUMENT_TYPE.BOOLEAN],
839+ enumList: commonEnumProviders.boolean('trueFalse')(),
840+ }),
835841 ],
836842 unnamedArgumentList: [
837843 SlashCommandArgument.fromProps({
@@ -856,6 +862,9 @@ function registerReasoningSlashCommands() {
856862
857863 closeMessageEditor('reasoning');
858864 updateMessageBlock(messageId, message);
865+
866+ if (isTrueBoolean(String(args.collapse))) $(`#chat [mesid="${messageId}"] .mes_reasoning_details`).removeAttr('open');
867+ if (isFalseBoolean(String(args.collapse))) $(`#chat [mesid="${messageId}"] .mes_reasoning_details`).attr('open', '');
859868 return message.extra.reasoning;
860869 },
861870 }));
public/scripts/showdown-underscore.js+4 -4
@@ -8,10 +8,10 @@ export const markdownUnderscoreExt = () => {
88
99 return [{
1010 type: 'output',
1111 regex: new RegExp('(<code(?:\\s+[^>]*)?>[\\s\\S]*?<\\/code>|<style(?:\\s+[^>]*)?>[\\s\\S]*?<\\/style>)|\\b(?<!_)_(?!_)(.*?)(?<!_)_(?!_)\\b', 'ggi'),
1212 replace: function(match, codeContenttagContent, italicContent) {
1313 if (codeContenttagContent) {
1414 // If it's inside <code> or <style> tags, return unchanged
1515 return match;
1616 } else if (italicContent) {
1717 // If it's an italic group, apply the replacement
public/scripts/user.js+2 -2
@@ -9,8 +9,8 @@ import { ensureImageFormatSupported, getBase64Async, humanFileSize } from './uti
99export let currentUser = null;
1010export let accountsEnabled = false;
1111
1212// Extend the session every 3010 minutes
1313const SESSION_EXTEND_INTERVAL = 3010 * 60 * 1000;
1414
1515/**
1616 * Enable or disable user account controls in the UI.
public/scripts/world-info.js+5 -1
@@ -1,7 +1,7 @@
11import { Fuse } from '../lib.js';
22
33import { saveSettings, substituteParams, getRequestHeaders, chat_metadata, this_chid, characters, saveCharacterDebounced, menu_type, eventSource, event_types, getExtensionPromptByName, saveMetadata, getCurrentChatId, extension_prompt_roles } from '../script.js';
44import { download, debounce, initScrollHeight, resetScrollHeight, parseJsonFile, extractDataFromPng, getFileBuffer, getCharaFilename, getSortableDelay, escapeRegex, PAGINATION_TEMPLATE, navigation_option, waitUntilCondition, isTrueBoolean, setValueByPath, flashHighlight, select2ModifyOptions, getSelect2OptionId, dynamicSelect2DataViaAjax, highlightRegex, select2ChoiceClickSubscribe, isFalseBoolean, getSanitizedFilename, checkOverwriteExistingData, getStringHash, parseStringArray, cancelDebounce, findChar, onlyUnique, equalsIgnoreCaseAndAccents } from './utils.js';
55import { extension_settings, getContext } from './extensions.js';
66import { NOTE_MODULE_NAME, metadata_keys, shouldWIAddPrompt } from './authors-note.js';
77import { isMobile } from './RossAscends-mods.js';
@@ -3586,6 +3586,10 @@ async function renameWorldInfo(name, data) {
35863586 console.debug('World info rename cancelled');
35873587 return;
35883588 }
3589+ if (equalsIgnoreCaseAndAccents(oldName, newName)) {
3590+ toastr.warning(t`Name not accepted, as it is the same as before (ignoring case and accents).`, t`Rename World Info`);
3591+ return;
3592+ }
35893593
35903594 const entryPreviouslySelected = selected_world_info.findIndex((e) => e === oldName);
35913595
src/character-card-parser.js+1 -1
@@ -1,7 +1,7 @@
11import fs from 'node:fs';
22import { Buffer } from 'node:buffer';
33
44import encode from './png-chunks-/encode.js';
55import extract from 'png-chunks-extract';
66import PNGtext from 'png-chunk-text';
77
src/endpoints/google.js+1 -2
@@ -16,7 +16,7 @@ router.post('/caption-image', async (request, response) => {
1616 const base64Data = request.body.image.split(',')[1];
1717 const apiKey = request.body.reverse_proxy ? request.body.proxy_password : readSecret(request.user.directories, SECRET_KEYS.MAKERSUITE);
1818 const apiUrl = new URL(request.body.reverse_proxy || API_MAKERSUITE);
1919 const model = request.body.model || 'gemini-pro2.0-visionflash';
2020 const url = `${apiUrl.origin}/v1beta/models/${model}:generateContent?key=${apiKey}`;
2121 const body = {
2222 contents: [{
@@ -30,7 +30,6 @@ router.post('/caption-image', async (request, response) => {
3030 }],
3131 }],
3232 safetySettings: GEMINI_SAFETY,
33- generationConfig: { maxOutputTokens: 1000 },
3433 };
3534
3635 console.debug('Multimodal captioning request', model, body);
src/png/encode.js+68 -0
@@ -0,0 +1,68 @@
1+import { crc32 } from 'crc';
2+
3+/**
4+ * Encodes PNG chunks into a PNG file format buffer.
5+ * @param {Array<{ name: string; data: Uint8Array }>} chunks Array of PNG chunks
6+ * @returns {Uint8Array} Encoded PNG data
7+ * @copyright Based on https://github.com/hughsk/png-chunks-encode (MIT)
8+ */
9+export default function encode(chunks) {
10+ const uint8 = new Uint8Array(4);
11+ const int32 = new Int32Array(uint8.buffer);
12+ const uint32 = new Uint32Array(uint8.buffer);
13+
14+ let totalSize = 8;
15+ let idx = totalSize;
16+
17+ for (let i = 0; i < chunks.length; i++) {
18+ totalSize += chunks[i].data.length;
19+ totalSize += 12;
20+ }
21+
22+ const output = new Uint8Array(totalSize);
23+
24+ output[0] = 0x89;
25+ output[1] = 0x50;
26+ output[2] = 0x4E;
27+ output[3] = 0x47;
28+ output[4] = 0x0D;
29+ output[5] = 0x0A;
30+ output[6] = 0x1A;
31+ output[7] = 0x0A;
32+
33+ for (let i = 0; i < chunks.length; i++) {
34+ const { name, data } = chunks[i];
35+ const size = data.length;
36+ const nameChars = [
37+ name.charCodeAt(0),
38+ name.charCodeAt(1),
39+ name.charCodeAt(2),
40+ name.charCodeAt(3),
41+ ];
42+
43+ uint32[0] = size;
44+ output[idx++] = uint8[3];
45+ output[idx++] = uint8[2];
46+ output[idx++] = uint8[1];
47+ output[idx++] = uint8[0];
48+
49+ output[idx++] = nameChars[0];
50+ output[idx++] = nameChars[1];
51+ output[idx++] = nameChars[2];
52+ output[idx++] = nameChars[3];
53+
54+ for (let j = 0; j < size;) {
55+ output[idx++] = data[j++];
56+ }
57+
58+ const crc = crc32(data, crc32(new Uint8Array(nameChars)));
59+
60+ int32[0] = crc;
61+ output[idx++] = uint8[3];
62+ output[idx++] = uint8[2];
63+ output[idx++] = uint8[1];
64+ output[idx++] = uint8[0];
65+ }
66+
67+ return output;
68+}
src/prompt-converters.js+2 -1
@@ -360,6 +360,7 @@ export function convertCohereMessages(messages, names) {
360360 */
361361export function convertGooglePrompt(messages, model, useSysPrompt, names) {
362362 const visionSupportedModels = [
363+ 'gemini-2.5-pro-preview-03-25',
363364 'gemini-2.5-pro-exp-03-25',
364365 'gemini-2.0-pro-exp',
365366 'gemini-2.0-pro-exp-02-05',
@@ -412,7 +413,7 @@ export function convertGooglePrompt(messages, model, useSysPrompt, names) {
412413 }
413414 }
414415
415416 const system_instruction = { parts: [{ text: sys_prompt.trim() } ]};
416417 const toolNameMap = {};
417418
418419 const contents = [];