diff --git a/_locales/en/messages.json b/_locales/en/messages.json index 07582a63..ca762f11 100644 --- a/_locales/en/messages.json +++ b/_locales/en/messages.json @@ -772,7 +772,11 @@ "description": "" }, "prefs_OptionText_add_tags_maxnum_Info": { - "message": "The maximum number of tags proposed by the AI.", + "message": "The maximum number of tags proposed by the AI. Set to 0 if you don't want to limit the number of tags.", "description": "" + }, + "prompt_add_tags_maxnum": { + "message": "Limit the number of tags to", + "description": "" } } \ No newline at end of file diff --git a/js/mzta-menus.js b/js/mzta-menus.js index 2c761f5e..c3af0a0f 100644 --- a/js/mzta-menus.js +++ b/js/mzta-menus.js @@ -192,6 +192,11 @@ export class mzta_Menus { switch(curr_prompt.id){ case 'prompt_add_tags': // Add tags to the email let mail_tags = ''; + let prefs_maxt = await browser.storage.sync.get({add_tags_maxnum: 3}); + let add_tags_maxnum = prefs_maxt.add_tags_maxnum; + if(add_tags_maxnum > 0){ + fullPrompt += " " + browser.i18n.getMessage("prompt_add_tags_maxnum") + " " + add_tags_maxnum +"."; + } this.logger.log("fullPrompt: " + fullPrompt); let cmd_addTags = new mzta_specialCommand_AddTags(fullPrompt,"chatgpt_api",true); await cmd_addTags.initWorker();