Localization improvements
| @@ -965,6 +965,7 @@ | |||
| 965 | "char_import_5": "Персонаж с AICharacterCards.com (прямая ссылка или ID)", | 965 | "char_import_5": "Персонаж с AICharacterCards.com (прямая ссылка или ID)", |
| 966 | "char_import_6": "Прямая ссылка на PNG-файл (список разрешённых хостов находится в", | 966 | "char_import_6": "Прямая ссылка на PNG-файл (список разрешённых хостов находится в", |
| 967 | "char_import_7": ")", | 967 | "char_import_7": ")", |
| 968 | "char_import_9": "Персонаж с Soulkyn (прямая ссылка)", | ||
| 968 | "Grammar String": "Грамматика", | 969 | "Grammar String": "Грамматика", |
| 969 | "GBNF or EBNF, depends on the backend in use. If you're using this you should know which.": "GBNF или EBNF, зависит от бэкенда. Если вы это используете, то, скорее всего, сами знаете, какой именно.", | 970 | "GBNF or EBNF, depends on the backend in use. If you're using this you should know which.": "GBNF или EBNF, зависит от бэкенда. Если вы это используете, то, скорее всего, сами знаете, какой именно.", |
| 970 | "Account": "Аккаунт", | 971 | "Account": "Аккаунт", |
| @@ -673,16 +673,8 @@ export const extension_prompt_roles = { | |||
| 673 | 673 | ||
| 674 | export const MAX_INJECTION_DEPTH = 10000; | 674 | export const MAX_INJECTION_DEPTH = 10000; |
| 675 | 675 | ||
| 676 | const SAFETY_CHAT = [ | 676 | // Initialized in getSystemMessages() |
| 677 | { | 677 | const SAFETY_CHAT = []; |
| 678 | name: systemUserName, | ||
| 679 | force_avatar: system_avatar, | ||
| 680 | is_system: true, | ||
| 681 | is_user: false, | ||
| 682 | create_date: 0, | ||
| 683 | mes: () => t`You deleted a character/chat and arrived back here for safety reasons! Pick another character!`, | ||
| 684 | }, | ||
| 685 | ]; | ||
| 686 | 678 | ||
| 687 | export let system_messages = {}; | 679 | export let system_messages = {}; |
| 688 | 680 | ||
| @@ -769,6 +761,16 @@ async function getSystemMessages() { | |||
| 769 | }, | 761 | }, |
| 770 | }, | 762 | }, |
| 771 | }; | 763 | }; |
| 764 | |||
| 765 | const safetyMessage = { | ||
| 766 | name: systemUserName, | ||
| 767 | force_avatar: system_avatar, | ||
| 768 | is_system: true, | ||
| 769 | is_user: false, | ||
| 770 | create_date: 0, | ||
| 771 | mes: t`You deleted a character/chat and arrived back here for safety reasons! Pick another character!`, | ||
| 772 | }; | ||
| 773 | SAFETY_CHAT.splice(0, SAFETY_CHAT.length, safetyMessage); | ||
| 772 | } | 774 | } |
| 773 | 775 | ||
| 774 | async function getClientVersion() { | 776 | async function getClientVersion() { |
| @@ -6747,8 +6749,6 @@ export function resetChatState() { | |||
| 6747 | name2 = (this_chid === undefined && neutralCharacterName) ? neutralCharacterName : systemUserName; | 6749 | name2 = (this_chid === undefined && neutralCharacterName) ? neutralCharacterName : systemUserName; |
| 6748 | //unsets expected chid before reloading (related to getCharacters/printCharacters from using old arrays) | 6750 | //unsets expected chid before reloading (related to getCharacters/printCharacters from using old arrays) |
| 6749 | setCharacterId(undefined); | 6751 | setCharacterId(undefined); |
| 6750 | // translate system user's message before diaplaying | ||
| 6751 | SAFETY_CHAT[0].mes = SAFETY_CHAT[0].mes(); | ||
| 6752 | // sets up system user to tell user about having deleted a character | 6752 | // sets up system user to tell user about having deleted a character |
| 6753 | chat.splice(0, chat.length, ...SAFETY_CHAT); | 6753 | chat.splice(0, chat.length, ...SAFETY_CHAT); |
| 6754 | // resets chat metadata | 6754 | // resets chat metadata |