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 {
100100 proxies,
101101 loadProxyPresets,
102102 selected_proxy,
103103 initOpenaiinitOpenAI,
104104} from './scripts/openai.js';
105105
106106import {
@@ -930,9 +930,10 @@ async function firstLoadInit() {
930930 addSafariPatch();
931931 await getClientVersion();
932932 await readSecretState();
933933 await initLocales();
934934 initDefaultSlashCommands();
935935 initTextGenModels();
936+ initOpenAI();
936937 initSystemPrompts();
937938 await initPresetManager();
938939 await getSystemMessages();
@@ -942,7 +943,6 @@ async function firstLoadInit() {
942943 initKeyboard();
943944 initDynamicStyles();
944945 initTags();
945- initOpenai();
946946 initBookmarks();
947947 await getUserAvatars(true, user_avatar);
948948 await getCharacters();
public/scripts/chats.js+3 -2
@@ -135,10 +135,11 @@ export async function hideChatMessageRange(start, end, unhide) {
135135 const message = chat[messageId];
136136 if (!message) continue;
137137
138+ message.is_system = hide;
139+
140+ // Also toggle "hidden" state for all visible messages
138141 const messageBlock = $(`.mes[mesid="${messageId}"]`);
139142 if (!messageBlock.length) continue;
140-
141- message.is_system = hide;
142143 messageBlock.attr('is_system', String(hide));
143144 }
144145
public/scripts/extensions/stable-diffusion/index.js+4 -1
@@ -3813,7 +3813,10 @@ jQuery(async () => {
38133813 ],
38143814 helpString: `
38153815 <div>
38163816 Requests to generate an image and posts it to chat (unless <code>quiet=true</code> argument is specified).</code>.
3817+ </div>
3818+ <div>
3819+ Supported arguments: <code>${Object.values(triggerWords).flat().join(', ')}</code>.
38173820 </div>
38183821 <div>
38193822 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) {
49374937 return foundName;
49384938}
49394939
49404940export function initOpenaiinitOpenAI() {
49414941 SlashCommandParser.addCommandObject(SlashCommand.fromProps({
49424942 name: 'proxy',
49434943 callback: runProxyCallback,
@@ -4953,9 +4953,7 @@ export function initOpenai() {
49534953 ],
49544954 helpString: 'Sets a proxy preset by name.',
49554955 }));
4956-}
49574956
4958-$(document).ready(async function () {
49594957 $('#test_api_button').on('click', testApiConnection);
49604958
49614959 $('#scale-alt').on('change', function () {
@@ -5419,4 +5417,4 @@ $(document).ready(async function () {
54195417 $('#openai_proxy_password_show').on('click', onProxyPasswordShowClick);
54205418 $('#customize_additional_parameters').on('click', onCustomizeParametersClick);
54215419 $('#openai_proxy_preset').on('change', onProxyPresetChange);
54225420});