From 1362da944e1d3770d4ca4330c605df6e28419b8c Mon Sep 17 00:00:00 2001 From: mic Date: Fri, 2 Jan 2026 22:10:29 +0100 Subject: [PATCH 01/16] correctly using the toggleApiPropertiesShow method. see #102 --- pages/customprompts/mzta-custom-prompts.js | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/pages/customprompts/mzta-custom-prompts.js b/pages/customprompts/mzta-custom-prompts.js index b82086bb..5c4a286f 100644 --- a/pages/customprompts/mzta-custom-prompts.js +++ b/pages/customprompts/mzta-custom-prompts.js @@ -753,8 +753,7 @@ function handleCancelClick(e) { tr.querySelector('.chatgpt_web_project_output').value = tr.querySelector('.chatgpt_web_project_show').innerText; tr.querySelector('.chatgpt_web_custom_gpt_output').value = tr.querySelector('.chatgpt_web_custom_gpt_show').innerText; tr.querySelector('.api_additional_info_toggle').innerText = browser.i18n.getMessage('customPrompts_show_additional_info') + ' [API]'; - tr.querySelector('.api_additional_info_show').style.display = 'block'; - + toggleApiPropertiesShow(tr); hideItemRowEditor(tr); } @@ -803,8 +802,7 @@ function handleConfirmClick(e) { tr.querySelector('.action_show').innerText = tr.querySelector('.action_output').selectedOptions[0].text; if (newValues.api_type !== '') { tr.querySelector('.api_type_show').innerText = newValues.api_type; - tr.querySelector('.api_additional_info_show').style.display = 'block'; - tr.querySelector('.api_additional_info_row').style.display = 'block'; + toggleApiPropertiesShow(tr); } // the checkboxes update is handled directly by themselves From c7c5d0c59478a9b327f6fbd2c85cafc88c8a4452 Mon Sep 17 00:00:00 2001 From: mic Date: Fri, 2 Jan 2026 22:30:44 +0100 Subject: [PATCH 02/16] correctly handling chatgpt additional props show. see #102 --- pages/customprompts/mzta-custom-prompts.js | 94 ++++++++-------------- 1 file changed, 35 insertions(+), 59 deletions(-) diff --git a/pages/customprompts/mzta-custom-prompts.js b/pages/customprompts/mzta-custom-prompts.js index 5c4a286f..f2997c45 100644 --- a/pages/customprompts/mzta-custom-prompts.js +++ b/pages/customprompts/mzta-custom-prompts.js @@ -218,21 +218,6 @@ document.addEventListener('DOMContentLoaded', async () => { }); }); - // switch(prefs.connection_type) { - // case 'chatgpt_api': - // document.getElementById('chatgpt_api').style.display = 'block'; - // break; - // case 'ollama_api': - // document.getElementById('ollama_api').style.display = 'block'; - // break; - // case 'openai_comp_api': - // document.getElementById('openai_comp_api').style.display = 'block'; - // break; - // case 'google_gemini_api': - // document.getElementById('google_gemini_api').style.display = 'block'; - // break; - // } - const chatgptWebAdditionalPropToggle = document.getElementById('chatgpt_web_additional_info_toggle'); chatgptWebAdditionalPropToggle.addEventListener('click', (e) => { e.preventDefault(); @@ -476,7 +461,7 @@ document.getElementById('btnManageCustomDataPH').addEventListener('click', () => function handleEditClick(e) { e.preventDefault(); const tr = e.target.parentNode.parentNode; - const id = tr.querySelector('.id_output').value; + const id = tr.querySelector('.id_output').value.toLowerCase(); // Inject Connection UI if needed const anchorId = `api_ui_anchor_${id}`; @@ -516,6 +501,7 @@ function handleEditClick(e) { tr.querySelector('.btnDeleteItem').style.display = 'none'; // Delete btn showItemRowEditor(tr); toggleDiffviewer(e); + toggleAdditionalPropertiesShow(tr); } function populateConnectionUI(tr, id, prefix, selectId) { @@ -599,50 +585,40 @@ function hideItemRowEditor(tr) { } function toggleAdditionalPropertiesShow(tr) { - switch(prefs.connection_type) { - case 'chatgpt_web': { - let element = tr.querySelector('.chatgpt_web_additional_info_show'); - let chatGPTWebModel_show = tr.querySelector('.chatgpt_web_model_show'); - let chatGPTWebProject_show = tr.querySelector('.chatgpt_web_project_show'); - let chatGPTWebCustomGPT_show = tr.querySelector('.chatgpt_web_custom_gpt_show'); - - if ((chatGPTWebModel_show.innerText !== '' && chatGPTWebModel_show.innerText !== 'undefined') || - (chatGPTWebProject_show.innerText !== '' && chatGPTWebProject_show.innerText !== 'undefined') || - (chatGPTWebCustomGPT_show.innerText !== '' && chatGPTWebCustomGPT_show.innerText !== 'undefined')) { - element.style.display = 'flex'; - } else { - element.style.display = 'none'; - } - - if(chatGPTWebModel_show.innerText === '' || chatGPTWebModel_show.innerText === 'undefined') { - chatGPTWebModel_show.parentNode.style.display = 'none'; - } else { - chatGPTWebModel_show.parentNode.style.display = 'inline'; - } - if(chatGPTWebProject_show.innerText === '' || chatGPTWebProject_show.innerText === 'undefined') { - chatGPTWebProject_show.parentNode.style.display = 'none'; - } else { - chatGPTWebProject_show.parentNode.style.display = 'inline'; - } - if(chatGPTWebCustomGPT_show.innerText === '' || chatGPTWebCustomGPT_show.innerText === 'undefined') { - chatGPTWebCustomGPT_show.parentNode.style.display = 'none'; - } else { - chatGPTWebCustomGPT_show.parentNode.style.display = 'inline'; - } - break; + // console.log(">>>>>>>>>>>>>>>>> toggleAdditionalPropertiesShow tr.querySelector('.api_type_show').innerText: " + tr.querySelector('.api_type_show').innerText); + let element = tr.querySelector('.chatgpt_web_additional_info_show'); + let chatGPTWebModel_show = tr.querySelector('.chatgpt_web_model_show'); + let chatGPTWebProject_show = tr.querySelector('.chatgpt_web_project_show'); + let chatGPTWebCustomGPT_show = tr.querySelector('.chatgpt_web_custom_gpt_show'); + if(prefs.connection_type == 'chatgpt_web' && tr.querySelector('.api_type_show').innerText == '') { + if ((chatGPTWebModel_show.innerText !== '' && chatGPTWebModel_show.innerText !== 'undefined') || + (chatGPTWebProject_show.innerText !== '' && chatGPTWebProject_show.innerText !== 'undefined') || + (chatGPTWebCustomGPT_show.innerText !== '' && chatGPTWebCustomGPT_show.innerText !== 'undefined')) { + element.style.display = 'flex'; + } else { + element.style.display = 'none'; } - // case 'chatgpt_api': - // document.getElementById('chatgpt_api').style.display = 'block'; - // break; - // case 'ollama_api': - // document.getElementById('ollama_api').style.display = 'block'; - // break; - // case 'openai_comp_api': - // document.getElementById('openai_comp_api').style.display = 'block'; - // break; - // case 'google_gemini_api': - // document.getElementById('google_gemini_api').style.display = 'block'; - // break; + + if(chatGPTWebModel_show.innerText === '' || chatGPTWebModel_show.innerText === 'undefined') { + chatGPTWebModel_show.parentNode.style.display = 'none'; + } else { + chatGPTWebModel_show.parentNode.style.display = 'inline'; + } + if(chatGPTWebProject_show.innerText === '' || chatGPTWebProject_show.innerText === 'undefined') { + chatGPTWebProject_show.parentNode.style.display = 'none'; + } else { + chatGPTWebProject_show.parentNode.style.display = 'inline'; + } + if(chatGPTWebCustomGPT_show.innerText === '' || chatGPTWebCustomGPT_show.innerText === 'undefined') { + chatGPTWebCustomGPT_show.parentNode.style.display = 'none'; + } else { + chatGPTWebCustomGPT_show.parentNode.style.display = 'inline'; + } + }else{ + element.style.display = 'none'; + chatGPTWebModel_show.parentNode.style.display = 'none'; + chatGPTWebProject_show.parentNode.style.display = 'none'; + chatGPTWebCustomGPT_show.parentNode.style.display = 'none'; } } From 01142fb582634c9d675ac8e922bab462dee5a48f Mon Sep 17 00:00:00 2001 From: mic Date: Fri, 2 Jan 2026 22:35:24 +0100 Subject: [PATCH 03/16] correctly hiding and showing the chatgpt additional prop toggle. see #102 --- pages/customprompts/mzta-custom-prompts.js | 35 +++++++--------------- 1 file changed, 10 insertions(+), 25 deletions(-) diff --git a/pages/customprompts/mzta-custom-prompts.js b/pages/customprompts/mzta-custom-prompts.js index f2997c45..03fa2b7a 100644 --- a/pages/customprompts/mzta-custom-prompts.js +++ b/pages/customprompts/mzta-custom-prompts.js @@ -640,33 +640,18 @@ function toggleApiPropertiesShow(tr) { } function toggleAdditionalPropertiesEditor(tr) { - switch(prefs.connection_type) { - case 'chatgpt_web': { - let info_toggle = tr.querySelector('.chatgpt_web_additional_info_toggle'); - info_toggle.style.display = 'block'; - let chatGPTWebModel_show = tr.querySelector('.chatgpt_web_model_show').innerText; - let chatGPTWebProject_show = tr.querySelector('.chatgpt_web_project_show').innerText; - let chatGPTWebCustomGPT_show = tr.querySelector('.chatgpt_web_custom_gpt_show').innerText; + if(prefs.connection_type == 'chatgpt_web' && tr.querySelector('.api_type_show').innerText == '') { + let info_toggle = tr.querySelector('.chatgpt_web_additional_info_toggle'); + info_toggle.style.display = 'block'; + let chatGPTWebModel_show = tr.querySelector('.chatgpt_web_model_show').innerText; + let chatGPTWebProject_show = tr.querySelector('.chatgpt_web_project_show').innerText; + let chatGPTWebCustomGPT_show = tr.querySelector('.chatgpt_web_custom_gpt_show').innerText; - if ((chatGPTWebModel_show !== '' && chatGPTWebModel_show !== 'undefined') || - (chatGPTWebProject_show !== '' && chatGPTWebProject_show !== 'undefined') || - (chatGPTWebCustomGPT_show !== '' && chatGPTWebCustomGPT_show !== 'undefined')) { - info_toggle.click(); - } - break; + if ((chatGPTWebModel_show !== '' && chatGPTWebModel_show !== 'undefined') || + (chatGPTWebProject_show !== '' && chatGPTWebProject_show !== 'undefined') || + (chatGPTWebCustomGPT_show !== '' && chatGPTWebCustomGPT_show !== 'undefined')) { + info_toggle.click(); } - // case 'chatgpt_api': - // document.getElementById('chatgpt_api').style.display = 'block'; - // break; - // case 'ollama_api': - // document.getElementById('ollama_api').style.display = 'block'; - // break; - // case 'openai_comp_api': - // document.getElementById('openai_comp_api').style.display = 'block'; - // break; - // case 'google_gemini_api': - // document.getElementById('google_gemini_api').style.display = 'block'; - // break; } let api_info_toggle = tr.querySelector('.api_additional_info_toggle'); From 7bafb035b25837a3f63b05e1165800ddbdfa22f7 Mon Sep 17 00:00:00 2001 From: Mic Date: Fri, 2 Jan 2026 22:50:30 +0100 Subject: [PATCH 04/16] Translated using Weblate (Spanish) Currently translated at 100.0% (432 of 432 strings) Translation: ThunderAI for Thunderbird/main Translate-URL: https://hosted.weblate.org/projects/thunderai/main/es/ --- _locales/es/messages.json | 3 +++ 1 file changed, 3 insertions(+) diff --git a/_locales/es/messages.json b/_locales/es/messages.json index 3e461daf..2980618d 100644 --- a/_locales/es/messages.json +++ b/_locales/es/messages.json @@ -1301,5 +1301,8 @@ }, "Anthropic_System_Prompt": { "message": "Prompt del sistema" + }, + "reset": { + "message": "Reiniciar" } } From 2cbc8c2d0e2482dca18b29da676c9a6daa17ccb8 Mon Sep 17 00:00:00 2001 From: Mic Date: Fri, 2 Jan 2026 22:49:52 +0100 Subject: [PATCH 05/16] Translated using Weblate (French) Currently translated at 100.0% (432 of 432 strings) Translation: ThunderAI for Thunderbird/main Translate-URL: https://hosted.weblate.org/projects/thunderai/main/fr/ --- _locales/fr/messages.json | 3 +++ 1 file changed, 3 insertions(+) diff --git a/_locales/fr/messages.json b/_locales/fr/messages.json index 89cc8a12..e8081aab 100644 --- a/_locales/fr/messages.json +++ b/_locales/fr/messages.json @@ -1335,5 +1335,8 @@ }, "prefs_anthropic_temperature_Info": { "message": "Degré d'aléa injecté dans la réponse. La valeur par défaut est 1,0. La plage de valeurs s'étend di 0,0 à 1,0. Utilisez une température proche de 0,0 pour des tâches analytiques ou des choix multiples, et proche de 1,0 pour des tâches créatives et génératives. Notez que même avec une température de 0,0, les résultats ne seront pas totalement déterministes." + }, + "reset": { + "message": "Réinitialiser" } } From 68c6145828051cb869695adec15b6d3d71f3e1ca Mon Sep 17 00:00:00 2001 From: Mic Date: Fri, 2 Jan 2026 22:48:55 +0100 Subject: [PATCH 06/16] Translated using Weblate (Italian) Currently translated at 100.0% (432 of 432 strings) Translation: ThunderAI for Thunderbird/main Translate-URL: https://hosted.weblate.org/projects/thunderai/main/it/ --- _locales/it/messages.json | 29 ++++++++++++++++++++++++++++- 1 file changed, 28 insertions(+), 1 deletion(-) diff --git a/_locales/it/messages.json b/_locales/it/messages.json index ae811d3f..69840ade 100644 --- a/_locales/it/messages.json +++ b/_locales/it/messages.json @@ -1111,7 +1111,7 @@ "message": "Scegli uno dei servizi disponibili per l'API compatibile con OpenAI oppure inseriscine uno manualmente." }, "prefs_OptionText_anthropic_max_tokens": { - "message": "Numero massimo di token di Claude" + "message": "Numero massimo di token" }, "prefs_OptionText_anthropic_max_tokens_Info": { "message": "Il numero massimo di token da generare nell'elaborazione. Il conteggio dei token del tuo prompt, sommato a max_tokens, non può superare la lunghezza di contesto del modello." @@ -1314,5 +1314,32 @@ }, "Optional_Permission_Denied_Model_Fetching": { "message": "Hai negato l’autorizzazione necessaria per recuperare i modelli per questa integrazione." + }, + "prompt_string": { + "message": "Prompt" + }, + "placeholder_mail_headers": { + "message": "Intestazioni email" + }, + "reset": { + "message": "Reset" + }, + "prefs_chatgpt_api_temperature_Info": { + "message": "Quale temperatura di campionamento utilizzare, tra 0 e 2. Valori più alti come 0,8 renderanno l'output più casuale, mentre valori più bassi come 0,2 lo renderanno più focalizzato e deterministico." + }, + "prefs_ollama_temperature_Info": { + "message": "La temperatura del modello. Aumentare la temperatura farà sì che il modello risponda in modo più creativo. Il valore predefinito è 0,8. Si consiglia di utilizzare valori compresi tra 0 e 1." + }, + "prefs_api_temperature": { + "message": "Temperatura" + }, + "prefs_openai_comp_temperature_Info": { + "message": "Quale temperatura di campionamento utilizzare, tra 0 e 2. Valori più alti come 0,8 renderanno l'output più casuale, mentre valori più bassi come 0,2 lo renderanno più focalizzato e deterministico." + }, + "prefs_google_gemini_temperature_Info": { + "message": "Questo parametro deve essere un numero compreso tra 0.0 e 2.0. Questo valore controlla la casualità dell'output. Il valore predefinito varia a seconda del modello. Lascialo vuoto per evitare di impostare il parametro nella chiamata API." + }, + "prefs_anthropic_temperature_Info": { + "message": "Quantità di casualità iniettata nella risposta. Il valore predefinito è 1,0. L'intervallo va da 0,0 a 1,0. Utilizza una temperatura più vicina a 0,0 per compiti analitici o a scelta multipla, e più vicina a 1,0 per compiti creativi e generativi. Nota che, anche con una temperatura di 0,0, i risultati non saranno completamente deterministici." } } From 97b016ab63b636a45adfd725710c06950065dc00 Mon Sep 17 00:00:00 2001 From: mic Date: Sat, 3 Jan 2026 00:03:48 +0100 Subject: [PATCH 07/16] refining how to handle specific api settings. see #102 --- api_webchat/controller.js | 17 ++++++++++++++++ js/mzta-prompts.js | 8 +------- js/mzta-utils.js | 4 +++- mzta-background.js | 3 +++ pages/_lib/connection-ui.js | 2 +- pages/addtags/mzta-add-tags.js | 16 +++++++++------ pages/spamfilter/mzta-spamfilter.js | 30 +++++++++++++++++++++++++---- 7 files changed, 61 insertions(+), 19 deletions(-) diff --git a/api_webchat/controller.js b/api_webchat/controller.js index 050471d2..390d103c 100644 --- a/api_webchat/controller.js +++ b/api_webchat/controller.js @@ -23,6 +23,7 @@ import { prefs_default, integration_options_config } from '../options/mzta-options-default.js'; import { placeholdersUtils } from '../js/mzta-placeholders.js'; import { getAPIsInitMessageString, convertNewlinesToBr } from '../js/mzta-utils.js'; +import { loadPrompt } from '../js/mzta-prompts.js'; // Get the LLM to be used const urlParams = new URLSearchParams(window.location.search); @@ -82,6 +83,22 @@ if (worker) { let prefs_api = await browser.storage.sync.get(prefsToGet); + if (prompt_id) { + try { + const prompt = await loadPrompt(prompt_id); + if (prompt && prompt.api_type === llm) { + for (const key in options_config) { + const prefKey = `${integration_prefix}_${key}`; + if (prompt[prefKey] !== undefined) { + prefs_api[prefKey] = prompt[prefKey]; + } + } + } + } catch (e) { + console.error("[ThunderAI] Error loading prompt settings:", e); + } + } + let i18nStrings = {}; const i18n_msg_key = integration === 'openai_comp' ? 'OpenAIComp_api_request_failed' : `${integration}_api_request_failed`; i18nStrings[i18n_msg_key] = browser.i18n.getMessage(i18n_msg_key); diff --git a/js/mzta-prompts.js b/js/mzta-prompts.js index b6db041a..3f1526af 100644 --- a/js/mzta-prompts.js +++ b/js/mzta-prompts.js @@ -440,7 +440,6 @@ async function getDefaultPrompts_withProps() { prompt.chatgpt_web_project = prefs._default_prompts_properties[prompt.id].chatgpt_web_project; prompt.chatgpt_web_custom_gpt = (prefs._default_prompts_properties[prompt.id]?.chatgpt_web_custom_gpt || '').trim(); prompt.api_type = (prefs._default_prompts_properties[prompt.id]?.api_type || '').trim(); - prompt.api_model = (prefs._default_prompts_properties[prompt.id]?.api_model || '').trim(); }else{ prompt.position_display = pos; prompt.position_compose = pos; @@ -475,9 +474,6 @@ async function getCustomPrompts() { if(prompt.api_type === undefined){ prompt.api_type = ""; } - if(prompt.api_model === undefined){ - prompt.api_model = ""; - } }); return prefs._custom_prompt; } @@ -495,7 +491,6 @@ export async function setDefaultPromptsProperties(prompts) { chatgpt_web_project: (prompt.chatgpt_web_project === undefined || prompt.chatgpt_web_project === "undefined") ? "" : prompt.chatgpt_web_project, chatgpt_web_custom_gpt: (prompt.chatgpt_web_custom_gpt === undefined || prompt.chatgpt_web_custom_gpt === "undefined") ? "" : prompt.chatgpt_web_custom_gpt, api_type: (prompt.api_type === undefined || prompt.api_type === "undefined") ? "" : prompt.api_type, - api_model: (prompt.api_model === undefined || prompt.api_model === "undefined") ? "" : prompt.api_model }; }); //console.log('>>>>>>>>>>>>>> default_prompts_properties: ' + JSON.stringify(default_prompts_properties)); @@ -590,7 +585,6 @@ export async function savePrompt(prompt) { export async function clearPromptAPI(id){ let _prompt = await loadPrompt(id); - _prompt.api = ""; - _prompt.model = ""; + _prompt.api_type = ""; await savePrompt(_prompt); } \ No newline at end of file diff --git a/js/mzta-utils.js b/js/mzta-utils.js index c833bb31..f58d9b99 100644 --- a/js/mzta-utils.js +++ b/js/mzta-utils.js @@ -648,7 +648,9 @@ export function getConnectionType(prefsOrType, prompt, prefixOrSpecific = null) } if (specificType && specificType !== '') return specificType; - if (prompt && prompt.api && prompt.api !== '') return prompt.api; + if (prompt) { + if (prompt.api_type && prompt.api_type !== '') return prompt.api_type; + } return defaultType; } diff --git a/mzta-background.js b/mzta-background.js index e39bc0a1..1b5b8e40 100644 --- a/mzta-background.js +++ b/mzta-background.js @@ -371,6 +371,9 @@ async function openChatGPT(promptText, action, curr_tabId, prompt_name = '', do_ prefs = checkScreenDimensions(prefs); //console.log(">>>>>>>>>>>>>>>> prefs: " + JSON.stringify(prefs)); // console.log(">>>>>>>>>>>>>>>> prompt_info: " + JSON.stringify(prompt_info)); + + prefs.connection_type = getConnectionType(prefs, prompt_info); + taLog.log("Prompt length: " + promptText.length); let _max_prompt_length = prefs.max_prompt_length; if(prefs.connection_type == 'chatgpt_web'){ diff --git a/pages/_lib/connection-ui.js b/pages/_lib/connection-ui.js index 550a1491..70c40636 100644 --- a/pages/_lib/connection-ui.js +++ b/pages/_lib/connection-ui.js @@ -1022,7 +1022,7 @@ export async function initializeSpecificIntegrationUI({ let prompt = await loadPrompt(promptId); if(!prompt) return; - prompt.api = conntype; + prompt.api_type = conntype; for (const [integration, options] of Object.entries(integration_options_config)) { for (const key of Object.keys(options)) { diff --git a/pages/addtags/mzta-add-tags.js b/pages/addtags/mzta-add-tags.js index a39bd217..314d62e0 100644 --- a/pages/addtags/mzta-add-tags.js +++ b/pages/addtags/mzta-add-tags.js @@ -48,11 +48,11 @@ document.addEventListener('DOMContentLoaded', async () => { let specialPrompts = await getSpecialPrompts(); let addtags_prompt = specialPrompts.find(prompt => prompt.id === 'prompt_add_tags'); - if (addtags_prompt && addtags_prompt.api && addtags_prompt.api !== '') { + if (addtags_prompt && addtags_prompt.api_type && addtags_prompt.api_type !== '') { let update_prefs = {}; - update_prefs['add_tags_connection_type'] = addtags_prompt.api; + update_prefs['add_tags_connection_type'] = addtags_prompt.api_type; - let integration = addtags_prompt.api.replace('_api', ''); + let integration = addtags_prompt.api_type.replace('_api', ''); if (integration_options_config && integration_options_config[integration]) { for (const key of Object.keys(integration_options_config[integration])) { if (addtags_prompt[key] !== undefined) { @@ -344,14 +344,18 @@ async function restoreOptions() { let addtags_prompt = specialPrompts.find(prompt => prompt.id === 'prompt_add_tags'); if (addtags_prompt) { - if (addtags_prompt.api && addtags_prompt.api !== '') { - getting['add_tags_connection_type'] = addtags_prompt.api; + if (addtags_prompt.api_type && addtags_prompt.api_type !== '') { + getting['add_tags_connection_type'] = addtags_prompt.api_type; + } else { + getting['add_tags_connection_type'] = getting['connection_type']; } for (const [integration, options] of Object.entries(integration_options_config)) { for (const key of Object.keys(options)) { const propName = `${integration}_${key}`; - if (addtags_prompt[propName] !== undefined) { + if (addtags_prompt[propName] !== undefined && addtags_prompt[propName] !== '') { getting[`add_tags_${propName}`] = addtags_prompt[propName]; + } else { + getting[`add_tags_${propName}`] = getting[propName]; } } } diff --git a/pages/spamfilter/mzta-spamfilter.js b/pages/spamfilter/mzta-spamfilter.js index a6f7d30e..8df6369e 100644 --- a/pages/spamfilter/mzta-spamfilter.js +++ b/pages/spamfilter/mzta-spamfilter.js @@ -16,7 +16,10 @@ * along with this program. If not, see . */ -import { prefs_default, integration_options_config } from '../../options/mzta-options-default.js'; +import { + prefs_default, + integration_options_config +} from '../../options/mzta-options-default.js'; import { taLogger } from '../../js/mzta-logger.js'; import { getSpecialPrompts, @@ -42,6 +45,21 @@ document.addEventListener('DOMContentLoaded', async () => { let specialPrompts = await getSpecialPrompts(); let spamfilter_prompt = specialPrompts.find(prompt => prompt.id === 'prompt_spamfilter'); + if (spamfilter_prompt && spamfilter_prompt.api_type && spamfilter_prompt.api_type !== '') { + let update_prefs = {}; + update_prefs['spamfilter_connection_type'] = spamfilter_prompt.api_type; + + let integration = spamfilter_prompt.api_type.replace('_api', ''); + if (integration_options_config && integration_options_config[integration]) { + for (const key of Object.keys(integration_options_config[integration])) { + if (spamfilter_prompt[key] !== undefined) { + update_prefs[`spamfilter_${integration}_${key}`] = spamfilter_prompt[key]; + } + } + } + await browser.storage.sync.set(update_prefs); + } + await initializeSpecificIntegrationUI({ prefix: 'spamfilter', promptId: 'prompt_spamfilter', @@ -313,14 +331,18 @@ async function restoreOptions() { let spamfilter_prompt = specialPrompts.find(prompt => prompt.id === 'prompt_spamfilter'); if (spamfilter_prompt) { - if (spamfilter_prompt.api && spamfilter_prompt.api !== '') { - getting['spamfilter_connection_type'] = spamfilter_prompt.api; + if (spamfilter_prompt.api_type && spamfilter_prompt.api_type !== '') { + getting['spamfilter_connection_type'] = spamfilter_prompt.api_type; + } else { + getting['spamfilter_connection_type'] = getting['connection_type']; } for (const [integration, options] of Object.entries(integration_options_config)) { for (const key of Object.keys(options)) { const propName = `${integration}_${key}`; - if (spamfilter_prompt[propName] !== undefined) { + if (spamfilter_prompt[propName] !== undefined && spamfilter_prompt[propName] !== '') { getting[`spamfilter_${propName}`] = spamfilter_prompt[propName]; + } else { + getting[`spamfilter_${propName}`] = getting[propName]; } } } From b558fc2ed2e84bc36da969642b398ecae3cbabca Mon Sep 17 00:00:00 2001 From: mic Date: Sat, 3 Jan 2026 00:20:41 +0100 Subject: [PATCH 08/16] fix for clickable checkbox labels --- options/mzta-options.css | 4 ++++ pages/addtags/mzta-add-tags.css | 3 +++ .../mzta-custom-dataplaceholders.css | 4 ++++ pages/customprompts/mzta-custom-prompts.css | 4 ++++ pages/customprompts/mzta-custom-prompts.html | 10 +++++----- pages/get-calendar-event/mzta-get-calendar-event.css | 3 +++ pages/get-task/mzta-get-task.css | 3 +++ pages/spamfilter/mzta-spamfilter.css | 4 ++++ 8 files changed, 30 insertions(+), 5 deletions(-) diff --git a/options/mzta-options.css b/options/mzta-options.css index f0c21d66..86d168d1 100644 --- a/options/mzta-options.css +++ b/options/mzta-options.css @@ -163,6 +163,10 @@ div#miczTranslate{ color: #292929; } +label:has(input[type="checkbox"]) { + cursor: pointer; +} + @media (prefers-color-scheme: dark) { body { background-color: rgb(35, 34, 43); diff --git a/pages/addtags/mzta-add-tags.css b/pages/addtags/mzta-add-tags.css index 9b02a45c..268fd478 100644 --- a/pages/addtags/mzta-add-tags.css +++ b/pages/addtags/mzta-add-tags.css @@ -167,6 +167,9 @@ table#miczPrefs tr:last-child td { color: red; } +label:has(input[type="checkbox"]) { + cursor: pointer; +} @media (prefers-color-scheme: dark) { body { diff --git a/pages/customdataplaceholders/mzta-custom-dataplaceholders.css b/pages/customdataplaceholders/mzta-custom-dataplaceholders.css index 888459df..02aeae07 100644 --- a/pages/customdataplaceholders/mzta-custom-dataplaceholders.css +++ b/pages/customdataplaceholders/mzta-custom-dataplaceholders.css @@ -302,6 +302,10 @@ input.input_additional[type="text"]{ cursor: pointer; } +label:has(input[type="checkbox"]) { + cursor: pointer; +} + @media (prefers-color-scheme: dark) { body { background-color: #1C1B22; diff --git a/pages/customprompts/mzta-custom-prompts.css b/pages/customprompts/mzta-custom-prompts.css index 5ff45b45..b44628d0 100644 --- a/pages/customprompts/mzta-custom-prompts.css +++ b/pages/customprompts/mzta-custom-prompts.css @@ -326,6 +326,10 @@ input.input_additional[type="text"]{ text-decoration: underline; } +label:has(input[type="checkbox"]) { + cursor: pointer; +} + @media (prefers-color-scheme: dark) { body { background-color: #1C1B22; diff --git a/pages/customprompts/mzta-custom-prompts.html b/pages/customprompts/mzta-custom-prompts.html index 1ec1d4bb..34622d5d 100644 --- a/pages/customprompts/mzta-custom-prompts.html +++ b/pages/customprompts/mzta-custom-prompts.html @@ -62,15 +62,15 @@
- +
- +
- +
- +
- + diff --git a/pages/get-calendar-event/mzta-get-calendar-event.css b/pages/get-calendar-event/mzta-get-calendar-event.css index 3e9f8137..d5e85b91 100644 --- a/pages/get-calendar-event/mzta-get-calendar-event.css +++ b/pages/get-calendar-event/mzta-get-calendar-event.css @@ -91,6 +91,9 @@ table#miczPrefs tr:last-child td { color: red; } +label:has(input[type="checkbox"]) { + cursor: pointer; +} @media (prefers-color-scheme: dark) { body { diff --git a/pages/get-task/mzta-get-task.css b/pages/get-task/mzta-get-task.css index 0ce83ec5..806b5ac9 100644 --- a/pages/get-task/mzta-get-task.css +++ b/pages/get-task/mzta-get-task.css @@ -91,6 +91,9 @@ table#miczPrefs tr:last-child td { color: red; } +label:has(input[type="checkbox"]) { + cursor: pointer; +} @media (prefers-color-scheme: dark) { body { diff --git a/pages/spamfilter/mzta-spamfilter.css b/pages/spamfilter/mzta-spamfilter.css index 85dc977f..7d330186 100644 --- a/pages/spamfilter/mzta-spamfilter.css +++ b/pages/spamfilter/mzta-spamfilter.css @@ -127,6 +127,10 @@ table#report_data th { background-color: #f4f4f4; } +label:has(input[type="checkbox"]) { + cursor: pointer; +} + @media (prefers-color-scheme: dark) { body { background-color: #1C1B22; From def2cb2372a1aab9e723d28ebcc28692137f8d11 Mon Sep 17 00:00:00 2001 From: mic Date: Sat, 3 Jan 2026 00:22:24 +0100 Subject: [PATCH 09/16] addeventlistener commented out --- .../customdataplaceholders/mzta-custom-dataplaceholders.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pages/customdataplaceholders/mzta-custom-dataplaceholders.js b/pages/customdataplaceholders/mzta-custom-dataplaceholders.js index 81b82f4b..5a9a9314 100644 --- a/pages/customdataplaceholders/mzta-custom-dataplaceholders.js +++ b/pages/customdataplaceholders/mzta-custom-dataplaceholders.js @@ -220,9 +220,9 @@ document.addEventListener('DOMContentLoaded', async () => { }; } - document.getElementById('btnManagePrompts').addEventListener('click', () => { - openTab('/pages/customprompts/mzta-custom-prompts.html'); - }); + // document.getElementById('btnManagePrompts').addEventListener('click', () => { + // openTab('/pages/customprompts/mzta-custom-prompts.html'); + // }); }, { once: true }); From b32ce4f756a609db6b1a864519a98e0fe903532c Mon Sep 17 00:00:00 2001 From: mic Date: Sat, 3 Jan 2026 23:04:01 +0100 Subject: [PATCH 10/16] copyright date updated to 2026 --- api_webchat/controller.js | 2 +- api_webchat/messageInput.js | 2 +- api_webchat/messagesArea.js | 2 +- js/api/anthropic.js | 2 +- js/api/google_gemini.js | 2 +- js/api/ollama.js | 2 +- js/api/openai_comp.js | 2 +- js/api/openai_comp_configs.js | 2 +- js/api/openai_responses.js | 2 +- js/mzta-addatags-exclusion-list.js | 2 +- js/mzta-chatgpt-loader.js | 2 +- js/mzta-chatgpt.js | 2 +- js/mzta-compose-script.js | 2 +- js/mzta-logger.js | 2 +- js/mzta-menus.js | 2 +- js/mzta-placeholders-autocomplete.js | 2 +- js/mzta-placeholders.js | 2 +- js/mzta-prompts.js | 2 +- js/mzta-spamreport.js | 2 +- js/mzta-special-commands.js | 2 +- js/mzta-store.js | 2 +- js/mzta-utils-prompt.js | 2 +- js/mzta-utils.js | 2 +- js/mzta-working-status.js | 2 +- js/tb115_segmenter/tb115_loader.js | 2 +- js/tb115_segmenter/tb115_polyfill.js | 2 +- js/workers/model-worker-anthropic.js | 2 +- js/workers/model-worker-google_gemini.js | 2 +- js/workers/model-worker-ollama.js | 2 +- js/workers/model-worker-openai_comp.js | 2 +- js/workers/model-worker-openai_responses.js | 2 +- mzta-background.js | 2 +- options/mzta-options-default.js | 2 +- options/mzta-options.js | 2 +- options/mzta-release-notes.js | 2 +- pages/_lib/connection-ui.js | 2 +- pages/addtags/mzta-add-tags.js | 2 +- pages/customdataplaceholders/mzta-custom-dataplaceholders.js | 2 +- pages/customprompts/mzta-custom-prompts.js | 2 +- pages/get-calendar-event/mzta-get-calendar-event.js | 2 +- pages/get-task/mzta-get-task.js | 2 +- pages/onboarding/onboarding.js | 2 +- pages/spamfilter/mzta-spamfilter.js | 2 +- popup/mzta-popup.js | 2 +- 44 files changed, 44 insertions(+), 44 deletions(-) diff --git a/api_webchat/controller.js b/api_webchat/controller.js index 390d103c..6dec60df 100644 --- a/api_webchat/controller.js +++ b/api_webchat/controller.js @@ -1,6 +1,6 @@ /* * ThunderAI [https://micz.it/thunderbird-addon-thunderai/] - * Copyright (C) 2024 - 2025 Mic (m@micz.it) + * Copyright (C) 2024 - 2026 Mic (m@micz.it) * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/api_webchat/messageInput.js b/api_webchat/messageInput.js index aba7c272..b5b2a6b0 100644 --- a/api_webchat/messageInput.js +++ b/api_webchat/messageInput.js @@ -1,6 +1,6 @@ /* * ThunderAI [https://micz.it/thunderbird-addon-thunderai/] - * Copyright (C) 2024 - 2025 Mic (m@micz.it) + * Copyright (C) 2024 - 2026 Mic (m@micz.it) * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/api_webchat/messagesArea.js b/api_webchat/messagesArea.js index 3696dbe2..7036c30f 100644 --- a/api_webchat/messagesArea.js +++ b/api_webchat/messagesArea.js @@ -1,6 +1,6 @@ /* * ThunderAI [https://micz.it/thunderbird-addon-thunderai/] - * Copyright (C) 2024 - 2025 Mic (m@micz.it) + * Copyright (C) 2024 - 2026 Mic (m@micz.it) * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/js/api/anthropic.js b/js/api/anthropic.js index dcf438c5..2fa9ae78 100644 --- a/js/api/anthropic.js +++ b/js/api/anthropic.js @@ -1,6 +1,6 @@ /* * ThunderAI [https://micz.it/thunderbird-addon-thunderai/] - * Copyright (C) 2024 - 2025 Mic (m@micz.it) + * Copyright (C) 2024 - 2026 Mic (m@micz.it) * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/js/api/google_gemini.js b/js/api/google_gemini.js index e16c52e5..caea5eb0 100644 --- a/js/api/google_gemini.js +++ b/js/api/google_gemini.js @@ -1,6 +1,6 @@ /* * ThunderAI [https://micz.it/thunderbird-addon-thunderai/] - * Copyright (C) 2024 - 2025 Mic (m@micz.it) + * Copyright (C) 2024 - 2026 Mic (m@micz.it) * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/js/api/ollama.js b/js/api/ollama.js index f9f7e0ad..07d5a066 100644 --- a/js/api/ollama.js +++ b/js/api/ollama.js @@ -1,6 +1,6 @@ /* * ThunderAI [https://micz.it/thunderbird-addon-thunderai/] - * Copyright (C) 2024 - 2025 Mic (m@micz.it) + * Copyright (C) 2024 - 2026 Mic (m@micz.it) * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/js/api/openai_comp.js b/js/api/openai_comp.js index 683a0b8c..19d1d2cf 100644 --- a/js/api/openai_comp.js +++ b/js/api/openai_comp.js @@ -1,6 +1,6 @@ /* * ThunderAI [https://micz.it/thunderbird-addon-thunderai/] - * Copyright (C) 2024 - 2025 Mic (m@micz.it) + * Copyright (C) 2024 - 2026 Mic (m@micz.it) * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/js/api/openai_comp_configs.js b/js/api/openai_comp_configs.js index 35ce9cd9..4eb7bbd4 100644 --- a/js/api/openai_comp_configs.js +++ b/js/api/openai_comp_configs.js @@ -1,6 +1,6 @@ /* * ThunderAI [https://micz.it/thunderbird-addon-thunderai/] - * Copyright (C) 2024 - 2025 Mic (m@micz.it) + * Copyright (C) 2024 - 2026 Mic (m@micz.it) * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/js/api/openai_responses.js b/js/api/openai_responses.js index 174c4f4d..229cc0c4 100644 --- a/js/api/openai_responses.js +++ b/js/api/openai_responses.js @@ -1,6 +1,6 @@ /* * ThunderAI [https://micz.it/thunderbird-addon-thunderai/] - * Copyright (C) 2024 - 2025 Mic (m@micz.it) + * Copyright (C) 2024 - 2026 Mic (m@micz.it) * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/js/mzta-addatags-exclusion-list.js b/js/mzta-addatags-exclusion-list.js index 47e35ece..1b04b645 100644 --- a/js/mzta-addatags-exclusion-list.js +++ b/js/mzta-addatags-exclusion-list.js @@ -1,6 +1,6 @@ /* * ThunderAI [https://micz.it/thunderbird-addon-thunderai/] - * Copyright (C) 2024 - 2025 Mic (m@micz.it) + * Copyright (C) 2024 - 2026 Mic (m@micz.it) * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/js/mzta-chatgpt-loader.js b/js/mzta-chatgpt-loader.js index 0e3685df..28bb8272 100644 --- a/js/mzta-chatgpt-loader.js +++ b/js/mzta-chatgpt-loader.js @@ -1,6 +1,6 @@ /* * ThunderAI [https://micz.it/thunderbird-addon-thunderai/] - * Copyright (C) 2024 - 2025 Mic (m@micz.it) + * Copyright (C) 2024 - 2026 Mic (m@micz.it) * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/js/mzta-chatgpt.js b/js/mzta-chatgpt.js index a5dbda64..4ccdb448 100644 --- a/js/mzta-chatgpt.js +++ b/js/mzta-chatgpt.js @@ -1,6 +1,6 @@ /* * ThunderAI [https://micz.it/thunderbird-addon-thunderai/] - * Copyright (C) 2024 - 2025 Mic (m@micz.it) + * Copyright (C) 2024 - 2026 Mic (m@micz.it) * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/js/mzta-compose-script.js b/js/mzta-compose-script.js index 6d11c492..972a32de 100644 --- a/js/mzta-compose-script.js +++ b/js/mzta-compose-script.js @@ -1,6 +1,6 @@ /* * ThunderAI [https://micz.it/thunderbird-addon-thunderai/] - * Copyright (C) 2024 - 2025 Mic (m@micz.it) + * Copyright (C) 2024 - 2026 Mic (m@micz.it) * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/js/mzta-logger.js b/js/mzta-logger.js index be7292fc..eb68ec66 100644 --- a/js/mzta-logger.js +++ b/js/mzta-logger.js @@ -1,6 +1,6 @@ /* * ThunderAI [https://micz.it/thunderbird-addon-thunderai/] - * Copyright (C) 2024 - 2025 Mic (m@micz.it) + * Copyright (C) 2024 - 2026 Mic (m@micz.it) * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/js/mzta-menus.js b/js/mzta-menus.js index c2a54999..546b69c0 100644 --- a/js/mzta-menus.js +++ b/js/mzta-menus.js @@ -1,6 +1,6 @@ /* * ThunderAI [https://micz.it/thunderbird-addon-thunderai/] - * Copyright (C) 2024 - 2025 Mic (m@micz.it) + * Copyright (C) 2024 - 2026 Mic (m@micz.it) * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/js/mzta-placeholders-autocomplete.js b/js/mzta-placeholders-autocomplete.js index d4f03f3d..ecfd7028 100644 --- a/js/mzta-placeholders-autocomplete.js +++ b/js/mzta-placeholders-autocomplete.js @@ -1,6 +1,6 @@ /* * ThunderAI [https://micz.it/thunderbird-addon-thunderai/] - * Copyright (C) 2024 - 2025 Mic (m@micz.it) + * Copyright (C) 2024 - 2026 Mic (m@micz.it) * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/js/mzta-placeholders.js b/js/mzta-placeholders.js index 27eeb858..bfb841c7 100644 --- a/js/mzta-placeholders.js +++ b/js/mzta-placeholders.js @@ -1,6 +1,6 @@ /* * ThunderAI [https://micz.it/thunderbird-addon-thunderai/] - * Copyright (C) 2024 - 2025 Mic (m@micz.it) + * Copyright (C) 2024 - 2026 Mic (m@micz.it) * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/js/mzta-prompts.js b/js/mzta-prompts.js index 3f1526af..f9ac22a1 100644 --- a/js/mzta-prompts.js +++ b/js/mzta-prompts.js @@ -1,6 +1,6 @@ /* * ThunderAI [https://micz.it/thunderbird-addon-thunderai/] - * Copyright (C) 2024 - 2025 Mic (m@micz.it) + * Copyright (C) 2024 - 2026 Mic (m@micz.it) * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/js/mzta-spamreport.js b/js/mzta-spamreport.js index abfaae83..99b4efc5 100644 --- a/js/mzta-spamreport.js +++ b/js/mzta-spamreport.js @@ -1,6 +1,6 @@ /* * ThunderAI [https://micz.it/thunderbird-addon-thunderai/] - * Copyright (C) 2024 - 2025 Mic (m@micz.it) + * Copyright (C) 2024 - 2026 Mic (m@micz.it) * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/js/mzta-special-commands.js b/js/mzta-special-commands.js index 95a0d14f..79267b98 100644 --- a/js/mzta-special-commands.js +++ b/js/mzta-special-commands.js @@ -1,6 +1,6 @@ /* * ThunderAI [https://micz.it/thunderbird-addon-thunderai/] - * Copyright (C) 2024 - 2025 Mic (m@micz.it) + * Copyright (C) 2024 - 2026 Mic (m@micz.it) * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/js/mzta-store.js b/js/mzta-store.js index 1b4e3f6c..5729aa4e 100644 --- a/js/mzta-store.js +++ b/js/mzta-store.js @@ -1,6 +1,6 @@ /* * ThunderAI [https://micz.it/thunderbird-addon-thunderai/] - * Copyright (C) 2024 - 2025 Mic (m@micz.it) + * Copyright (C) 2024 - 2026 Mic (m@micz.it) * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/js/mzta-utils-prompt.js b/js/mzta-utils-prompt.js index 896f6406..d1c638b7 100644 --- a/js/mzta-utils-prompt.js +++ b/js/mzta-utils-prompt.js @@ -1,6 +1,6 @@ /* * ThunderAI [https://micz.it/thunderbird-addon-thunderai/] - * Copyright (C) 2024 - 2025 Mic (m@micz.it) + * Copyright (C) 2024 - 2026 Mic (m@micz.it) * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/js/mzta-utils.js b/js/mzta-utils.js index f58d9b99..a99c70a9 100644 --- a/js/mzta-utils.js +++ b/js/mzta-utils.js @@ -1,6 +1,6 @@ /* * ThunderAI [https://micz.it/thunderbird-addon-thunderai/] - * Copyright (C) 2024 - 2025 Mic (m@micz.it) + * Copyright (C) 2024 - 2026 Mic (m@micz.it) * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/js/mzta-working-status.js b/js/mzta-working-status.js index 9f220d0f..81f2cb76 100644 --- a/js/mzta-working-status.js +++ b/js/mzta-working-status.js @@ -1,6 +1,6 @@ /* * ThunderAI [https://micz.it/thunderbird-addon-thunderai/] - * Copyright (C) 2024 - 2025 Mic (m@micz.it) + * Copyright (C) 2024 - 2026 Mic (m@micz.it) * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/js/tb115_segmenter/tb115_loader.js b/js/tb115_segmenter/tb115_loader.js index 0c2fc7da..df476c7c 100644 --- a/js/tb115_segmenter/tb115_loader.js +++ b/js/tb115_segmenter/tb115_loader.js @@ -1,6 +1,6 @@ /* * ThunderAI [https://micz.it/thunderbird-addon-thunderai/] - * Copyright (C) 2024 - 2025 Mic (m@micz.it) + * Copyright (C) 2024 - 2026 Mic (m@micz.it) * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/js/tb115_segmenter/tb115_polyfill.js b/js/tb115_segmenter/tb115_polyfill.js index ae06b97a..6760cd9a 100644 --- a/js/tb115_segmenter/tb115_polyfill.js +++ b/js/tb115_segmenter/tb115_polyfill.js @@ -1,6 +1,6 @@ /* * ThunderAI [https://micz.it/thunderbird-addon-thunderai/] - * Copyright (C) 2024 - 2025 Mic (m@micz.it) + * Copyright (C) 2024 - 2026 Mic (m@micz.it) * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/js/workers/model-worker-anthropic.js b/js/workers/model-worker-anthropic.js index 9af3dc17..21452ca4 100644 --- a/js/workers/model-worker-anthropic.js +++ b/js/workers/model-worker-anthropic.js @@ -1,6 +1,6 @@ /* * ThunderAI [https://micz.it/thunderbird-addon-thunderai/] - * Copyright (C) 2024 - 2025 Mic (m@micz.it) + * Copyright (C) 2024 - 2026 Mic (m@micz.it) * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/js/workers/model-worker-google_gemini.js b/js/workers/model-worker-google_gemini.js index 4b6fc138..efd1b9c7 100644 --- a/js/workers/model-worker-google_gemini.js +++ b/js/workers/model-worker-google_gemini.js @@ -1,6 +1,6 @@ /* * ThunderAI [https://micz.it/thunderbird-addon-thunderai/] - * Copyright (C) 2024 - 2025 Mic (m@micz.it) + * Copyright (C) 2024 - 2026 Mic (m@micz.it) * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/js/workers/model-worker-ollama.js b/js/workers/model-worker-ollama.js index 3987df33..6a8d1310 100644 --- a/js/workers/model-worker-ollama.js +++ b/js/workers/model-worker-ollama.js @@ -1,6 +1,6 @@ /* * ThunderAI [https://micz.it/thunderbird-addon-thunderai/] - * Copyright (C) 2024 - 2025 Mic (m@micz.it) + * Copyright (C) 2024 - 2026 Mic (m@micz.it) * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/js/workers/model-worker-openai_comp.js b/js/workers/model-worker-openai_comp.js index a541ffa8..d2685500 100644 --- a/js/workers/model-worker-openai_comp.js +++ b/js/workers/model-worker-openai_comp.js @@ -1,6 +1,6 @@ /* * ThunderAI [https://micz.it/thunderbird-addon-thunderai/] - * Copyright (C) 2024 - 2025 Mic (m@micz.it) + * Copyright (C) 2024 - 2026 Mic (m@micz.it) * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/js/workers/model-worker-openai_responses.js b/js/workers/model-worker-openai_responses.js index 89803673..8f3189ee 100644 --- a/js/workers/model-worker-openai_responses.js +++ b/js/workers/model-worker-openai_responses.js @@ -1,6 +1,6 @@ /* * ThunderAI [https://micz.it/thunderbird-addon-thunderai/] - * Copyright (C) 2024 - 2025 Mic (m@micz.it) + * Copyright (C) 2024 - 2026 Mic (m@micz.it) * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/mzta-background.js b/mzta-background.js index 1b5b8e40..915f12ab 100644 --- a/mzta-background.js +++ b/mzta-background.js @@ -1,6 +1,6 @@ /* * ThunderAI [https://micz.it/thunderbird-addon-thunderai/] - * Copyright (C) 2024 - 2025 Mic (m@micz.it) + * Copyright (C) 2024 - 2026 Mic (m@micz.it) * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/options/mzta-options-default.js b/options/mzta-options-default.js index fbecbfb6..66b24890 100644 --- a/options/mzta-options-default.js +++ b/options/mzta-options-default.js @@ -1,6 +1,6 @@ /* * ThunderAI [https://micz.it/thunderbird-addon-thunderai/] - * Copyright (C) 2024 - 2025 Mic (m@micz.it) + * Copyright (C) 2024 - 2026 Mic (m@micz.it) * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/options/mzta-options.js b/options/mzta-options.js index 2f8c4424..16b130fd 100644 --- a/options/mzta-options.js +++ b/options/mzta-options.js @@ -1,6 +1,6 @@ /* * ThunderAI [https://micz.it/thunderbird-addon-thunderai/] - * Copyright (C) 2024 - 2025 Mic (m@micz.it) + * Copyright (C) 2024 - 2026 Mic (m@micz.it) * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/options/mzta-release-notes.js b/options/mzta-release-notes.js index 6559e014..c3270305 100644 --- a/options/mzta-release-notes.js +++ b/options/mzta-release-notes.js @@ -1,6 +1,6 @@ /* * ThunderAI [https://micz.it/thunderbird-addon-thunderai/] - * Copyright (C) 2024 - 2025 Mic (m@micz.it) + * Copyright (C) 2024 - 2026 Mic (m@micz.it) * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/pages/_lib/connection-ui.js b/pages/_lib/connection-ui.js index 70c40636..37c779ed 100644 --- a/pages/_lib/connection-ui.js +++ b/pages/_lib/connection-ui.js @@ -1,6 +1,6 @@ /* * ThunderAI [https://micz.it/thunderbird-addon-thunderai/] - * Copyright (C) 2024 - 2025 Mic (m@micz.it) + * Copyright (C) 2024 - 2026 Mic (m@micz.it) * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/pages/addtags/mzta-add-tags.js b/pages/addtags/mzta-add-tags.js index 314d62e0..7f323fd8 100644 --- a/pages/addtags/mzta-add-tags.js +++ b/pages/addtags/mzta-add-tags.js @@ -1,6 +1,6 @@ /* * ThunderAI [https://micz.it/thunderbird-addon-thunderai/] - * Copyright (C) 2024 - 2025 Mic (m@micz.it) + * Copyright (C) 2024 - 2026 Mic (m@micz.it) * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/pages/customdataplaceholders/mzta-custom-dataplaceholders.js b/pages/customdataplaceholders/mzta-custom-dataplaceholders.js index 5a9a9314..2c2e896a 100644 --- a/pages/customdataplaceholders/mzta-custom-dataplaceholders.js +++ b/pages/customdataplaceholders/mzta-custom-dataplaceholders.js @@ -1,6 +1,6 @@ /* * ThunderAI [https://micz.it/thunderbird-addon-thunderai/] - * Copyright (C) 2024 - 2025 Mic (m@micz.it) + * Copyright (C) 2024 - 2026 Mic (m@micz.it) * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/pages/customprompts/mzta-custom-prompts.js b/pages/customprompts/mzta-custom-prompts.js index 03fa2b7a..2b01f6e6 100644 --- a/pages/customprompts/mzta-custom-prompts.js +++ b/pages/customprompts/mzta-custom-prompts.js @@ -1,6 +1,6 @@ /* * ThunderAI [https://micz.it/thunderbird-addon-thunderai/] - * Copyright (C) 2024 - 2025 Mic (m@micz.it) + * Copyright (C) 2024 - 2026 Mic (m@micz.it) * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/pages/get-calendar-event/mzta-get-calendar-event.js b/pages/get-calendar-event/mzta-get-calendar-event.js index 303ac444..2102083a 100644 --- a/pages/get-calendar-event/mzta-get-calendar-event.js +++ b/pages/get-calendar-event/mzta-get-calendar-event.js @@ -1,6 +1,6 @@ /* * ThunderAI [https://micz.it/thunderbird-addon-thunderai/] - * Copyright (C) 2024 - 2025 Mic (m@micz.it) + * Copyright (C) 2024 - 2026 Mic (m@micz.it) * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/pages/get-task/mzta-get-task.js b/pages/get-task/mzta-get-task.js index 84df2e8e..685fa7f8 100644 --- a/pages/get-task/mzta-get-task.js +++ b/pages/get-task/mzta-get-task.js @@ -1,6 +1,6 @@ /* * ThunderAI [https://micz.it/thunderbird-addon-thunderai/] - * Copyright (C) 2024 - 2025 Mic (m@micz.it) + * Copyright (C) 2024 - 2026 Mic (m@micz.it) * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/pages/onboarding/onboarding.js b/pages/onboarding/onboarding.js index 747aedad..ccb9a1ce 100644 --- a/pages/onboarding/onboarding.js +++ b/pages/onboarding/onboarding.js @@ -1,6 +1,6 @@ /* * ThunderAI [https://micz.it/thunderbird-addon-thunderai/] - * Copyright (C) 2024 - 2025 Mic (m@micz.it) + * Copyright (C) 2024 - 2026 Mic (m@micz.it) * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/pages/spamfilter/mzta-spamfilter.js b/pages/spamfilter/mzta-spamfilter.js index 8df6369e..e2e0a36a 100644 --- a/pages/spamfilter/mzta-spamfilter.js +++ b/pages/spamfilter/mzta-spamfilter.js @@ -1,6 +1,6 @@ /* * ThunderAI [https://micz.it/thunderbird-addon-thunderai/] - * Copyright (C) 2024 - 2025 Mic (m@micz.it) + * Copyright (C) 2024 - 2026 Mic (m@micz.it) * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/popup/mzta-popup.js b/popup/mzta-popup.js index d73aaf14..d5d69664 100644 --- a/popup/mzta-popup.js +++ b/popup/mzta-popup.js @@ -1,6 +1,6 @@ /* * ThunderAI [https://micz.it/thunderbird-addon-thunderai/] - * Copyright (C) 2024 - 2025 Mic (m@micz.it) + * Copyright (C) 2024 - 2026 Mic (m@micz.it) * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by From 441a2d583586ba22758ddaed96aa7da9b126cba6 Mon Sep 17 00:00:00 2001 From: mic Date: Sat, 3 Jan 2026 23:09:33 +0100 Subject: [PATCH 11/16] info comment updated. see #102 --- js/mzta-prompts.js | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/js/mzta-prompts.js b/js/mzta-prompts.js index f9ac22a1..3cf4cf67 100644 --- a/js/mzta-prompts.js +++ b/js/mzta-prompts.js @@ -75,9 +75,7 @@ API Connection Type : api type - API Model - : api model - + << All the API settings defined in the default options, with the same IDs. >> */ const defaultPrompts = [ From fdc8d0920b3674a7a0c72cc38067b3afe757d237 Mon Sep 17 00:00:00 2001 From: mic Date: Sat, 3 Jan 2026 23:10:31 +0100 Subject: [PATCH 12/16] api_model removed. see #102 --- js/mzta-prompts.js | 14 -------------- 1 file changed, 14 deletions(-) diff --git a/js/mzta-prompts.js b/js/mzta-prompts.js index 3cf4cf67..9ab9bff8 100644 --- a/js/mzta-prompts.js +++ b/js/mzta-prompts.js @@ -94,7 +94,6 @@ const defaultPrompts = [ chatgpt_web_project: '', chatgpt_web_custom_gpt: '', api_type: '', - api_model: '', is_default: "1", is_special: "0", }, @@ -113,7 +112,6 @@ const defaultPrompts = [ chatgpt_web_project: '', chatgpt_web_custom_gpt: '', api_type: '', - api_model: '', is_default: "1", is_special: "0", }, @@ -132,7 +130,6 @@ const defaultPrompts = [ chatgpt_web_project: '', chatgpt_web_custom_gpt: '', api_type: '', - api_model: '', is_default: "1", is_special: "0", }, @@ -151,7 +148,6 @@ const defaultPrompts = [ chatgpt_web_project: '', chatgpt_web_custom_gpt: '', api_type: '', - api_model: '', is_default: "1", is_special: "0", }, @@ -170,7 +166,6 @@ const defaultPrompts = [ chatgpt_web_project: '', chatgpt_web_custom_gpt: '', api_type: '', - api_model: '', is_default: "1", is_special: "0", }, @@ -189,7 +184,6 @@ const defaultPrompts = [ chatgpt_web_project: '', chatgpt_web_custom_gpt: '', api_type: '', - api_model: '', is_default: "1", is_special: "0", }, @@ -208,7 +202,6 @@ const defaultPrompts = [ chatgpt_web_project: '', chatgpt_web_custom_gpt: '', api_type: '', - api_model: '', is_default: "1", is_special: "0", }, @@ -227,7 +220,6 @@ const defaultPrompts = [ chatgpt_web_project: '', chatgpt_web_custom_gpt: '', api_type: '', - api_model: '', is_default: "1", is_special: "0", }, @@ -246,7 +238,6 @@ const defaultPrompts = [ chatgpt_web_project: '', chatgpt_web_custom_gpt: '', api_type: '', - api_model: '', is_default: "1", is_special: "0", }, @@ -265,7 +256,6 @@ const defaultPrompts = [ chatgpt_web_project: '', chatgpt_web_custom_gpt: '', api_type: '', - api_model: '', is_default: "1", is_special: "0", }, @@ -284,7 +274,6 @@ const specialPrompts = [ define_response_lang: "0", use_diff_viewer: "0", api_type: '', - api_model: '', is_default: "1", is_special: "1", }, @@ -300,7 +289,6 @@ const specialPrompts = [ define_response_lang: "0", use_diff_viewer: "0", api_type: '', - api_model: '', is_default: "1", is_special: "1", }, @@ -316,7 +304,6 @@ const specialPrompts = [ define_response_lang: "0", use_diff_viewer: "0", api_type: '', - api_model: '', is_default: "1", is_special: "1", }, @@ -332,7 +319,6 @@ const specialPrompts = [ define_response_lang: "0", use_diff_viewer: "0", api_type: '', - api_model: '', is_default: "1", is_special: "1", }, From 0b002e902c95487567fc29bf561e598aab7056e0 Mon Sep 17 00:00:00 2001 From: Andreas Pettersson Date: Sat, 3 Jan 2026 23:11:26 +0100 Subject: [PATCH 13/16] Translated using Weblate (Swedish) Currently translated at 45.6% (197 of 432 strings) Translation: ThunderAI for Thunderbird/main Translate-URL: https://hosted.weblate.org/projects/thunderai/main/sv/ --- _locales/sv/messages.json | 522 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 522 insertions(+) diff --git a/_locales/sv/messages.json b/_locales/sv/messages.json index 501458e0..7d9b5c0b 100644 --- a/_locales/sv/messages.json +++ b/_locales/sv/messages.json @@ -67,5 +67,527 @@ }, "prefs_OptionText_chatgpt_win_width": { "message": "Bredd" + }, + "prompt_summarize_this": { + "message": "Sammanfatta detta" + }, + "prompt_translate_this": { + "message": "Översätt detta" + }, + "more_info_string": { + "message": "Mer information" + }, + "prompt_classify": { + "message": "Klassificera" + }, + "customPrompts_reloading_menus": { + "message": "Laddar om menyer..." + }, + "customPrompts_form_required_fields": { + "message": "Obligatoriska fält" + }, + "customPrompts_add_to_menu_reading": { + "message": "Läser ett e-postmeddelande" + }, + "customPrompts_add_to_menu_composing": { + "message": "Skriver ett e-postmeddelande" + }, + "chatgpt_win_working": { + "message": "Arbete pågår..." + }, + "chatgpt_win_job_completed": { + "message": "Färdigt!" + }, + "chatgpt_win_job_completed_select": { + "message": "Markera den text du vill använda och klicka på knappen." + }, + "chatgpt_win_get_answer": { + "message": "Använd det valda svaret" + }, + "prefs_OptionText_release_notes": { + "message": "Versionsinformation" + }, + "prefsInfoTitle": { + "message": "Viktig information" + }, + "placeholder_tags_current_email": { + "message": "E-posttaggar" + }, + "placeholder_tags_full_list": { + "message": "Befintliga taggar" + }, + "prefs_OptionText_add_tags_maxnum": { + "message": "Maximalt antal taggar" + }, + "prefs_OptionText_add_tags_maxnum_Info": { + "message": "Det maximala antalet taggar som föreslås av AI:n. Ställ den på 0 om du inte vill begränsa antalet taggar." + }, + "prompt_add_tags_maxnum": { + "message": "Begränsa antalet taggar till" + }, + "prefs_OptionText_add_tags_hide_exclusions": { + "message": "Dölj uteslutna taggar" + }, + "prefs_OptionText_add_tags_hide_exclusions_Info": { + "message": "Om markerad kommer taggarna som finns i undantagslistan att döljas i bekräftelsedialogrutan." + }, + "prefs_OptionText_btnManageTagsInfo": { + "message": "Hantera tagginställningar" + }, + "AddTags_PageTitle": { + "message": "Hantera tagginställningar" + }, + "AddTags_excl_list_title": { + "message": "Undantagslista" + }, + "AddTags_excl_list_infoline": { + "message": "Detta är en lista över taggar som inte får läggas till i e-postmeddelanden." + }, + "save": { + "message": "Spara" + }, + "reset_default": { + "message": "Återställ till standard" + }, + "reset": { + "message": "Återställ" + }, + "addtags_excl_list_infoline2": { + "message": "Lägg till ett ord per rad, eller separera med kommatecken." + }, + "addtags_dialog_title": { + "message": "Lägg till taggar i e-postmeddelandet" + }, + "addtags_exclude_tag": { + "message": "Uteslut tagg" + }, + "addtags_no_tags_received": { + "message": "Inga taggar mottagna från AI:n." + }, + "addtags_no_valid_tags": { + "message": "Inga giltiga taggar hittades efter filtrering med undantagslistan." + }, + "thunderai_error_title": { + "message": "ThunderAI-fel" + }, + "thunderai_warning_title": { + "message": "ThunderAI-varning" + }, + "prefs_OptionText_add_tags_first_uppercase_Info": { + "message": "Om markerad kommer taggarna att ställas in på gemener med endast den första bokstaven som versal." + }, + "prefs_OptionText_add_tags_first_uppercase": { + "message": "Första bokstaven som versal" + }, + "prompt_reply": { + "message": "Svara på detta e-postmeddelande" + }, + "prompt_reply_advanced": { + "message": "Svara på denna tråd" + }, + "prompt_reply_custom_command": { + "message": "Svara med kommando" + }, + "prompt_rewrite_polite": { + "message": "Skriv om artigt" + }, + "prompt_rewrite_formal": { + "message": "Skriv om formellt" + }, + "customPrompts_managePrompts": { + "message": "Hantera promptar" + }, + "prompt_lang": { + "message": "Svara på" + }, + "customPrompts_start_saving": { + "message": "Sparar promptar..." + }, + "customPrompts_reindexing_list": { + "message": "Omindexerar listan..." + }, + "customPrompts_filtering_prompts": { + "message": "Filtrerar promptar..." + }, + "customPrompts_saving_default_prompts": { + "message": "Sparar standardpromptar..." + }, + "customPrompts_saving_custom_prompts": { + "message": "Sparar anpassade promptar..." + }, + "customPrompts_saved": { + "message": "Promptar sparade!" + }, + "customPrompts_form_label_ID": { + "message": "Id" + }, + "customPrompts_form_label_ID_rules": { + "message": "Måste vara unikt, med gemener och utan mellanslag" + }, + "customPrompts_form_label_Text": { + "message": "Prompttext" + }, + "customPrompts_form_label_need_selected": { + "message": "Textval behövs" + }, + "customPrompts_form_label_need_signature": { + "message": "Lägg alltid till signaturen" + }, + "customPrompts_form_label_need_custom_text": { + "message": "Be om ytterligare text" + }, + "customPrompts_form_label_use_diff_viewer": { + "message": "Aktivera visaren för textjämförelse" + }, + "customPrompts_form_label_use_diff_viewer_title": { + "message": "Textjämförelsevisaren kan väljas när åtgärden är inställd på \"Ersätt text\"." + }, + "customPrompts_btnAddNewCommit": { + "message": "Lägg till prompten" + }, + "customPrompts_add_to_menu": { + "message": "Lägg till i meny" + }, + "customPrompts_close_button": { + "message": "Stäng-knapp" + }, + "customPrompts_do_reply": { + "message": "Svara" + }, + "customPrompts_substitute_text": { + "message": "Ersätt text" + }, + "chatgpt_textarea_not_found_error": { + "message": "Det verkar som att ChatGPT-sidan tar för lång tid att ladda. Om den är klar klickar du på knappen till höger. Om problemet kvarstår kontrollerar du tjänstens status." + }, + "chatgpt_sendbutton_not_found_error": { + "message": "Klicka på skicka-knappen för att skicka in prompten." + }, + "chatgpt_user_not_logged_in": { + "message": "Du är inte inloggad på ChatGPT. Logga in med dina inloggningsuppgifter, stäng ChatGPT-fönstret och upprepa sedan åtgärden du försökte göra. Du kommer att förbli inloggad efteråt." + }, + "chatgpt_win_model_warning": { + "message": "Av någon anledning är det inte möjligt att verifiera om rätt modell är laddad. För tillfället kan du trycka på den blå knappen för att fortsätta." + }, + "chatgpt_win_custom_text": { + "message": "Infoga här den ytterligare texten för prompten." + }, + "chatgpt_force_completion": { + "message": "tvinga slutförande" + }, + "prompt_this": { + "message": "Prompt detta" + }, + "prompt_string": { + "message": "Prompt" + }, + "customPrompts_managePrompts_info_default": { + "message": "Standardpromptar kan inte redigeras. Du kan inaktivera dem och sedan kopiera prompttexten och klistra in den i en ny för att skapa en modifierad version." + }, + "customPrompts_managePrompts_info_default_2": { + "message": "Du kan importera och exportera promptar. Befintliga promptar med samma ID kommer att skrivas över. Promptar med nya ID:n kommer att läggas till." + }, + "customPrompts_managePrompts_info_default_3": { + "message": "Om allt är korrekt, klicka på knappen \"Spara alla\" efter importen." + }, + "chatgpt_force_completion_title": { + "message": "Klicka här för att visa knappen \"Använd senaste svar\" om ChatGPT har slutfört sitt arbete men knappen inte har visats." + }, + "msg_prompt_too_long": { + "message": "Texten du angav är för lång. Du måste förkorta den." + }, + "prefs_status_page": { + "message": "tjänstestatus" + }, + "prefs_OptionText_chatgpt_win_text": { + "message": "AI-chattfönstrets dimensioner" + }, + "prefs_OptionText_default_sign_name": { + "message": "Standardsignaturnamn" + }, + "prefs_OptionText_default_chatgpt_lang": { + "message": "Standardspråk för svaren" + }, + "prefs_OptionText_reply_all": { + "message": "Svara alla" + }, + "prefs_OptionText_reply_sender": { + "message": "Svara till avsändaren" + }, + "prefs_OptionText_reply_type": { + "message": "Svarstyp" + }, + "prefs_OptionText_reply_type_Info": { + "message": "Detta är standardsvarstypen som används när du svarar på ett e-postmeddelande. Du kan välja den andra typen senare i svarsdialogrutan." + }, + "prefs_OptionText_btnManagePrompts": { + "message": "Hantera dina promptar" + }, + "prefs_OptionText_btnManageCustomDataPH": { + "message": "Hantera dina dataplatshållare" + }, + "prefsInfoDesc_1": { + "message": "Det kan hända att ChatGPT:s webbgränssnitt ändras på ett sätt som stör hur tillägget fungerar. Kontrollera sidan \"Tjänststatus\" som är länkad längst ner på den här sidan. Kom också ihåg att första gången du använder ThunderAI måste du logga in på ChatGPT." + }, + "prefsInfoDesc_2": { + "message": "För att använda ChatGPT API behöver du en OpenAI ChatGPT API-nyckel och måste välja en modell." + }, + "prefsInfoDesc_3": { + "message": "För att använda integrationen med Ollama måste du konfigurera en lokal Ollama-server. När servern är igång anger du dess adress i det angivna fältet i applikationen. För att säkerställa korrekt kommunikation mellan ThunderAI och Ollama-servern, kom ihåg att ange OLLAMA_ORIGINS=moz-extension://*." + }, + "prefsInfoDesc_4": { + "message": "För att använda den här integrationen behöver du konfigurera en lokal server som är kompatibel med OpenAI API, som LM Studio. När servern är igång anger du dess adress i det angivna fältet i applikationen. För att säkerställa korrekt kommunikation mellan ThunderAI och den lokala servern, kom ihåg att ställa in CORS-inställningarna korrekt." + }, + "prefsInfoDesc_5": { + "message": "Kom ihåg att du kan öppna ThunderAI-menyn med kortkommandot CTRL+ALT+A." + }, + "prefsInfoDesc_6": { + "message": "Du kan ändra genvägen genom att klicka på kugghjulsikonen längst upp till höger på den här sidan och välja \"Hantera genväg för tillägg\"." + }, + "prefsDonation_1": { + "message": "Gillar du det här tillägget?" + }, + "prefsDonation_2": { + "message": "Överväg att göra en donation!" + }, + "backToOptionsText": { + "message": "Alternativ" + }, + "TranslateText": { + "message": "Vill du hjälpa till att översätta det här tillägget?" + }, + "TranslateLink": { + "message": "Ta reda på hur!" + }, + "customPrompts_ExportAll": { + "message": "Exportera alla promptar" + }, + "customPrompts_Import": { + "message": "Importera nya promptar" + }, + "importPrompts_confirmText": { + "message": "Du håller på att importera nya promptar." + }, + "customPrompts_start_import": { + "message": "Startar import av anpassade promptar..." + }, + "customPrompts_import_completed": { + "message": "Import av anpassade promptar är klar! Du måste klicka på knappen \"Spara alla\" för att spara dina ändringar." + }, + "importPrompts_invalidFile": { + "message": "Filen du försöker importera är inte en giltig fil med anpassade promptar." + }, + "importPrompts_invalidPrompts": { + "message": "Filen du försöker importera innehåller inga giltiga promptar." + }, + "currently_used_prompt": { + "message": "För närvarande använt promptnamn" + }, + "customprompts_form_label_define_response_lang": { + "message": "Definiera svarsspråket i prompten" + }, + "prefs_Connection_type": { + "message": "Anslutningstyp" + }, + "prefs_Connection_type_ChatGPT_Web": { + "message": "ChatGPT-webbgränssnitt" + }, + "prefs_Connection_type_ChatGPT_API": { + "message": "ChatGPT OpenAI API" + }, + "prefs_ChatGPT_API_Key": { + "message": "ChatGPT API-nyckel" + }, + "ChatGPT_Models": { + "message": "ChatGPT-modeller" + }, + "ChatGPT_Models_Fetch": { + "message": "Uppdatera listan över ChatGPT-modeller" + }, + "ChatGPT_Models_Error_fetching": { + "message": "Fel vid försök att hämta ChatGPT-modeller" + }, + "Loading": { + "message": "Laddar..." + }, + "error": { + "message": "ThunderAI-fel!" + }, + "chatgpt_empty_apikey": { + "message": "Du har inte lagt till en API-nyckel för ChatGPT API. Vänligen ange en på alternativsidan." + }, + "chatgpt_empty_model": { + "message": "Du har inte valt någon modell för ChatGPT API. Välj en på alternativsidan." + }, + "chagpt_api_send_button": { + "message": "Använda modell" + }, + "Debug": { + "message": "Felsök" + }, + "prefs_OptionText_do_debug_info": { + "message": "Aktivera felsökningssystemet" + }, + "prefs_Connection_type_Ollama_API": { + "message": "Ollama API (Lokal LLM)" + }, + "prefs_Connection_type_OpenAI_Comp_API": { + "message": "OpenAI-kompatibelt API" + }, + "prefs_API_Host": { + "message": "Värdadress" + }, + "Ollama_Models": { + "message": "Ollama-modeller" + }, + "Ollama_Models_Fetch": { + "message": "Uppdatera listan över Ollama-modeller" + }, + "Ollama_Models_Error_fetching": { + "message": "Fel vid försök att hämta Ollama-modeller" + }, + "API_Models_Error_NoModels": { + "message": "Inga modeller hittades" + }, + "ollama_empty_host": { + "message": "Du har inte lagt till en värdadress för Ollama API. Vänligen ange en på alternativsidan." + }, + "ollama_empty_model": { + "message": "Du har inte valt någon modell för Ollama API. Välj en på alternativsidan." + }, + "error_connection_interrupted": { + "message": "Anslutningen till servern avbröts oväntat" + }, + "ollama_api_request_failed": { + "message": "Ollama API-begäran misslyckades" + }, + "chatgpt_api_request_failed": { + "message": "OpenAI ChatGPT API-begäran misslyckades" + }, + "WaitingServerResponse": { + "message": "Väntar på serversvar" + }, + "prefs_API_Host_Info": { + "message": "Något liknande" + }, + "OpenAIComp_Models": { + "message": "OpenAI-kompatibla API-modeller" + }, + "OpenAIComp_Models_Fetch": { + "message": "Uppdatera listan över OpenAI-kompatibla API-modeller" + }, + "OpenAIComp_Models_Error_fetching": { + "message": "Fel vid försök att hämta OpenAI-kompatibla API-modeller" + }, + "OpenAIComp_empty_host": { + "message": "Du har inte lagt till en värdadress för OpenAI-kompatibla API:et. Vänligen ange en på alternativsidan." + }, + "OpenAIComp_empty_model": { + "message": "Du har inte valt en modell för OpenAI-kompatibelt API. Välj en på alternativsidan." + }, + "OpenAIComp_api_request_failed": { + "message": "OpenAI Comp API-begäran misslyckades" + }, + "prefs_OpenAIComp_ChatName": { + "message": "Chattnamn" + }, + "prefs_OpenAIComp_ChatName_Info": { + "message": "Detta är namnet som kommer att användas i AI-chatten." + }, + "StorageSpace": { + "message": "Totalt upptaget lagringsutrymme" + }, + "SearchPrompt": { + "message": "Sök promptar" + }, + "prefs_OptionText_dynamic_menu_force_enter_info": { + "message": "Om markerat, skickas den markerade prompten från menyn automatiskt genom att använda kortkommandot CTRL+ALT+A. Annars visas promptnamnet för användaren, vilket kräver ytterligare ett tryck på Enter-tangenten för att skicka den." + }, + "prefs_OptionText_dynamic_menu_force_enter": { + "message": "Meny: skicka omedelbart prompt" + }, + "prefs_OptionText_dynamic_menu_order_alphabet": { + "message": "Meny: ordna alfabetiskt" + }, + "prefs_OptionText_dynamic_menu_order_alphabet_info": { + "message": "Om markerat kommer promptar i menyn att ordnas alfabetiskt." + }, + "prefs_OptionText_chatgpt_win_dims_info": { + "message": "Ställ in värdet till 0 om du inte vill ange fönsterstorleken." + }, + "prefs_OpenAIComp_API_Key": { + "message": "OpenAI Comp API-nyckel" + }, + "Optional": { + "message": "Valfri" + }, + "OpenChatGPTTab": { + "message": "Öppna fliken ChatGPT" + }, + "OpenChatGPTTab_Info": { + "message": "Vid inloggningsproblem i ThunderAI-fönstret, öppna ChatGPT i en ny flik med knappen till höger, logga in, stäng sedan fliken och fortsätt använda ThunderAI." + }, + "OpenChatGPTTab_Info2": { + "message": "Om du öppnar ChatGPT Web härifrån tillämpas alla konfigurerade inställningar för modellen, projektet och den anpassade GPT:n." + }, + "placeholder_mail_text_body": { + "message": "Mejltext" + }, + "placeholder_mail_html_body": { + "message": "HTML-mejltext" + }, + "placeholder_mail_subject": { + "message": "Ämne för e-postmeddelande" + }, + "placeholder_folder_name": { + "message": "Mappnamn" + }, + "placeholder_folder_path": { + "message": "Mappsökväg" + }, + "placeholder_mail_headers": { + "message": "E-postrubriker" + }, + "placeholder_selected_text": { + "message": "Vald text" + }, + "placeholder_junk_score": { + "message": "Skräppoäng" + }, + "placeholder_recipients": { + "message": "Mottagare" + }, + "placeholder_cc_list": { + "message": "CC-lista" + }, + "placeholder_author": { + "message": "Författare" + }, + "placeholder_account_email_address": { + "message": "Kontots e-postadress" + }, + "prefs_OptionText_placeholders_use_default_value": { + "message": "Platshållare: använd standardvärde" + }, + "prefs_OptionText_placeholders_use_default_value_info": { + "message": "Om markerat kommer platshållarna att fyllas med standardvärdena när inget värde anges. Annars kommer platshållarna att behållas." + }, + "prefs_OptionText_max_prompt_length": { + "message": "Max promptlängd" + }, + "prefs_OptionText_max_prompt_length_Info": { + "message": "Detta är det maximala antalet tecken som kan användas i en prompt. Annars visas ett felmeddelande. Värdet kan inte redigeras för ChatGPT-webbgränssnittet. Ställ in det på 0 för att inaktivera kontrollen." + }, + "prefs_OptionText_chatgpt_web_model": { + "message": "ChatGPT webbmodell" + }, + "prefs_OptionText_chatgpt_web_model_info": { + "message": "Det här är modellen som kommer att tillämpas för ChatGPT:s webbgränssnitt. Om ingen modell anges eller om en felaktig modell anges, kommer standardmodellen att ställas in av ChatGPT på webbsidan. Den här inställningen fungerar inte med ett gratis ChatGPT-konto." + }, + "prefs_OptionText_chatgpt_web_tempchat": { + "message": "ChatGPT Web tillfällig chatt" + }, + "prefs_OptionText_chatgpt_web_tempchat_info": { + "message": "Om markerad kommer den tillfälliga chatten att användas i ChatGPT:s webbgränssnitt." } } From 07477b6d38b493f38ae6e15d54b0ab4cf90ff5d0 Mon Sep 17 00:00:00 2001 From: mic Date: Sat, 3 Jan 2026 23:36:47 +0100 Subject: [PATCH 14/16] using specific api configuration in special prompts --- js/mzta-special-commands.js | 54 +++++++++++++++++++++---------------- 1 file changed, 31 insertions(+), 23 deletions(-) diff --git a/js/mzta-special-commands.js b/js/mzta-special-commands.js index 79267b98..716b232e 100644 --- a/js/mzta-special-commands.js +++ b/js/mzta-special-commands.js @@ -28,7 +28,6 @@ prompt = ""; worker = null; llm = ""; - custom_model = ""; full_message = ""; logger = null; do_debug = false; @@ -38,16 +37,14 @@ let { prompt = '', llm = '', - custom_model = '', do_debug = false, config = {} } = args; this.prompt = prompt; this.llm = llm; - this.custom_model = custom_model; this.config = config; - this.logger = new taLogger('mzta_specialCommand', do_debug); this.do_debug = do_debug; + this.logger = new taLogger('mzta_specialCommand', do_debug); const worker_path_map = { chatgpt_api: './workers/model-worker-openai_responses.js', @@ -67,7 +64,17 @@ } async initWorker() { - const integration = this.llm.replace('_api', ''); + let integration = this.llm.replace('_api', ''); + let use_specific_api = false; + + this.logger.log("integration: " + integration); + + if (this.config.api_type && this.config.api_type !== '') { + integration = this.config.api_type.replace('_api', ''); + use_specific_api = true; + this.logger.log("use_specific_api: " + use_specific_api); + this.logger.log("specific integration: " + integration); + } const options_config = integration_options_config[integration]; if (!options_config) { @@ -75,13 +82,15 @@ throw new Error("Invalid integration type: " + integration); } - let prefsToGet = {}; - for (const key in options_config) { + const prefsToGet = {}; + const configKeys = Object.keys(options_config); + + for (const key of configKeys) { const prefKey = `${integration}_${key}`; prefsToGet[prefKey] = prefs_default[prefKey]; } - let prefs_api = await browser.storage.sync.get(prefsToGet); + const prefs_api = await browser.storage.sync.get(prefsToGet); let workerInitMessage = { type: 'init', @@ -89,24 +98,23 @@ i18nStrings: '' }; - for (const key in options_config) { + for (const key of configKeys) { const prefKey = `${integration}_${key}`; + let value = prefs_api[prefKey]; - const configValue = this.config[prefKey]; - - if (configValue !== undefined) { - if (typeof options_config[key] === 'boolean') { - prefs_api[prefKey] = (configValue === true || configValue === 'true' || configValue === 1); - } else { - prefs_api[prefKey] = configValue; - } - } - - if (key === 'model') { - workerInitMessage[prefKey] = this.custom_model !== '' ? this.custom_model : prefs_api[prefKey]; - } else { - workerInitMessage[prefKey] = prefs_api[prefKey]; + if(use_specific_api){ + const configValue = this.config[prefKey]; + + if (configValue !== undefined) { + if (typeof options_config[key] === 'boolean') { + value = (configValue === true || configValue === 'true' || configValue === 1); + } else { + value = configValue; + } + } } + + workerInitMessage[prefKey] = value; } this.worker.postMessage(workerInitMessage); From 57f1d637ffe131400c8719f217c3596906b44ed3 Mon Sep 17 00:00:00 2001 From: mic Date: Sat, 3 Jan 2026 23:43:57 +0100 Subject: [PATCH 15/16] added two commented debug lines --- mzta-background.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/mzta-background.js b/mzta-background.js index 915f12ab..5d6c9bc0 100644 --- a/mzta-background.js +++ b/mzta-background.js @@ -1041,7 +1041,7 @@ async function processEmails(messages, addTagsAuto, spamFilter) { ...getDynamicSettingsDefaults(['use_specific_integration', 'connection_type']), do_debug: prefs_default.do_debug, }); - + // console.log(">>>>>>>>>>>>>>>> getDynamicSettingsDefaults: " + JSON.stringify(getDynamicSettingsDefaults(['use_specific_integration', 'connection_type']))); for await (let message of messages) { let curr_fullMessage = null; let msg_text = null; @@ -1083,6 +1083,7 @@ async function processEmails(messages, addTagsAuto, spamFilter) { specialFullPrompt_add_tags = taPromptUtils.finalizePrompt_add_tags(specialFullPrompt_add_tags, prefs_aats.add_tags_maxnum, prefs_aats.add_tags_force_lang, prefs_aats.default_chatgpt_lang, prefs_aats.add_tags_auto_uselist, prefs_aats.add_tags_auto_uselist_list); taLog.log("Special prompt: " + specialFullPrompt_add_tags); // console.log(">>>>>>>>>> curr_prompt_add_tags.model: " + curr_prompt_add_tags.model); + // console.log(">>>>>>>>>>>>>>>>> getConnectionType add_tags:" + JSON.stringify(getConnectionType(prefs_aats, curr_prompt_add_tags, 'add_tags'))); let cmd_addTags = new mzta_specialCommand({ prompt: specialFullPrompt_add_tags, llm: getConnectionType(prefs_aats, curr_prompt_add_tags, 'add_tags'), From fd97d302ef99aa3e6daa31526356a1955c4f7f7d Mon Sep 17 00:00:00 2001 From: mic Date: Sat, 3 Jan 2026 23:50:19 +0100 Subject: [PATCH 16/16] improved the uniqueness of the tag IDs --- js/mzta-utils.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/js/mzta-utils.js b/js/mzta-utils.js index a99c70a9..b182ad99 100644 --- a/js/mzta-utils.js +++ b/js/mzta-utils.js @@ -408,10 +408,11 @@ export async function createTag(tag) { let prefs_tag = await browser.storage.sync.get({ add_tags_first_uppercase: prefs_default.add_tags_first_uppercase }); if(prefs_tag.add_tags_first_uppercase) tag = tag.toLowerCase().charAt(0).toUpperCase() + tag.toLowerCase().slice(1); try { + const tagKey = '$ta-' + generateCallID(16) + '-' + sanitizeString(tag); // Ensure uniqueness with a longer random ID if(await isThunderbird128OrGreater()) { - return browser.messages.tags.create('$ta-'+sanitizeString(tag), tag, generateHexColorForTag()); + return browser.messages.tags.create(tagKey, tag, generateHexColorForTag()); }else{ - return browser.messages.createTag('$ta-'+sanitizeString(tag), tag, generateHexColorForTag()); + return browser.messages.createTag(tagKey, tag, generateHexColorForTag()); } } catch (error) { console.error('[ThunderAI] Error creating tag:', error);