ChatGPT web models accelerators removed. see #692

This commit is contained in:
mic 2026-04-09 23:41:07 +02:00
parent a988a16bec
commit e6d6a095ac
9 changed files with 2 additions and 107 deletions

View file

@ -776,10 +776,6 @@
"message": "It appears that at least one of your accounts is using the Owl for Exchange add-on. There is a known issue between Thunderbird and Owl, which is currently being addressed. At this time, you can use ThunderAI while composing emails, but not when reading them.", "message": "It appears that at least one of your accounts is using the Owl for Exchange add-on. There is a known issue between Thunderbird and Owl, which is currently being addressed. At this time, you can use ThunderAI while composing emails, but not when reading them.",
"description": "" "description": ""
}, },
"prefs_OptionText_chatgpt_web_model_tooltip": {
"message": "Click on a value to set it.",
"description": ""
},
"prompt_reply_full_text": { "prompt_reply_full_text": {
"message": "Reply to the following email. Reply with only the needed text and with no extra comments or other text.", "message": "Reply to the following email. Reply with only the needed text and with no extra comments or other text.",
"description": "" "description": ""

View file

@ -18,7 +18,6 @@
import { prefs_default, getDynamicSettingValue } from '../options/mzta-options-default.js'; import { prefs_default, getDynamicSettingValue } from '../options/mzta-options-default.js';
const sparks_min = '1.2.0'; // Minimum version of ThunderAI-Sparks required for the add-on to work const sparks_min = '1.2.0'; // Minimum version of ThunderAI-Sparks required for the add-on to work
export const ChatGPTWeb_models = ['gpt-5','gpt-5-instant','gpt-5-t-mini','gpt-5-thinking']; // List of models available in ChatGPT Web
const MICZ_IT_LOCALIZED_LANGS = ['es', 'de', 'fr', 'it']; const MICZ_IT_LOCALIZED_LANGS = ['es', 'de', 'fr', 'it'];
export const getMenuContextCompose = () => 'compose_action_menu'; export const getMenuContextCompose = () => 'compose_action_menu';
@ -339,46 +338,6 @@ export function getGPTWebModelString(model) {
} }
} }
export function getChatGPTWebModelsList_HTML(values, targetRowId) {
const rowElement = document.getElementById(targetRowId);
if (!rowElement) return;
// Clears any existing td elements
rowElement.innerHTML = '';
// First TD: label
const labelTd = document.createElement('td');
const label = document.createElement('i');
label.className = 'small_info';
const labelNobr = document.createElement('nobr');
labelNobr.textContent = browser.i18n.getMessage("AllowedValues") + ":";
label.appendChild(labelNobr);
labelTd.appendChild(label);
// Second TD: values
const valuesTd = document.createElement('td');
const valuesContainer = document.createElement('i');
valuesContainer.className = 'small_info';
values.forEach(value => {
const nbspBefore = document.createTextNode(' \u00A0 '); // "   "
const valueNobr = document.createElement('nobr');
valueNobr.className = 'conntype_chatgpt_web_option';
valueNobr.textContent = value;
const nbspAfter = document.createTextNode(' \u00A0 ');
valuesContainer.appendChild(nbspBefore);
valuesContainer.appendChild(valueNobr);
valuesContainer.appendChild(nbspAfter);
});
valuesTd.appendChild(valuesContainer);
// Adds the td elements to the row
rowElement.appendChild(labelTd);
rowElement.appendChild(valuesTd);
}
export function openTab(url){ export function openTab(url){
// check if the tab is already there // check if the tab is already there
browser.tabs.query({url: browser.runtime.getURL(url)}).then((tabs) => { browser.tabs.query({url: browser.runtime.getURL(url)}).then((tabs) => {

View file

@ -39,10 +39,6 @@ table#miczPrefs td.nt{
border-top: none; border-top: none;
} }
tr#chatgpt_web_models_list td{
border: none;
}
div#miczRelNotes{ div#miczRelNotes{
position:absolute; position:absolute;
right: 0px; right: 0px;

View file

@ -24,10 +24,8 @@ import {
} from './mzta-options-default.js'; } from './mzta-options-default.js';
import { taLogger } from '../js/mzta-logger.js'; import { taLogger } from '../js/mzta-logger.js';
import { import {
ChatGPTWeb_models,
checkSparksPresence, checkSparksPresence,
openTab, openTab,
getChatGPTWebModelsList_HTML,
isAPIKeyValue, isAPIKeyValue,
getConnectionType, getConnectionType,
setTomSelectBorder, setTomSelectBorder,
@ -436,7 +434,6 @@ document.addEventListener('DOMContentLoaded', async () => {
openTab('/pages/get-task/mzta-get-task.html'); openTab('/pages/get-task/mzta-get-task.html');
}); });
getChatGPTWebModelsList_HTML(ChatGPTWeb_models, 'chatgpt_web_models_list');
document.querySelectorAll(".conntype_chatgpt_web_option").forEach(element => { document.querySelectorAll(".conntype_chatgpt_web_option").forEach(element => {
element.addEventListener("click", () => { element.addEventListener("click", () => {
let el = document.getElementById("chatgpt_web_model"); let el = document.getElementById("chatgpt_web_model");

View file

@ -104,7 +104,6 @@ export async function injectConnectionUI({
<tr class="conntype_chatgpt_web${tr_class ? ` ${tr_class}` : ''}"> <tr class="conntype_chatgpt_web${tr_class ? ` ${tr_class}` : ''}">
<td><label> <td><label>
<span class="opt_title">__MSG_prefs_OptionText_chatgpt_web_model__</span> <span class="opt_title">__MSG_prefs_OptionText_chatgpt_web_model__</span>
<br><table title="__MSG_prefs_OptionText_chatgpt_web_model_tooltip__"><tr id="chatgpt_web_models_list"></tr></table>
</label></td> </label></td>
<td> <td>
<label> <label>

View file

@ -238,19 +238,6 @@ label, .id_show, .text_show, .name_show, .type_show, .action_show{
display:none; display:none;
} }
.chatgpt_web_models_list_table{
background-color: rgb(255, 209, 183);
border:0;
}
.chatgpt_web_models_list_table *{
border:0;
}
.chatgpt_web_models_list_table td{
padding:2px;
}
#chatgpt_web_additional_info_toggle, .chatgpt_web_additional_info_toggle{ #chatgpt_web_additional_info_toggle, .chatgpt_web_additional_info_toggle{
cursor: pointer; cursor: pointer;
} }
@ -353,7 +340,7 @@ label:has(input[type="checkbox"]) {
background-color: #4c4e58; background-color: #4c4e58;
} }
#chatgpt_web_additional_info, #chatgpt_web_additional_info_toggle, .chatgpt_web_additional_info, .chatgpt_web_additional_info_toggle, .chatgpt_web_additional_info_show, .chatgpt_web_models_list_table{ #chatgpt_web_additional_info, #chatgpt_web_additional_info_toggle, .chatgpt_web_additional_info, .chatgpt_web_additional_info_toggle, .chatgpt_web_additional_info_show{
background-color: rgb(39, 11, 0); background-color: rgb(39, 11, 0);
color: rgb(182, 182, 182); color: rgb(182, 182, 182);
} }

View file

@ -233,19 +233,6 @@ label, .id_show, .text_show, .name_show, .type_show, .action_show{
display:none; display:none;
} }
.chatgpt_web_models_list_table{
background-color: rgb(255, 209, 183);
border:0;
}
.chatgpt_web_models_list_table *{
border:0;
}
.chatgpt_web_models_list_table td{
padding:2px;
}
#chatgpt_web_additional_info_toggle, .chatgpt_web_additional_info_toggle{ #chatgpt_web_additional_info_toggle, .chatgpt_web_additional_info_toggle{
cursor: pointer; cursor: pointer;
} }
@ -388,7 +375,7 @@ dialog.export{
background-color: #4c4e58; background-color: #4c4e58;
} }
#chatgpt_web_additional_info, #chatgpt_web_additional_info_toggle, .chatgpt_web_additional_info, .chatgpt_web_additional_info_toggle, .chatgpt_web_additional_info_show, .chatgpt_web_models_list_table{ #chatgpt_web_additional_info, #chatgpt_web_additional_info_toggle, .chatgpt_web_additional_info, .chatgpt_web_additional_info_toggle, .chatgpt_web_additional_info_show{
background-color: rgb(39, 11, 0); background-color: rgb(39, 11, 0);
} }

View file

@ -86,7 +86,6 @@
<label for="chatGPTWebModelNew" class="field_title">__MSG_prefs_OptionText_chatgpt_web_model__:</label> <label for="chatGPTWebModelNew" class="field_title">__MSG_prefs_OptionText_chatgpt_web_model__:</label>
<br> <br>
<input type="text" id="chatGPTWebModelNew" name="chatGPTWebModelNew" class="input_new input_additional" tabindex="10"> <input type="text" id="chatGPTWebModelNew" name="chatGPTWebModelNew" class="input_new input_additional" tabindex="10">
<table class="chatgpt_web_models_list_table" title="__MSG_prefs_OptionText_chatgpt_web_model_tooltip__"><tr id="chatgpt_web_models_list"></tr></table>
<br><br> <br><br>
<label for="chatGPTWebProjectNew" class="field_title">__MSG_prefs_OptionText_chatgpt_web_project__:</label> <label for="chatGPTWebProjectNew" class="field_title">__MSG_prefs_OptionText_chatgpt_web_project__:</label>
<br> <br>

View file

@ -33,11 +33,9 @@ import {
updateWarnings updateWarnings
} from "../../pages/_lib/connection-ui.js"; } from "../../pages/_lib/connection-ui.js";
import { import {
ChatGPTWeb_models,
getLocalStorageUsedSpace, getLocalStorageUsedSpace,
sanitizeHtml, sanitizeHtml,
validateCustomData_ChatGPTWeb, validateCustomData_ChatGPTWeb,
getChatGPTWebModelsList_HTML,
openTab, openTab,
setTomSelectBorder setTomSelectBorder
} from "../../js/mzta-utils.js"; } from "../../js/mzta-utils.js";
@ -513,28 +511,6 @@ document.addEventListener('DOMContentLoaded', async () => {
toggleApiPropertiesShow(element.closest('tr')); toggleApiPropertiesShow(element.closest('tr'));
}); });
getChatGPTWebModelsList_HTML(ChatGPTWeb_models, 'chatgpt_web_models_list');
let formNewWebModelList = document.getElementById('chatgpt_web_models_list');
formNewWebModelList.querySelectorAll('.conntype_chatgpt_web_option').forEach(element => {
element.addEventListener("click", () => {
let el = document.getElementById("chatGPTWebModelNew");
el.value = element.textContent;
el.dispatchEvent(new Event('change'), { bubbles: true });
});
});
document.querySelectorAll('.id_output').forEach(element => {
getChatGPTWebModelsList_HTML(ChatGPTWeb_models, 'chatgpt_web_models_list_' + element.value);
let formWebModelList = document.getElementById('chatgpt_web_models_list_' + element.value);
formWebModelList.querySelectorAll('.conntype_chatgpt_web_option').forEach(element2 => {
element2.addEventListener("click", () => {
let el = document.getElementById("chatgpt_web_model_output_" + element.value);
el.value = element2.textContent;
el.dispatchEvent(new Event('change'), { bubbles: true });
});
});
});
}, { once: true }); }, { once: true });
document.getElementById('btnManageCustomDataPH').addEventListener('click', () => { document.getElementById('btnManageCustomDataPH').addEventListener('click', () => {
@ -1086,7 +1062,6 @@ function loadPromptsList(values){
<span class="field_title_us">__MSG_prefs_OptionText_chatgpt_web_model__:</span> <span class="field_title_us">__MSG_prefs_OptionText_chatgpt_web_model__:</span>
<br> <br>
<input type="text" id="chatgpt_web_model_output_` + values.id + `" class="input_additional chatgpt_web_model_output" tabindex="10" value="` + values.chatgpt_web_model + `"> <input type="text" id="chatgpt_web_model_output_` + values.id + `" class="input_additional chatgpt_web_model_output" tabindex="10" value="` + values.chatgpt_web_model + `">
<table class="chatgpt_web_models_list_table" title="__MSG_prefs_OptionText_chatgpt_web_model_tooltip__"><tr id="chatgpt_web_models_list_` + values.id + `"></tr></table>
<br><br> <br><br>
<span class="field_title_us">__MSG_prefs_OptionText_chatgpt_web_project__:</span> <span class="field_title_us">__MSG_prefs_OptionText_chatgpt_web_project__:</span>
<br> <br>