Merge branch 'staging' into sysprompt-divorce
| @@ -100,7 +100,7 @@ import { | ||
| 100 | 100 | proxies, |
| 101 | 101 | loadProxyPresets, |
| 102 | 102 | selected_proxy, |
| 103 | 103 | initOpenaiinitOpenAI, |
| 104 | 104 | } from './scripts/openai.js'; |
| 105 | 105 | |
| 106 | 106 | import { |
| @@ -930,9 +930,10 @@ async function firstLoadInit() { | ||
| 930 | 930 | addSafariPatch(); |
| 931 | 931 | await getClientVersion(); |
| 932 | 932 | await readSecretState(); |
| 933 | 933 | await initLocales(); |
| 934 | 934 | initDefaultSlashCommands(); |
| 935 | 935 | initTextGenModels(); |
| 936 | + initOpenAI(); | |
| 936 | 937 | initSystemPrompts(); |
| 937 | 938 | await initPresetManager(); |
| 938 | 939 | await getSystemMessages(); |
| @@ -942,7 +943,6 @@ async function firstLoadInit() { | ||
| 942 | 943 | initKeyboard(); |
| 943 | 944 | initDynamicStyles(); |
| 944 | 945 | initTags(); |
| 945 | - initOpenai(); | |
| 946 | 946 | initBookmarks(); |
| 947 | 947 | await getUserAvatars(true, user_avatar); |
| 948 | 948 | await getCharacters(); |
| @@ -135,10 +135,11 @@ export async function hideChatMessageRange(start, end, unhide) { | ||
| 135 | 135 | const message = chat[messageId]; |
| 136 | 136 | if (!message) continue; |
| 137 | 137 | |
| 138 | + message.is_system = hide; | |
| 139 | + | |
| 140 | + // Also toggle "hidden" state for all visible messages | |
| 138 | 141 | const messageBlock = $(`.mes[mesid="${messageId}"]`); |
| 139 | 142 | if (!messageBlock.length) continue; |
| 140 | - | |
| 141 | - message.is_system = hide; | |
| 142 | 143 | messageBlock.attr('is_system', String(hide)); |
| 143 | 144 | } |
| 144 | 145 | |
| @@ -3813,7 +3813,10 @@ jQuery(async () => { | ||
| 3813 | 3813 | ], |
| 3814 | 3814 | helpString: ` |
| 3815 | 3815 | <div> |
| 3816 | 3816 | 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>. | |
| 3817 | 3820 | </div> |
| 3818 | 3821 | <div> |
| 3819 | 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. |
| @@ -4937,7 +4937,7 @@ function runProxyCallback(_, value) { | ||
| 4937 | 4937 | return foundName; |
| 4938 | 4938 | } |
| 4939 | 4939 | |
| 4940 | 4940 | export function initOpenaiinitOpenAI() { |
| 4941 | 4941 | SlashCommandParser.addCommandObject(SlashCommand.fromProps({ |
| 4942 | 4942 | name: 'proxy', |
| 4943 | 4943 | callback: runProxyCallback, |
| @@ -4953,9 +4953,7 @@ export function initOpenai() { | ||
| 4953 | 4953 | ], |
| 4954 | 4954 | helpString: 'Sets a proxy preset by name.', |
| 4955 | 4955 | })); |
| 4956 | -} | |
| 4957 | 4956 | |
| 4958 | -$(document).ready(async function () { | |
| 4959 | 4957 | $('#test_api_button').on('click', testApiConnection); |
| 4960 | 4958 | |
| 4961 | 4959 | $('#scale-alt').on('change', function () { |
| @@ -5419,4 +5417,4 @@ $(document).ready(async function () { | ||
| 5419 | 5417 | $('#openai_proxy_password_show').on('click', onProxyPasswordShowClick); |
| 5420 | 5418 | $('#customize_additional_parameters').on('click', onCustomizeParametersClick); |
| 5421 | 5419 | $('#openai_proxy_preset').on('change', onProxyPresetChange); |
| 5422 | 5420 | }); |