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