diff --git a/js/mzta-placeholders.js b/js/mzta-placeholders.js index 2b05e7d1..b06f82d3 100644 --- a/js/mzta-placeholders.js +++ b/js/mzta-placeholders.js @@ -485,6 +485,19 @@ export const placeholdersUtils = { return regex.test(text); }, + getPlaceholdersAdditionalTextArray(prompt_text){ + const regex = /{%\s*additional_text(?::(.*?))?\s*%}/g; + let matches = []; + let match; + while ((match = regex.exec(prompt_text)) !== null) { + matches.push({ + placeholder: match[0], + info: match[1] ? match[1].trim() : "" + }); + } + return matches; + }, + async getPlaceholdersValues(args) { const { prompt_text = "",