correctly appending the additional text when no placeholder is used in an API integration. see #681

This commit is contained in:
mic 2026-02-27 22:06:26 +01:00
parent 0300c873fd
commit 7048164ee0

View file

@ -266,7 +266,8 @@ browser.runtime.onMessage.addListener((message, sender, sendResponse) => {
if(userInput !== null) {
if(!placeholdersUtils.hasPlaceholder(promptData.prompt, 'additional_text')){
// no additional_text placeholder, do as usual
promptData.prompt += " " + userInput;
const inputText = Array.isArray(userInput) ? userInput.map(obj => obj.custom_text).join(' ') : userInput;
promptData.prompt += " " + inputText;
}else{
// we have the additional_text placeholder, do the magic!
let finalSubs = {};