Merge branch 'staging' into char-find-and-sendas-extended

5295c4c0232011c5c65d882014ec60a3bb5ec396

Wolfsblvt <wolfsblvt@gmail.com>

8 files changed, +86 -32Showing whitespace changes
public/css/toggle-dependent.css+4 -0
@@ -459,3 +459,7 @@ body.expandMessageActions .mes .mes_buttons .extraMesButtonsHint {
459459.mdhotkey_icon {
460460 opacity: 0.6;
461461}
462+
463+label[for="trim_spaces"]:has(input:checked) i.warning {
464+ display: none;
465+}
public/index.html+8 -7
@@ -3222,6 +3222,7 @@
32223222 <label class="checkbox_label" for="trim_spaces">
32233223 <input id="trim_spaces" type="checkbox" />
32243224 <small data-i18n="Trim spaces">Trim spaces</small>
3225+ <i class="fa-sm fa-solid fa-exclamation-triangle warning" title="Disabling is not recommended." data-i18n="[title]Disabling is not recommended."></i>
32253226 </label>
32263227 <label class="checkbox_label" for="trim_sentences_checkbox">
32273228 <input id="trim_sentences_checkbox" type="checkbox" />
@@ -3282,7 +3283,7 @@
32823283 <label>
32833284 <small>
32843285 <span data-i18n="Activation Regex">Activation Regex</span>
32853286 <span class="fa-solid fa-circle-question" data-i18n="[title]instruct_template_activation_regex_desc" title="When connecting to an API or choosing a model, automatically activate this Instruct Template if the model name matches the provided regular expression."></span>
32863287 </small>
32873288 </label>
32883289 <div>
@@ -3323,7 +3324,7 @@
33233324 </h4>
33243325 <!-- We keep one auto-open so the user would know what is going on in the picked template -->
33253326 <details open>
33263327 <summary data-i18n="User Message Sequences">User Message Sequences</summary>
33273328 <div class="flex-container">
33283329 <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.">
33293330 <small data-i18n="User Prefix">User Message Prefix</small>
@@ -3336,7 +3337,7 @@
33363337 </div>
33373338 </details>
33383339 <details open>
33393340 <summary data-i18n="Assistant Message Sequences">Assistant Message Sequences</summary>
33403341 <div class="flex-container">
33413342 <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.">
33423343 <small data-i18n="Assistant Prefix">Assistant Message Prefix</small>
@@ -3349,7 +3350,7 @@
33493350 </div>
33503351 </details>
33513352 <details>
33523353 <summary data-i18n="System Message Sequences">System Message Sequences</summary>
33533354 <div class="flex-container">
33543355 <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.">
33553356 <small data-i18n="System Prefix">System Message Prefix</small>
@@ -3368,7 +3369,7 @@
33683369 </div>
33693370 </details>
33703371 <details>
33713372 <summary data-i18n="System Prompt Sequences">System Prompt Sequences</summary>
33723373 <div class="flex-container">
33733374 <div class="flexAuto" title="Inserted before a System prompt." data-i18n="[title]Inserted before a System prompt.">
33743375 <label for="instruct_system_sequence_prefix">
@@ -4132,7 +4133,7 @@
41324133 <input id="enable_auto_select_input" type="checkbox" />
41334134 <small data-i18n="Auto-select Input Text">Auto-select Input Text</small>
41344135 </label>
41354136 <label class="checkbox_label alignItemsCenter" for="enable_md_hotkeys" data-i18n="[title]markdown_hotkeys_desc" title="Enable hotkeys for inserting markdown format characters in certain text input boxes. See '/help hotkeys'.">
41364137 <input id="enable_md_hotkeys" type="checkbox" />
41374138 <small>
41384139 <span data-i18n="Markdown Hotkeys">Markdown Hotkeys</span>
@@ -5444,7 +5445,7 @@
54445445 <textarea class="text_pole" rows="1" name="comment" data-i18n="[placeholder]Entry Title/Memo" placeholder="Entry Title/Memo"></textarea>
54455446 </div>
54465447 <!-- <span class="world_entry_form_position_value"></span> -->
54475448 <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">
54485449 <option value="constant" title="Constant" data-i18n="[title]WI_Entry_Status_Constant">🔵</option>
54495450 <option value="normal" title="Normal" data-i18n="[title]WI_Entry_Status_Normal">🟢</option>
54505451 <option value="vectorized" title="Vectorized" data-i18n="[title]WI_Entry_Status_Vectorized">🔗</option>
public/locales/ru-ru.json+56 -13
@@ -105,8 +105,8 @@
105105 "API url": "URL-адрес API",
106106 "PygmalionAI/aphrodite-engine": "PygmalionAI/aphrodite-engine (Режим обёртки API OpenAI)",
107107 "Register a Horde account for faster queue times": "Заведите учетную запись Horde для ускорения генерации",
108108 "Adjust context size to worker capabilities": "УточнитьПодстраивать размер контекста в соответствии спод возможностямивозможности рабочих машин",
109109 "Adjust response length to worker capabilities": "УточнитьПодстраивать длиннудлину ответа в соответствии спод возможностямивозможности рабочих машин",
110110 "API key": "API-ключ",
111111 "Tabby API key": "Tabby API-ключ",
112112 "Get it here:": "Получить здесь:",
@@ -132,9 +132,9 @@
132132 "Novel AI Model": "Модель NovelAI",
133133 "Make sure you run it with": "Обязательно запускайте его с флагом",
134134 "flag": "",
135135 "API key (optional)": "Ключ API (опциональнонеобязательно)",
136136 "Server url": "URL-адрес сервера",
137137 "Custom model (optional)": "Пользовательская модель (опциональнонеобязательно)",
138138 "Bypass API status check": "Обход проверки статуса API",
139139 "Example: 127.0.0.1:5000": "Пример: http://127.0.0.1:5000",
140140 "Legacy API (pre-OAI, no streaming)": "Устаревший API (до OAI, без стриминга)",
@@ -173,7 +173,7 @@
173173 "Include Names": "Добавлять имена",
174174 "Force for Groups and Personas": "Также для групп и персон",
175175 "System Prompt": "Системный промпт",
176176 "Instruct Mode Sequences": "Строки для Instruct-режима",
177177 "Stop Sequence": "Стоп-строка",
178178 "Context Formatting": "Форматирование контекста",
179179 "(Saved to Context Template)": "(Сохраняется в шаблоне контекста)",
@@ -561,7 +561,7 @@
561561 "Example: [{{user}} is a 28-year-old Romanian cat girl.]": "Пример:\n [{{user}} is a 28-year-old Romanian cat girl.]",
562562 "Toggle grid view": "Переключить вид сетки",
563563 "Add to Favorites": "Добавить в Избранное",
564564 "Advanced Definition": "Расширенное определениеописание",
565565 "Character Lore": "Лор персонажа",
566566 "Export and Download": "Экспортировать и скачать",
567567 "Duplicate Character": "Дублировать персонажа",
@@ -737,12 +737,12 @@
737737 "System Prompt Prefix": "Префикс системного промпта",
738738 "System Prompt Suffix": "Постфикс системного промпта",
739739 "Chat Messages Wrapping": "Обрамление для сообщений в чате",
740740 "User Message Prefix": "Префикс сообщения пользователя",
741741 "User Message Suffix": "Постфикс сообщения пользователя",
742742 "Assistant Message Prefix": "Префикс сообщения ассистента",
743743 "Assistant Message Suffix": "Постфикс сообщения ассистента",
744744 "System Message Prefix": "Префикс сообщения системы",
745745 "System Message Suffix": "Постфикс сообщения системы",
746746 "System same as User": "Для системы то же самое, что и для пользователя",
747747 "Misc. Sequences": "Прочие строки",
748748 "First Assistant Prefix": "Первый префикс ассистента",
@@ -1704,5 +1704,48 @@
17041704 "chat_rename_1": "Введите новое имя чата:",
17051705 "chat_rename_2": "!!Не используйте имя уже существующего файла, это приведёт к ошибке!!",
17061706 "chat_rename_3": "Будут разрушены связи между чатами-чекпоинтами.",
17071707 "chat_rename_4": "Расширение '.jsonl' дописывать не нужно.",
1708+ "If you're connected to an API, try asking me something!": "Есть соединение с API? Напишите мне что-нибудь!",
1709+ "Connection Profile": "Профиль соединения",
1710+ "View connection profile details": "Посмотреть параметры профиля соединения",
1711+ "Create a new connection profile": "Создать новый профиль соединения",
1712+ "Update a connection profile": "Обновить профиль соединения",
1713+ "Rename a connection profile": "Переименовать профиль соединения",
1714+ "Reload a connection profile": "Перезагрузить профиль соединения",
1715+ "Delete a connection profile": "Удалить профиль соединения",
1716+ "No profile selected": "Профиль не выбран",
1717+ "Creating a Connection Profile": "Создать профиль соединения",
1718+ "Settings Preset": "Пресет настроек",
1719+ "Model": "Модель",
1720+ "Proxy Preset": "Пресет для прокси",
1721+ "Enter a name:": "Введите название:",
1722+ "Are you sure you want to delete the selected profile?": "Вы точно хотите удалить выбранный профиль?",
1723+ "instruct_enabled": "Включить Instruct-режим",
1724+ "Instruct Template": "Шаблон Instruct-режима",
1725+ "instruct_template_activation_regex_desc": "Автоматически активировать этот шаблон в момент подключения к API или выбора модели, если название модели соответствует этому рег. выражению.",
1726+ "instruct_bind_to_context": "При включении этой опции Шаблон контекста будет выбираться, исходя из выбранного в текущий момент Шаблона Instruct-режима, либо по вашему желанию.",
1727+ "Master Import": "Глоб. импорт",
1728+ "Import Advanced Formatting settings": "Импорт настроек Расширенного форматирования\nТакже принимает файлы старого формата с Шаблонами контекста и Шаблонами Instruct-режима.",
1729+ "Master Export": "Глоб. экспорт",
1730+ "Export Advanced Formatting settings": "Экспорт настроек Расширенного форматирования",
1731+ "Select your current System Prompt": "Выберите текущий системный промпт",
1732+ "Prompt Content": "Текст промпта",
1733+ "Update current prompt": "Обновить текущий промпт",
1734+ "Save prompt as": "Сохранить как...",
1735+ "Import template": "Импорт шаблона",
1736+ "Export template": "Экспорт шаблона",
1737+ "Restore current prompt": "Восстановить текущий промпт",
1738+ "comma delimited,no spaces between": "через запятую,без пробелов в промежутках",
1739+ "User Message Sequences": "Строки для сообщений пользователя",
1740+ "Assistant Message Sequences": "Строки для сообщений ассистента",
1741+ "System Message Sequences": "Строки для сообщений системы",
1742+ "System Prompt Sequences": "Строки для системного промпта",
1743+ "sysprompt_enabled": "Вкл/выкл системный промпт",
1744+ "Are you sure you want to delete this alternate greeting?": "Вы точно хотите удалить этот вариант?",
1745+ "Any contents here will replace the default Post-History Instructions used for this character. (v2 spec: post_history_instructions)": "Содержимое этого поля заменит стандартные Инструкции после истории, применяемые для этого персонажа. (v2 spec: post_history_instructions)",
1746+ "None (disabled)": "Нигде (откл.)",
1747+ "Markdown Hotkeys": "Горячие клавиши для разметки",
1748+ "markdown_hotkeys_desc": "Включить горячие клавиши для вставки символов разметки в некоторых полях ввода. См. '/help hotkeys'.",
1749+ "Save and Update": "Сохранить и обновить",
1750+ "Profile name:": "Название профиля:"
17081751}
public/script.js+6 -4
@@ -7877,7 +7877,7 @@ function addAlternateGreeting(template, greeting, index, getArray, popup) {
78777877 event.preventDefault();
78787878 event.stopPropagation();
78797879
78807880 if (confirm('t`Are you sure you want to delete this alternate greeting?'`)) {
78817881 const array = getArray();
78827882 array.splice(index, 1);
78837883
@@ -10727,10 +10727,12 @@ jQuery(async function () {
1072710727 if ($(e.target).hasClass('text_pole')) {
1072810728 return;
1072910729 }
1073010730 varconst icondrawer = $(this).findclosest('.inline-drawer-icon');
10731+ const icon = drawer.find('.inline-drawer-icon');
10732+ const drawerContent = drawer.find('.inline-drawer-content');
1073110733 icon.toggleClass('down up');
1073210734 icon.toggleClass('fa-circle-chevron-down fa-circle-chevron-up');
10733- $(this).closest('.inline-drawer').find('.inline-drawer-content').stop().slideToggle({
10735+ drawerContent.stop().slideToggle({
1073410736 complete: () => {
1073510737 $(this).css('height', '');
1073610738 },
@@ -10738,7 +10740,7 @@ jQuery(async function () {
1073810740
1073910741 // Set the height of "autoSetHeight" textareas within the inline-drawer to their scroll height
1074010742 if (!CSS.supports('field-sizing', 'content')) {
1074110743 $(this).closest('.inline-drawer')drawerContent.find('.inline-drawer-content textarea.autoSetHeight').each(async function () {
1074210744 await resetScrollHeight($(this));
1074310745 return;
1074410746 });
public/scripts/extensions/connection-manager/edit.html+1 -1
@@ -8,5 +8,5 @@
88 </label>
99 {{/each}}
1010 </div>
1111 <h3 data-i18n="Profile name:">Profile name:</h3>
1212</div>
public/scripts/extensions/connection-manager/index.js+4 -4
@@ -10,6 +10,7 @@ import { enumTypes, SlashCommandEnumValue } from '../../slash-commands/SlashComm
1010import { SlashCommandParser } from '../../slash-commands/SlashCommandParser.js';
1111import { SlashCommandScope } from '../../slash-commands/SlashCommandScope.js';
1212import { collapseSpaces, getUniqueName, isFalseBoolean, uuidv4 } from '../../utils.js';
13+import { t } from '../../i18n.js';
1314
1415const MODULE_NAME = 'connection-manager';
1516const NONE = '<None>';
@@ -284,7 +285,7 @@ async function deleteConnectionProfile() {
284285 }
285286
286287 const name = extension_settings.connectionManager.profiles[index].name;
287288 const confirm = await Popup.show.confirm('t`Are you sure you want to delete the selected profile?'`, name);
288289
289290 if (!confirm) {
290291 return;
@@ -398,7 +399,7 @@ async function renderDetailsContent(detailsContent) {
398399 const template = await renderExtensionTemplateAsync(MODULE_NAME, 'view', templateParams);
399400 detailsContent.innerHTML = template;
400401 } else {
401402 detailsContent.textContent = 't`No profile selected'`;
402403 }
403404}
404405
@@ -518,7 +519,6 @@ async function renderDetailsContent(detailsContent) {
518519 console.log('No profile selected');
519520 return;
520521 }
521-
522522 if (!Array.isArray(profile.exclude)) {
523523 profile.exclude = [];
524524 }
@@ -534,7 +534,7 @@ async function renderDetailsContent(detailsContent) {
534534 const template = $(await renderExtensionTemplateAsync(MODULE_NAME, 'edit', { name: profile.name, settings }));
535535 const newName = await callGenericPopup(template, POPUP_TYPE.INPUT, profile.name, {
536536 customButtons: [{
537537 text: 't`Save and Update'`,
538538 classes: ['popup-button-ok'],
539539 result: POPUP_RESULT.AFFIRMATIVE,
540540 action: () => {
public/scripts/templates/worldInfoKeywordHeaders.html+3 -3
@@ -1,8 +1,8 @@
11<div id="WIEntryHeaderTitlesPC" class="flex-container wide100p spaceBetween justifyCenter textAlignCenter" style="padding:0 4.5em;">
22 <small class="flex1" data-i18n="Title/Memo">Title/Memo</small>
33 <small style="width: calc(3.5em + 15px10px)" data-i18n="Strategy">Strategy</small>
44 <small style="width: calc(3.5em + 30px20px)" data-i18n="Position">Position</small>
55 <small style="width: calc(3.5em + 20px15px)" data-i18n="Depth">Depth</small>
66 <small style="width: calc(3.5em + 20px)" data-i18n="Order">Order</small>
77 <small style="width: calc(3.5em + 15px)" data-i18n="Trigger %">Trigger %</small>
88</div>
public/style.css+4 -0
@@ -2241,6 +2241,10 @@ textarea::placeholder {
22412241 height: fit-content;
22422242}
22432243
2244+select.text_pole {
2245+ padding-right: 20px;
2246+}
2247+
22442248
22452249.chat_injections_list:empty {
22462250 width: 100%;