From f4e8ce32278e735cf3a40f2385f73023c84a7636 Mon Sep 17 00:00:00 2001 From: mic Date: Tue, 11 Feb 2025 23:32:20 +0100 Subject: [PATCH] added a missing await --- js/mzta-utils-prompt.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/js/mzta-utils-prompt.js b/js/mzta-utils-prompt.js index b8797d49..36cdf687 100644 --- a/js/mzta-utils-prompt.js +++ b/js/mzta-utils-prompt.js @@ -37,7 +37,7 @@ export const taPromptUtils = { fullPrompt = curr_prompt.text + (String(curr_prompt.need_signature) == "1" ? " " + await taPromptUtils.getDefaultSignature():"") + " " + chatgpt_lang + " \"" + (selection_text=='' ? body_text : selection_text) + "\" "; }else{ // we have at least a placeholder, do the magic! - let finalSubs = placeholdersUtils.getPlaceholdersValues(curr_prompt.text, curr_message, subject_text, body_text, msg_text, only_typed_text, selection_text, tags_full_list); + let finalSubs = await placeholdersUtils.getPlaceholdersValues(curr_prompt.text, curr_message, subject_text, body_text, msg_text, only_typed_text, selection_text, tags_full_list); // console.log(">>>>>>>>>> finalSubs: " + JSON.stringify(finalSubs)); let prefs_ph = await browser.storage.sync.get({placeholders_use_default_value: false}); fullPrompt = (placeholdersUtils.replacePlaceholders(curr_prompt.text, finalSubs, prefs_ph.placeholders_use_default_value, true) + (String(curr_prompt.need_signature) == "1" ? " " + await taPromptUtils.getDefaultSignature():"") + " " + chatgpt_lang).trim();