getPlaceholdersAdditionalTextArray method added. see #525 #554

This commit is contained in:
mic 2026-02-11 21:30:56 +01:00
parent 34e8e242f6
commit b1282c9562

View file

@ -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 = "",