mirror of
https://github.com/SillyTavern/SillyTavern.git
synced 2025-06-05 21:59:27 +02:00
Move extensions init to function
This commit is contained in:
@@ -158,7 +158,7 @@ import {
|
|||||||
} from './scripts/utils.js';
|
} from './scripts/utils.js';
|
||||||
import { debounce_timeout } from './scripts/constants.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 { COMMENT_NAME_DEFAULT, executeSlashCommands, executeSlashCommandsOnChatInput, executeSlashCommandsWithOptions, getSlashCommandsHelp, initDefaultSlashCommands, isExecutingCommandsFromChatInput, pauseScriptExecution, processChatSlashCommands, registerSlashCommand, stopScriptExecution } from './scripts/slash-commands.js';
|
||||||
import {
|
import {
|
||||||
tag_map,
|
tag_map,
|
||||||
@@ -956,6 +956,7 @@ async function firstLoadInit() {
|
|||||||
initCfg();
|
initCfg();
|
||||||
initLogprobs();
|
initLogprobs();
|
||||||
initInputMarkdown();
|
initInputMarkdown();
|
||||||
|
initExtensions();
|
||||||
doDailyExtensionUpdatesCheck();
|
doDailyExtensionUpdatesCheck();
|
||||||
await hideLoader();
|
await hideLoader();
|
||||||
await fixViewport();
|
await fixViewport();
|
||||||
|
@@ -1041,7 +1041,7 @@ export async function openThirdPartyExtensionMenu(suggestUrl = '') {
|
|||||||
await installExtension(url);
|
await installExtension(url);
|
||||||
}
|
}
|
||||||
|
|
||||||
jQuery(async function () {
|
export async function initExtensions() {
|
||||||
await addExtensionsButtonAndMenu();
|
await addExtensionsButtonAndMenu();
|
||||||
$('#extensionsMenuButton').css('display', 'flex');
|
$('#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.
|
* @listens #third_party_extension_button#click - The click event of the '#third_party_extension_button' element.
|
||||||
*/
|
*/
|
||||||
$('#third_party_extension_button').on('click', () => openThirdPartyExtensionMenu());
|
$('#third_party_extension_button').on('click', () => openThirdPartyExtensionMenu());
|
||||||
});
|
}
|
||||||
|
Reference in New Issue
Block a user