diff --git a/public/script.js b/public/script.js index f53965eb3..0752d5600 100644 --- a/public/script.js +++ b/public/script.js @@ -595,7 +595,7 @@ let is_delete_mode = false; let fav_ch_checked = false; let scrollLock = false; export let abortStatusCheck = new AbortController(); -let charDragDropHandler = null; +export let charDragDropHandler = null; /** @type {debounce_timeout} The debounce timeout used for chat/settings save. debounce_timeout.long: 1.000 ms */ export const DEFAULT_SAVE_EDIT_TIMEOUT = debounce_timeout.relaxed; diff --git a/public/scripts/bookmarks.js b/public/scripts/bookmarks.js index 95a6a2517..719f6999a 100644 --- a/public/scripts/bookmarks.js +++ b/public/scripts/bookmarks.js @@ -1,7 +1,6 @@ import { characters, saveChat, - system_messages, system_message_types, this_chid, openCharacterChat, @@ -13,7 +12,7 @@ import { saveChatConditional, saveItemizedPrompts, } from '../script.js'; -import { humanizedDateTime, getMessageTimeStamp } from './RossAscends-mods.js'; +import { humanizedDateTime } from './RossAscends-mods.js'; import { getGroupPastChats, group_activation_strategy, diff --git a/public/scripts/extensions/stable-diffusion/index.js b/public/scripts/extensions/stable-diffusion/index.js index dfae3f1c5..923ee526b 100644 --- a/public/scripts/extensions/stable-diffusion/index.js +++ b/public/scripts/extensions/stable-diffusion/index.js @@ -2337,10 +2337,10 @@ function processReply(str) { str = str.replaceAll('“', ''); str = str.replaceAll('\n', ', '); str = str.normalize('NFD'); - + // Strip out non-alphanumeric characters barring model syntax exceptions str = str.replace(/[^a-zA-Z0-9.,:_(){}<>[\]\-'|#]+/g, ' '); - + str = str.replace(/\s+/g, ' '); // Collapse multiple whitespaces into one str = str.trim(); @@ -3234,7 +3234,7 @@ function getNovelParams() { extension_settings.sd.scheduler = 'karras'; } - if (extension_settings.sd.sampler === 'ddim' || + if (extension_settings.sd.sampler === 'ddim' || ['nai-diffusion-4-curated-preview', 'nai-diffusion-4-full'].includes(extension_settings.sd.model)) { sm = false; sm_dyn = false; @@ -3772,7 +3772,6 @@ async function addSDGenButtons() { $('#sd_wand_container').append(buttonHtml); $(document.body).append(dropdownHtml); - const messageButton = $('.sd_message_gen'); const button = $('#sd_gen'); const dropdown = $('#sd_dropdown'); dropdown.hide(); diff --git a/public/scripts/extensions/token-counter/index.js b/public/scripts/extensions/token-counter/index.js index 277019f40..f58212e1f 100644 --- a/public/scripts/extensions/token-counter/index.js +++ b/public/scripts/extensions/token-counter/index.js @@ -24,7 +24,7 @@ $('button').click(function () { async function doTokenCounter() { const { tokenizerName, tokenizerId } = getFriendlyTokenizerName(main_api); - const html = await renderExtensionTemplateAsync('token-counter', 'window', {tokenizerName}); + const html = await renderExtensionTemplateAsync('token-counter', 'window', { tokenizerName }); const dialog = $(html); const countDebounced = debounce(async () => { diff --git a/public/scripts/extensions/tts/index.js b/public/scripts/extensions/tts/index.js index 9f3b38727..a3067bd37 100644 --- a/public/scripts/extensions/tts/index.js +++ b/public/scripts/extensions/tts/index.js @@ -1,5 +1,5 @@ import { cancelTtsPlay, eventSource, event_types, getCurrentChatId, isStreamingEnabled, name2, saveSettingsDebounced, substituteParams } from '../../../script.js'; -import { ModuleWorkerWrapper, doExtrasFetch, extension_settings, getApiUrl, getContext, modules, renderExtensionTemplateAsync } from '../../extensions.js'; +import { ModuleWorkerWrapper, extension_settings, getContext, renderExtensionTemplateAsync } from '../../extensions.js'; import { delay, escapeRegex, getBase64Async, getStringHash, onlyUnique } from '../../utils.js'; import { EdgeTtsProvider } from './edge.js'; import { ElevenLabsTtsProvider } from './elevenlabs.js'; diff --git a/public/scripts/group-chats.js b/public/scripts/group-chats.js index e068baf76..337f3c247 100644 --- a/public/scripts/group-chats.js +++ b/public/scripts/group-chats.js @@ -46,7 +46,6 @@ import { hideSwipeButtons, chat_metadata, updateChatMetadata, - isStreamingEnabled, getThumbnailUrl, getRequestHeaders, setMenuType, diff --git a/public/scripts/slash-commands.js b/public/scripts/slash-commands.js index e1f8f0870..279c06c04 100644 --- a/public/scripts/slash-commands.js +++ b/public/scripts/slash-commands.js @@ -69,7 +69,7 @@ import { SlashCommand } from './slash-commands/SlashCommand.js'; import { SlashCommandAbortController } from './slash-commands/SlashCommandAbortController.js'; import { SlashCommandNamedArgumentAssignment } from './slash-commands/SlashCommandNamedArgumentAssignment.js'; import { SlashCommandEnumValue, enumTypes } from './slash-commands/SlashCommandEnumValue.js'; -import { POPUP_RESULT, POPUP_TYPE, Popup, callGenericPopup } from './popup.js'; +import { POPUP_TYPE, Popup, callGenericPopup } from './popup.js'; import { commonEnumProviders, enumIcons } from './slash-commands/SlashCommandCommonEnumsProvider.js'; import { SlashCommandBreakController } from './slash-commands/SlashCommandBreakController.js'; import { SlashCommandExecutionError } from './slash-commands/SlashCommandExecutionError.js'; diff --git a/public/scripts/world-info.js b/public/scripts/world-info.js index bda24ed32..88d02ce6c 100644 --- a/public/scripts/world-info.js +++ b/public/scripts/world-info.js @@ -1,6 +1,6 @@ import { Fuse } from '../lib.js'; -import { saveSettings, callPopup, substituteParams, getRequestHeaders, chat_metadata, this_chid, characters, saveCharacterDebounced, menu_type, eventSource, event_types, getExtensionPromptByName, saveMetadata, getCurrentChatId, extension_prompt_roles } from '../script.js'; +import { saveSettings, substituteParams, getRequestHeaders, chat_metadata, this_chid, characters, saveCharacterDebounced, menu_type, eventSource, event_types, getExtensionPromptByName, saveMetadata, getCurrentChatId, extension_prompt_roles } from '../script.js'; import { download, debounce, initScrollHeight, resetScrollHeight, parseJsonFile, extractDataFromPng, getFileBuffer, getCharaFilename, getSortableDelay, escapeRegex, PAGINATION_TEMPLATE, navigation_option, waitUntilCondition, isTrueBoolean, setValueByPath, flashHighlight, select2ModifyOptions, getSelect2OptionId, dynamicSelect2DataViaAjax, highlightRegex, select2ChoiceClickSubscribe, isFalseBoolean, getSanitizedFilename, checkOverwriteExistingData, getStringHash, parseStringArray, cancelDebounce, findChar, onlyUnique } from './utils.js'; import { extension_settings, getContext } from './extensions.js'; import { NOTE_MODULE_NAME, metadata_keys, shouldWIAddPrompt } from './authors-note.js'; diff --git a/src/test.js b/src/test.js deleted file mode 100644 index 354dc9608..000000000 --- a/src/test.js +++ /dev/null @@ -1,4 +0,0 @@ -const test={ -"FOO":"BAR" -} -