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