Use init function
| @@ -244,6 +244,7 @@ import { SlashCommandEnumValue, enumTypes } from './scripts/slash-commands/Slash | ||
| 244 | 244 | import { commonEnumProviders, enumIcons } from './scripts/slash-commands/SlashCommandCommonEnumsProvider.js'; |
| 245 | 245 | import { initInputMarkdown } from './scripts/input-md-formatting.js'; |
| 246 | 246 | import { AbortReason } from './scripts/util/AbortReason.js'; |
| 247 | +import { initSystemPrompts } from './scripts/sysprompt.js'; | |
| 247 | 248 | |
| 248 | 249 | //exporting functions and vars for mods |
| 249 | 250 | export { |
| @@ -932,6 +933,7 @@ async function firstLoadInit() { | ||
| 932 | 933 | initLocales(); |
| 933 | 934 | initDefaultSlashCommands(); |
| 934 | 935 | initTextGenModels(); |
| 936 | + initSystemPrompts(); | |
| 935 | 937 | await getSystemMessages(); |
| 936 | 938 | sendSystemMessage(system_message_types.WELCOME); |
| 937 | 939 | sendSystemMessage(system_message_types.WELCOME_PROMPT); |
| @@ -137,7 +137,7 @@ function selectSystemPromptCallback(args, name) { | ||
| 137 | 137 | return foundName; |
| 138 | 138 | } |
| 139 | 139 | |
| 140 | 140 | jQuery(export function initSystemPrompts() { |
| 141 | 141 | $enabled.on('input', function () { |
| 142 | 142 | power_user.sysprompt.enabled = !!$(this).prop('checked'); |
| 143 | 143 | toggleSystemPromptDisabledControls(); |
| @@ -236,4 +236,4 @@ jQuery(function () { | ||
| 236 | 236 | ], |
| 237 | 237 | callback: toggleSystemPromptCallback, |
| 238 | 238 | })); |
| 239 | 239 | }); |