unvendor: Replace DOMPurify

This commit is contained in:
Cohee
2024-10-16 23:11:13 +03:00
parent e6d8f0a33e
commit 3387fe4bd6
20 changed files with 67 additions and 31 deletions

View File

@@ -1,5 +1,7 @@
'use strict';
import { DOMPurify } from '../lib.js';
import { event_types, eventSource, is_send_press, main_api, substituteParams } from '../script.js';
import { is_group_generating } from './group-chats.js';
import { Message, TokenHandler } from './openai.js';

View File

@@ -1,3 +1,5 @@
import { DOMPurify } from '../lib.js';
import {
characters,
online_status,

View File

@@ -1,3 +1,5 @@
import { DOMPurify } from '../lib.js';
import { eventSource, event_types, saveSettings, saveSettingsDebounced, getRequestHeaders, animation_duration } from '../script.js';
import { showLoader } from './loader.js';
import { POPUP_RESULT, POPUP_TYPE, Popup, callGenericPopup } from './popup.js';

View File

@@ -3,6 +3,7 @@ TODO:
*/
//const DEBUG_TONY_SAMA_FORK_MODE = true
import { DOMPurify } from '../../../lib.js';
import { getRequestHeaders, processDroppedFiles, eventSource, event_types } from '../../../script.js';
import { deleteExtension, extensionNames, getContext, installExtension, renderExtensionTemplateAsync } from '../../extensions.js';
import { POPUP_TYPE, Popup, callGenericPopup } from '../../popup.js';

View File

@@ -3,7 +3,7 @@
* By CncAnon (@CncAnon1)
* https://github.com/CncAnon1/TavernAITurbo
*/
import { Fuse } from '../lib.js';
import { Fuse, DOMPurify } from '../lib.js';
import {
abortStatusCheck,

View File

@@ -1,3 +1,4 @@
import { DOMPurify } from '../lib.js';
import { callPopup, getRequestHeaders } from '../script.js';
export const SECRET_KEYS = {

View File

@@ -1,4 +1,4 @@
import { Fuse } from '../lib.js';
import { Fuse, DOMPurify } from '../lib.js';
import {
Generate,

View File

@@ -1,3 +1,4 @@
import { DOMPurify } from '../../lib.js';
import { sendSystemMessage, system_message_types } from '../../script.js';
import { callGenericPopup, POPUP_TYPE } from '../popup.js';
import { escapeHtml } from '../utils.js';

View File

@@ -1,3 +1,5 @@
import { DOMPurify } from '../lib.js';
import {
characters,
saveSettingsDebounced,

View File

@@ -1,3 +1,4 @@
import { DOMPurify } from '../lib.js';
import { applyLocale } from './i18n.js';
/**

View File

@@ -1,3 +1,4 @@
import { DOMPurify } from '../lib.js';
import { isMobile } from './RossAscends-mods.js';
import { amount_gen, callPopup, eventSource, event_types, getRequestHeaders, max_context, online_status, setGenerationParamsFromPreset } from '../script.js';
import { textgenerationwebui_settings as textgen_settings, textgen_types } from './textgen-settings.js';

View File

@@ -1,3 +1,5 @@
import { DOMPurify } from '../lib.js';
import { addOneMessage, chat, event_types, eventSource, main_api, saveChatConditional, system_avatar, systemUserName } from '../script.js';
import { chat_completion_sources, oai_settings } from './openai.js';
import { Popup } from './popup.js';

View File

@@ -1,3 +1,5 @@
import { DOMPurify } from '../lib.js';
import { getContext } from './extensions.js';
import { characters, getRequestHeaders, this_chid } from '../script.js';
import { isMobile } from './RossAscends-mods.js';