Merge branch 'staging' into parser-followup-2

This commit is contained in:
LenAnderson
2024-07-09 07:54:27 -04:00
2 changed files with 13 additions and 10 deletions

View File

@ -160,7 +160,7 @@ import {
import { debounce_timeout } from './scripts/constants.js'; import { debounce_timeout } from './scripts/constants.js';
import { ModuleWorkerWrapper, doDailyExtensionUpdatesCheck, extension_settings, getContext, loadExtensionSettings, renderExtensionTemplate, renderExtensionTemplateAsync, runGenerationInterceptors, saveMetadataDebounced, writeExtensionField } from './scripts/extensions.js'; import { ModuleWorkerWrapper, doDailyExtensionUpdatesCheck, extension_settings, getContext, loadExtensionSettings, renderExtensionTemplate, renderExtensionTemplateAsync, runGenerationInterceptors, saveMetadataDebounced, writeExtensionField } from './scripts/extensions.js';
import { COMMENT_NAME_DEFAULT, executeSlashCommands, executeSlashCommandsOnChatInput, getSlashCommandsHelp, initDefaultSlashCommands, isExecutingCommandsFromChatInput, pauseScriptExecution, processChatSlashCommands, registerSlashCommand, stopScriptExecution } from './scripts/slash-commands.js'; import { COMMENT_NAME_DEFAULT, executeSlashCommands, executeSlashCommandsOnChatInput, executeSlashCommandsWithOptions, getSlashCommandsHelp, initDefaultSlashCommands, isExecutingCommandsFromChatInput, pauseScriptExecution, processChatSlashCommands, registerSlashCommand, stopScriptExecution } from './scripts/slash-commands.js';
import { import {
tag_map, tag_map,
tags, tags,
@ -7863,22 +7863,23 @@ window['SillyTavern'].getContext = function () {
saveReply, saveReply,
substituteParams, substituteParams,
substituteParamsExtended, substituteParamsExtended,
SlashCommandParser,
executeSlashCommandsWithOptions,
/** @deprecated Use SlashCommandParser.addCommandObject() instead */
registerSlashCommand: registerSlashCommand, registerSlashCommand: registerSlashCommand,
/** @deprecated Use executeSlashCommandWithOptions instead */
executeSlashCommands: executeSlashCommands, executeSlashCommands: executeSlashCommands,
timestampToMoment: timestampToMoment, timestampToMoment: timestampToMoment,
/** /** @deprecated Handlebars for extensions are no longer supported. */
* @deprecated Handlebars for extensions are no longer supported.
*/
registerHelper: () => { }, registerHelper: () => { },
registerMacro: MacrosParser.registerMacro.bind(MacrosParser), registerMacro: MacrosParser.registerMacro.bind(MacrosParser),
unregisterMacro: MacrosParser.unregisterMacro.bind(MacrosParser), unregisterMacro: MacrosParser.unregisterMacro.bind(MacrosParser),
registedDebugFunction: registerDebugFunction, registedDebugFunction: registerDebugFunction,
/** /** @deprecated Use renderExtensionTemplateAsync instead. */
* @deprecated Use renderExtensionTemplateAsync instead.
*/
renderExtensionTemplate: renderExtensionTemplate, renderExtensionTemplate: renderExtensionTemplate,
renderExtensionTemplateAsync: renderExtensionTemplateAsync, renderExtensionTemplateAsync: renderExtensionTemplateAsync,
registerDataBankScraper: ScraperManager.registerDataBankScraper, registerDataBankScraper: ScraperManager.registerDataBankScraper,
/** @deprecated Use callGenericPopup or Popup instead. */
callPopup: callPopup, callPopup: callPopup,
callGenericPopup: callGenericPopup, callGenericPopup: callGenericPopup,
showLoader: showLoader, showLoader: showLoader,
@ -7900,10 +7901,9 @@ window['SillyTavern'].getContext = function () {
tagMap: tag_map, tagMap: tag_map,
menuType: menu_type, menuType: menu_type,
createCharacterData: create_save, createCharacterData: create_save,
/** /** @deprecated Legacy snake-case naming, compatibility with old extensions */
* @deprecated Legacy snake-case naming, compatibility with old extensions
*/
event_types: event_types, event_types: event_types,
Popup: Popup,
POPUP_TYPE: POPUP_TYPE, POPUP_TYPE: POPUP_TYPE,
POPUP_RESULT: POPUP_RESULT, POPUP_RESULT: POPUP_RESULT,
}; };

View File

@ -2032,6 +2032,9 @@ async function echoCallback(args, value) {
args.severity = null; args.severity = null;
} }
// Make sure that the value is a string
value = String(value);
const title = args.title ? args.title : undefined; const title = args.title ? args.title : undefined;
const severity = args.severity ? args.severity : 'info'; const severity = args.severity ? args.severity : 'info';