Fix fixable lints
| @@ -595,7 +595,7 @@ let is_delete_mode = false; | |||
| 595 | let fav_ch_checked = false; | 595 | let fav_ch_checked = false; |
| 596 | let scrollLock = false; | 596 | let scrollLock = false; |
| 597 | export let abortStatusCheck = new AbortController(); | 597 | export let abortStatusCheck = new AbortController(); |
| 598 | let charDragDropHandler = null; | 598 | export let charDragDropHandler = null; |
| 599 | 599 | ||
| 600 | /** @type {debounce_timeout} The debounce timeout used for chat/settings save. debounce_timeout.long: 1.000 ms */ | 600 | /** @type {debounce_timeout} The debounce timeout used for chat/settings save. debounce_timeout.long: 1.000 ms */ |
| 601 | export const DEFAULT_SAVE_EDIT_TIMEOUT = debounce_timeout.relaxed; | 601 | export const DEFAULT_SAVE_EDIT_TIMEOUT = debounce_timeout.relaxed; |
| @@ -1,7 +1,6 @@ | |||
| 1 | import { | 1 | import { |
| 2 | characters, | 2 | characters, |
| 3 | saveChat, | 3 | saveChat, |
| 4 | system_messages, | ||
| 5 | system_message_types, | 4 | system_message_types, |
| 6 | this_chid, | 5 | this_chid, |
| 7 | openCharacterChat, | 6 | openCharacterChat, |
| @@ -13,7 +12,7 @@ import { | |||
| 13 | saveChatConditional, | 12 | saveChatConditional, |
| 14 | saveItemizedPrompts, | 13 | saveItemizedPrompts, |
| 15 | } from '../script.js'; | 14 | } from '../script.js'; |
| 16 | import { humanizedDateTime, getMessageTimeStamp } from './RossAscends-mods.js'; | 15 | import { humanizedDateTime } from './RossAscends-mods.js'; |
| 17 | import { | 16 | import { |
| 18 | getGroupPastChats, | 17 | getGroupPastChats, |
| 19 | group_activation_strategy, | 18 | group_activation_strategy, |
| @@ -2337,10 +2337,10 @@ function processReply(str) { | |||
| 2337 | str = str.replaceAll('“', ''); | 2337 | str = str.replaceAll('“', ''); |
| 2338 | str = str.replaceAll('\n', ', '); | 2338 | str = str.replaceAll('\n', ', '); |
| 2339 | str = str.normalize('NFD'); | 2339 | str = str.normalize('NFD'); |
| 2340 | 2340 | ||
| 2341 | // Strip out non-alphanumeric characters barring model syntax exceptions | 2341 | // Strip out non-alphanumeric characters barring model syntax exceptions |
| 2342 | str = str.replace(/[^a-zA-Z0-9.,:_(){}<>[\]\-'|#]+/g, ' '); | 2342 | str = str.replace(/[^a-zA-Z0-9.,:_(){}<>[\]\-'|#]+/g, ' '); |
| 2343 | 2343 | ||
| 2344 | str = str.replace(/\s+/g, ' '); // Collapse multiple whitespaces into one | 2344 | str = str.replace(/\s+/g, ' '); // Collapse multiple whitespaces into one |
| 2345 | str = str.trim(); | 2345 | str = str.trim(); |
| 2346 | 2346 | ||
| @@ -3234,7 +3234,7 @@ function getNovelParams() { | |||
| 3234 | extension_settings.sd.scheduler = 'karras'; | 3234 | extension_settings.sd.scheduler = 'karras'; |
| 3235 | } | 3235 | } |
| 3236 | 3236 | ||
| 3237 | if (extension_settings.sd.sampler === 'ddim' || | 3237 | if (extension_settings.sd.sampler === 'ddim' || |
| 3238 | ['nai-diffusion-4-curated-preview', 'nai-diffusion-4-full'].includes(extension_settings.sd.model)) { | 3238 | ['nai-diffusion-4-curated-preview', 'nai-diffusion-4-full'].includes(extension_settings.sd.model)) { |
| 3239 | sm = false; | 3239 | sm = false; |
| 3240 | sm_dyn = false; | 3240 | sm_dyn = false; |
| @@ -3772,7 +3772,6 @@ async function addSDGenButtons() { | |||
| 3772 | $('#sd_wand_container').append(buttonHtml); | 3772 | $('#sd_wand_container').append(buttonHtml); |
| 3773 | $(document.body).append(dropdownHtml); | 3773 | $(document.body).append(dropdownHtml); |
| 3774 | 3774 | ||
| 3775 | const messageButton = $('.sd_message_gen'); | ||
| 3776 | const button = $('#sd_gen'); | 3775 | const button = $('#sd_gen'); |
| 3777 | const dropdown = $('#sd_dropdown'); | 3776 | const dropdown = $('#sd_dropdown'); |
| 3778 | dropdown.hide(); | 3777 | dropdown.hide(); |
| @@ -24,7 +24,7 @@ $('button').click(function () { | |||
| 24 | 24 | ||
| 25 | async function doTokenCounter() { | 25 | async function doTokenCounter() { |
| 26 | const { tokenizerName, tokenizerId } = getFriendlyTokenizerName(main_api); | 26 | const { tokenizerName, tokenizerId } = getFriendlyTokenizerName(main_api); |
| 27 | const html = await renderExtensionTemplateAsync('token-counter', 'window', {tokenizerName}); | 27 | const html = await renderExtensionTemplateAsync('token-counter', 'window', { tokenizerName }); |
| 28 | 28 | ||
| 29 | const dialog = $(html); | 29 | const dialog = $(html); |
| 30 | const countDebounced = debounce(async () => { | 30 | const countDebounced = debounce(async () => { |
| @@ -1,5 +1,5 @@ | |||
| 1 | import { cancelTtsPlay, eventSource, event_types, getCurrentChatId, isStreamingEnabled, name2, saveSettingsDebounced, substituteParams } from '../../../script.js'; | 1 | import { cancelTtsPlay, eventSource, event_types, getCurrentChatId, isStreamingEnabled, name2, saveSettingsDebounced, substituteParams } from '../../../script.js'; |
| 2 | import { ModuleWorkerWrapper, doExtrasFetch, extension_settings, getApiUrl, getContext, modules, renderExtensionTemplateAsync } from '../../extensions.js'; | 2 | import { ModuleWorkerWrapper, extension_settings, getContext, renderExtensionTemplateAsync } from '../../extensions.js'; |
| 3 | import { delay, escapeRegex, getBase64Async, getStringHash, onlyUnique } from '../../utils.js'; | 3 | import { delay, escapeRegex, getBase64Async, getStringHash, onlyUnique } from '../../utils.js'; |
| 4 | import { EdgeTtsProvider } from './edge.js'; | 4 | import { EdgeTtsProvider } from './edge.js'; |
| 5 | import { ElevenLabsTtsProvider } from './elevenlabs.js'; | 5 | import { ElevenLabsTtsProvider } from './elevenlabs.js'; |
| @@ -46,7 +46,6 @@ import { | |||
| 46 | hideSwipeButtons, | 46 | hideSwipeButtons, |
| 47 | chat_metadata, | 47 | chat_metadata, |
| 48 | updateChatMetadata, | 48 | updateChatMetadata, |
| 49 | isStreamingEnabled, | ||
| 50 | getThumbnailUrl, | 49 | getThumbnailUrl, |
| 51 | getRequestHeaders, | 50 | getRequestHeaders, |
| 52 | setMenuType, | 51 | setMenuType, |
| @@ -69,7 +69,7 @@ import { SlashCommand } from './slash-commands/SlashCommand.js'; | |||
| 69 | import { SlashCommandAbortController } from './slash-commands/SlashCommandAbortController.js'; | 69 | import { SlashCommandAbortController } from './slash-commands/SlashCommandAbortController.js'; |
| 70 | import { SlashCommandNamedArgumentAssignment } from './slash-commands/SlashCommandNamedArgumentAssignment.js'; | 70 | import { SlashCommandNamedArgumentAssignment } from './slash-commands/SlashCommandNamedArgumentAssignment.js'; |
| 71 | import { SlashCommandEnumValue, enumTypes } from './slash-commands/SlashCommandEnumValue.js'; | 71 | import { SlashCommandEnumValue, enumTypes } from './slash-commands/SlashCommandEnumValue.js'; |
| 72 | import { POPUP_RESULT, POPUP_TYPE, Popup, callGenericPopup } from './popup.js'; | 72 | import { POPUP_TYPE, Popup, callGenericPopup } from './popup.js'; |
| 73 | import { commonEnumProviders, enumIcons } from './slash-commands/SlashCommandCommonEnumsProvider.js'; | 73 | import { commonEnumProviders, enumIcons } from './slash-commands/SlashCommandCommonEnumsProvider.js'; |
| 74 | import { SlashCommandBreakController } from './slash-commands/SlashCommandBreakController.js'; | 74 | import { SlashCommandBreakController } from './slash-commands/SlashCommandBreakController.js'; |
| 75 | import { SlashCommandExecutionError } from './slash-commands/SlashCommandExecutionError.js'; | 75 | import { SlashCommandExecutionError } from './slash-commands/SlashCommandExecutionError.js'; |
| @@ -1,6 +1,6 @@ | |||
| 1 | import { Fuse } from '../lib.js'; | 1 | import { Fuse } from '../lib.js'; |
| 2 | 2 | ||
| 3 | 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'; | 3 | import { saveSettings, substituteParams, getRequestHeaders, chat_metadata, this_chid, characters, saveCharacterDebounced, menu_type, eventSource, event_types, getExtensionPromptByName, saveMetadata, getCurrentChatId, extension_prompt_roles } from '../script.js'; |
| 4 | 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'; | 4 | 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'; |
| 5 | import { extension_settings, getContext } from './extensions.js'; | 5 | import { extension_settings, getContext } from './extensions.js'; |
| 6 | import { NOTE_MODULE_NAME, metadata_keys, shouldWIAddPrompt } from './authors-note.js'; | 6 | import { NOTE_MODULE_NAME, metadata_keys, shouldWIAddPrompt } from './authors-note.js'; |
| @@ -1,4 +0,0 @@ | |||
| 1 | const test={ | ||
| 2 | "FOO":"BAR" | ||
| 3 | } | ||
| 4 | |||