Merge branch 'staging' into sysprompt-divorce

1864b7d8689f3893b1905ec9a68d00eab3817106

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

4 files changed, +12 -10Showing whitespace changes
public/script.js+3 -3
@@ -100,7 +100,7 @@ import {
100 proxies,100 proxies,
101 loadProxyPresets,101 loadProxyPresets,
102 selected_proxy,102 selected_proxy,
103 initOpenai,103 initOpenAI,
104} from './scripts/openai.js';104} from './scripts/openai.js';
105105
106import {106import {
@@ -930,9 +930,10 @@ async function firstLoadInit() {
930 addSafariPatch();930 addSafariPatch();
931 await getClientVersion();931 await getClientVersion();
932 await readSecretState();932 await readSecretState();
933 initLocales();933 await initLocales();
934 initDefaultSlashCommands();934 initDefaultSlashCommands();
935 initTextGenModels();935 initTextGenModels();
936 initOpenAI();
936 initSystemPrompts();937 initSystemPrompts();
937 await initPresetManager();938 await initPresetManager();
938 await getSystemMessages();939 await getSystemMessages();
@@ -942,7 +943,6 @@ async function firstLoadInit() {
942 initKeyboard();943 initKeyboard();
943 initDynamicStyles();944 initDynamicStyles();
944 initTags();945 initTags();
945 initOpenai();
946 initBookmarks();946 initBookmarks();
947 await getUserAvatars(true, user_avatar);947 await getUserAvatars(true, user_avatar);
948 await getCharacters();948 await getCharacters();
public/scripts/chats.js+3 -2
@@ -135,10 +135,11 @@ export async function hideChatMessageRange(start, end, unhide) {
135 const message = chat[messageId];135 const message = chat[messageId];
136 if (!message) continue;136 if (!message) continue;
137137
138 message.is_system = hide;
139
140 // Also toggle "hidden" state for all visible messages
138 const messageBlock = $(`.mes[mesid="${messageId}"]`);141 const messageBlock = $(`.mes[mesid="${messageId}"]`);
139 if (!messageBlock.length) continue;142 if (!messageBlock.length) continue;
140
141 message.is_system = hide;
142 messageBlock.attr('is_system', String(hide));143 messageBlock.attr('is_system', String(hide));
143 }144 }
144145
public/scripts/extensions/stable-diffusion/index.js+4 -1
@@ -3813,7 +3813,10 @@ jQuery(async () => {
3813 ],3813 ],
3814 helpString: `3814 helpString: `
3815 <div>3815 <div>
3816 Requests to generate an image and posts it to chat (unless <code>quiet=true</code> argument is specified).</code>.3816 Requests to generate an image and posts it to chat (unless <code>quiet=true</code> argument is specified).
3817 </div>
3818 <div>
3819 Supported arguments: <code>${Object.values(triggerWords).flat().join(', ')}</code>.
3817 </div>3820 </div>
3818 <div>3821 <div>
3819 Anything else would trigger a "free mode" to make generate whatever you prompted. Example: <code>/imagine apple tree</code> would generate a picture of an apple tree. Returns a link to the generated image.3822 Anything else would trigger a "free mode" to make generate whatever you prompted. Example: <code>/imagine apple tree</code> would generate a picture of an apple tree. Returns a link to the generated image.
public/scripts/openai.js+2 -4
@@ -4937,7 +4937,7 @@ function runProxyCallback(_, value) {
4937 return foundName;4937 return foundName;
4938}4938}
49394939
4940export function initOpenai() {4940export function initOpenAI() {
4941 SlashCommandParser.addCommandObject(SlashCommand.fromProps({4941 SlashCommandParser.addCommandObject(SlashCommand.fromProps({
4942 name: 'proxy',4942 name: 'proxy',
4943 callback: runProxyCallback,4943 callback: runProxyCallback,
@@ -4953,9 +4953,7 @@ export function initOpenai() {
4953 ],4953 ],
4954 helpString: 'Sets a proxy preset by name.',4954 helpString: 'Sets a proxy preset by name.',
4955 }));4955 }));
4956}
49574956
4958$(document).ready(async function () {
4959 $('#test_api_button').on('click', testApiConnection);4957 $('#test_api_button').on('click', testApiConnection);
49604958
4961 $('#scale-alt').on('change', function () {4959 $('#scale-alt').on('change', function () {
@@ -5419,4 +5417,4 @@ $(document).ready(async function () {
5419 $('#openai_proxy_password_show').on('click', onProxyPasswordShowClick);5417 $('#openai_proxy_password_show').on('click', onProxyPasswordShowClick);
5420 $('#customize_additional_parameters').on('click', onCustomizeParametersClick);5418 $('#customize_additional_parameters').on('click', onCustomizeParametersClick);
5421 $('#openai_proxy_preset').on('change', onProxyPresetChange);5419 $('#openai_proxy_preset').on('change', onProxyPresetChange);
5422});5420}