mirror of
https://github.com/SillyTavern/SillyTavern.git
synced 2025-03-06 12:47:57 +01:00
Extend getContext API
This commit is contained in:
parent
7de43d3a9c
commit
c0436f4a32
@ -227,7 +227,7 @@ import { appendFileContent, hasPendingFileAttachment, populateFileAttachment, de
|
||||
import { initPresetManager } from './scripts/preset-manager.js';
|
||||
import { MacrosParser, evaluateMacros } from './scripts/macros.js';
|
||||
import { currentUser, setUserControls } from './scripts/user.js';
|
||||
import { POPUP_TYPE, Popup, callGenericPopup, fixToastrForDialogs } from './scripts/popup.js';
|
||||
import { POPUP_RESULT, POPUP_TYPE, Popup, callGenericPopup, fixToastrForDialogs } from './scripts/popup.js';
|
||||
import { renderTemplate, renderTemplateAsync } from './scripts/templates.js';
|
||||
import { ScraperManager } from './scripts/scrapers.js';
|
||||
import { SlashCommandParser } from './scripts/slash-commands/SlashCommandParser.js';
|
||||
@ -7184,7 +7184,8 @@ function onScenarioOverrideRemoveClick() {
|
||||
* @param {string} inputValue - Value to set the input to.
|
||||
* @param {PopupOptions} options - Options for the popup.
|
||||
* @typedef {{okButton?: string, rows?: number, wide?: boolean, wider?: boolean, large?: boolean, allowHorizontalScrolling?: boolean, allowVerticalScrolling?: boolean, cropAspect?: number }} PopupOptions - Options for the popup.
|
||||
* @returns
|
||||
* @returns {Promise<any>} A promise that resolves when the popup is closed.
|
||||
* @deprecated Use `callGenericPopup` instead.
|
||||
*/
|
||||
export function callPopup(text, type, inputValue = '', { okButton, rows, wide, wider, large, allowHorizontalScrolling, allowVerticalScrolling, cropAspect } = {}) {
|
||||
function getOkButtonText() {
|
||||
@ -7815,6 +7816,7 @@ window['SillyTavern'].getContext = function () {
|
||||
eventTypes: event_types,
|
||||
addOneMessage: addOneMessage,
|
||||
generate: Generate,
|
||||
stopGeneration: stopGeneration,
|
||||
getTokenCount: getTokenCount,
|
||||
extensionPrompts: extension_prompts,
|
||||
setExtensionPrompt: setExtensionPrompt,
|
||||
@ -7870,6 +7872,8 @@ window['SillyTavern'].getContext = function () {
|
||||
* @deprecated Legacy snake-case naming, compatibility with old extensions
|
||||
*/
|
||||
event_types: event_types,
|
||||
POPUP_TYPE: POPUP_TYPE,
|
||||
POPUP_RESULT: POPUP_RESULT,
|
||||
};
|
||||
};
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user