From 7048164ee01107f2de208b3ccdac8599e2ff542e Mon Sep 17 00:00:00 2001 From: mic Date: Fri, 27 Feb 2026 22:06:26 +0100 Subject: [PATCH] correctly appending the additional text when no placeholder is used in an API integration. see #681 --- api_webchat/controller.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/api_webchat/controller.js b/api_webchat/controller.js index c6f349c9..934f83f9 100644 --- a/api_webchat/controller.js +++ b/api_webchat/controller.js @@ -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 = {};