diff --git a/public/scripts/slash-commands.js b/public/scripts/slash-commands.js index 4aeff2b91..8130488e7 100644 --- a/public/scripts/slash-commands.js +++ b/public/scripts/slash-commands.js @@ -49,6 +49,7 @@ import { textgen_types, textgenerationwebui_settings } from './textgen-settings. import { decodeTextTokens, getFriendlyTokenizerName, getTextTokens, getTokenCount } from './tokenizers.js'; import { delay, isFalseBoolean, isTrueBoolean, stringToRange, trimToEndSentence, trimToStartSentence, waitUntilCondition } from './utils.js'; import { registerVariableCommands, resolveVariable } from './variables.js'; +import { background_settings } from './backgrounds.js'; export { executeSlashCommands, getSlashCommandsHelp, registerSlashCommand, }; @@ -1609,7 +1610,9 @@ $(document).on('click', '[data-displayHelp]', function (e) { function setBackgroundCallback(_, bg) { if (!bg) { - return; + // allow reporting of the background name if called without args + // for use in ST Scripts via pipe + return background_settings.name; } console.log('Set background to ' + bg);