From b1282c956216715d182addd6b146072a9c1e30e8 Mon Sep 17 00:00:00 2001 From: mic Date: Wed, 11 Feb 2026 21:30:56 +0100 Subject: [PATCH] getPlaceholdersAdditionalTextArray method added. see #525 #554 --- js/mzta-placeholders.js | 13 +++++++++++++ 1 file changed, 13 insertions(+) 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 = "",