Extend getContext API

c0436f4a321fc38ba94177f297608acb2a398136

Cohee <18619528+Cohee1207@users.noreply.github.com>

1 files changed, +6 -2Ignore whitespace
public/script.js+6 -2
@@ -227,7 +227,7 @@ import { appendFileContent, hasPendingFileAttachment, populateFileAttachment, de
227import { initPresetManager } from './scripts/preset-manager.js';227import { initPresetManager } from './scripts/preset-manager.js';
228import { MacrosParser, evaluateMacros } from './scripts/macros.js';228import { MacrosParser, evaluateMacros } from './scripts/macros.js';
229import { currentUser, setUserControls } from './scripts/user.js';229import { currentUser, setUserControls } from './scripts/user.js';
230import { POPUP_TYPE, Popup, callGenericPopup, fixToastrForDialogs } from './scripts/popup.js';230import { POPUP_RESULT, POPUP_TYPE, Popup, callGenericPopup, fixToastrForDialogs } from './scripts/popup.js';
231import { renderTemplate, renderTemplateAsync } from './scripts/templates.js';231import { renderTemplate, renderTemplateAsync } from './scripts/templates.js';
232import { ScraperManager } from './scripts/scrapers.js';232import { ScraperManager } from './scripts/scrapers.js';
233import { SlashCommandParser } from './scripts/slash-commands/SlashCommandParser.js';233import { SlashCommandParser } from './scripts/slash-commands/SlashCommandParser.js';
@@ -7184,7 +7184,8 @@ function onScenarioOverrideRemoveClick() {
7184 * @param {string} inputValue - Value to set the input to.7184 * @param {string} inputValue - Value to set the input to.
7185 * @param {PopupOptions} options - Options for the popup.7185 * @param {PopupOptions} options - Options for the popup.
7186 * @typedef {{okButton?: string, rows?: number, wide?: boolean, wider?: boolean, large?: boolean, allowHorizontalScrolling?: boolean, allowVerticalScrolling?: boolean, cropAspect?: number }} PopupOptions - Options for the popup.7186 * @typedef {{okButton?: string, rows?: number, wide?: boolean, wider?: boolean, large?: boolean, allowHorizontalScrolling?: boolean, allowVerticalScrolling?: boolean, cropAspect?: number }} PopupOptions - Options for the popup.
7187 * @returns7187 * @returns {Promise<any>} A promise that resolves when the popup is closed.
7188 * @deprecated Use `callGenericPopup` instead.
7188 */7189 */
7189export function callPopup(text, type, inputValue = '', { okButton, rows, wide, wider, large, allowHorizontalScrolling, allowVerticalScrolling, cropAspect } = {}) {7190export function callPopup(text, type, inputValue = '', { okButton, rows, wide, wider, large, allowHorizontalScrolling, allowVerticalScrolling, cropAspect } = {}) {
7190 function getOkButtonText() {7191 function getOkButtonText() {
@@ -7815,6 +7816,7 @@ window['SillyTavern'].getContext = function () {
7815 eventTypes: event_types,7816 eventTypes: event_types,
7816 addOneMessage: addOneMessage,7817 addOneMessage: addOneMessage,
7817 generate: Generate,7818 generate: Generate,
7819 stopGeneration: stopGeneration,
7818 getTokenCount: getTokenCount,7820 getTokenCount: getTokenCount,
7819 extensionPrompts: extension_prompts,7821 extensionPrompts: extension_prompts,
7820 setExtensionPrompt: setExtensionPrompt,7822 setExtensionPrompt: setExtensionPrompt,
@@ -7870,6 +7872,8 @@ window['SillyTavern'].getContext = function () {
7870 * @deprecated Legacy snake-case naming, compatibility with old extensions7872 * @deprecated Legacy snake-case naming, compatibility with old extensions
7871 */7873 */
7872 event_types: event_types,7874 event_types: event_types,
7875 POPUP_TYPE: POPUP_TYPE,
7876 POPUP_RESULT: POPUP_RESULT,
7873 };7877 };
7874};7878};
78757879