Use init function

1dd3be947921e23f575b32dafb43f2d8e6559280

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

2 files changed, +4 -2Showing whitespace changes
public/script.js+2 -0
@@ -244,6 +244,7 @@ import { SlashCommandEnumValue, enumTypes } from './scripts/slash-commands/Slash
244244import { commonEnumProviders, enumIcons } from './scripts/slash-commands/SlashCommandCommonEnumsProvider.js';
245245import { initInputMarkdown } from './scripts/input-md-formatting.js';
246246import { AbortReason } from './scripts/util/AbortReason.js';
247+import { initSystemPrompts } from './scripts/sysprompt.js';
247248
248249//exporting functions and vars for mods
249250export {
@@ -932,6 +933,7 @@ async function firstLoadInit() {
932933 initLocales();
933934 initDefaultSlashCommands();
934935 initTextGenModels();
936+ initSystemPrompts();
935937 await getSystemMessages();
936938 sendSystemMessage(system_message_types.WELCOME);
937939 sendSystemMessage(system_message_types.WELCOME_PROMPT);
public/scripts/sysprompt.js+2 -2
@@ -137,7 +137,7 @@ function selectSystemPromptCallback(args, name) {
137137 return foundName;
138138}
139139
140140jQuery(export function initSystemPrompts() {
141141 $enabled.on('input', function () {
142142 power_user.sysprompt.enabled = !!$(this).prop('checked');
143143 toggleSystemPromptDisabledControls();
@@ -236,4 +236,4 @@ jQuery(function () {
236236 ],
237237 callback: toggleSystemPromptCallback,
238238 }));
239239});