mirror of
https://github.com/SillyTavern/SillyTavern.git
synced 2025-02-12 10:00:36 +01:00
Move extensions init to function
This commit is contained in:
parent
fbc590b641
commit
ff989b3352
@ -158,7 +158,7 @@ import {
|
||||
} from './scripts/utils.js';
|
||||
import { debounce_timeout } from './scripts/constants.js';
|
||||
|
||||
import { ModuleWorkerWrapper, doDailyExtensionUpdatesCheck, extension_settings, getContext, loadExtensionSettings, renderExtensionTemplate, renderExtensionTemplateAsync, runGenerationInterceptors, saveMetadataDebounced, writeExtensionField } from './scripts/extensions.js';
|
||||
import { ModuleWorkerWrapper, doDailyExtensionUpdatesCheck, extension_settings, getContext, initExtensions, loadExtensionSettings, renderExtensionTemplate, renderExtensionTemplateAsync, runGenerationInterceptors, saveMetadataDebounced, writeExtensionField } from './scripts/extensions.js';
|
||||
import { COMMENT_NAME_DEFAULT, executeSlashCommands, executeSlashCommandsOnChatInput, executeSlashCommandsWithOptions, getSlashCommandsHelp, initDefaultSlashCommands, isExecutingCommandsFromChatInput, pauseScriptExecution, processChatSlashCommands, registerSlashCommand, stopScriptExecution } from './scripts/slash-commands.js';
|
||||
import {
|
||||
tag_map,
|
||||
@ -956,6 +956,7 @@ async function firstLoadInit() {
|
||||
initCfg();
|
||||
initLogprobs();
|
||||
initInputMarkdown();
|
||||
initExtensions();
|
||||
doDailyExtensionUpdatesCheck();
|
||||
await hideLoader();
|
||||
await fixViewport();
|
||||
|
@ -1041,7 +1041,7 @@ export async function openThirdPartyExtensionMenu(suggestUrl = '') {
|
||||
await installExtension(url);
|
||||
}
|
||||
|
||||
jQuery(async function () {
|
||||
export async function initExtensions() {
|
||||
await addExtensionsButtonAndMenu();
|
||||
$('#extensionsMenuButton').css('display', 'flex');
|
||||
|
||||
@ -1060,4 +1060,4 @@ jQuery(async function () {
|
||||
* @listens #third_party_extension_button#click - The click event of the '#third_party_extension_button' element.
|
||||
*/
|
||||
$('#third_party_extension_button').on('click', () => openThirdPartyExtensionMenu());
|
||||
});
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user