Added a loading indicator in the menu when sending a prompt.
+
Added a new default prompt that uses the placeholders and allows replying to an email thread. It requires selecting the text of the first email to identify which is the one to reply to and the others in the thread [#150].
+
Version 2.2.2 - 15/10/2024
APIs error handling improved.
diff --git a/README.md b/README.md
index d587d6e5..8b12705f 100644
--- a/README.md
+++ b/README.md
@@ -74,7 +74,7 @@ Are you using this addon in your Thunderbird?
### Miscellaneous
-- chatgpt.js for providing methods to interact with the ChatGTP web frontend
+- chatgpt.js for providing methods to interact with the ChatGPT web frontend
- Aify for inspiration
- Julian Harris for his project chatgpt-frontend-nobuild, that has been used as a starting point for the API Web Interface
diff --git a/_locales/de/messages.json b/_locales/de/messages.json
index e9f8aecc..80043635 100644
--- a/_locales/de/messages.json
+++ b/_locales/de/messages.json
@@ -12,7 +12,11 @@
"description": ""
},
"prompt_reply": {
- "message": "Darauf antworten",
+ "message": "Antworten Sie auf diese E-Mail",
+ "description": ""
+ },
+ "prompt_reply_advanced": {
+ "message": "Antworten Sie auf diesen Thread",
"description": ""
},
"prompt_rewrite_polite": {
@@ -236,7 +240,7 @@
"description": ""
},
"chatgpt_win_model_warning": {
- "message": "Sie haben die Option zur Verwendung von ChatGPT-4 eingestellt, aber es scheint, dass es nicht korrekt geladen wird. Haben Sie oben das Modell 4 oder 4o gewählt?",
+ "message": "Du hast die Option gewählt, ein bestimmtes Modell zu verwenden, aber es scheint, dass es nicht korrekt geladen wird. Bitte überprüfe den Wert und versuche es erneut. Du kannst jetzt den blauen Knopf drücken, um fortzufahren.",
"description": ""
},
"chatgpt_win_custom_text": {
@@ -260,7 +264,7 @@
"description": ""
},
"msg_prompt_too_long": {
- "message": "Der eingegebene Text ist zu lang. Sie müssen ihn verkürzen, um ChatGPT zu verwenden.",
+ "message": "Der von Ihnen bereitgestellte Text ist zu lang. Sie müssen ihn kürzen.",
"description": ""
},
"prefs_OptionText_release_notes": {
@@ -395,12 +399,12 @@
"message": "Verbindungstyp",
"description": ""
},
- "prefs_Connection_type_ChatGTP_Web": {
- "message": "ChatGTP Weboberfläche",
+ "prefs_Connection_type_ChatGPT_Web": {
+ "message": "ChatGPT Weboberfläche",
"description": ""
},
- "prefs_Connection_type_ChatGTP_API": {
- "message": "ChatGTP OpenAI API",
+ "prefs_Connection_type_ChatGPT_API": {
+ "message": "ChatGPT OpenAI API",
"description": ""
},
"prefs_ChatGPT_API_Key": {
@@ -435,7 +439,7 @@
"message": "Sie haben kein Modell für das ChatGPT-API ausgewählt. Bitte wählen Sie eines auf der Optionsseite aus.",
"description": ""
},
- "chagtp_api_send_button": {
+ "chagpt_api_send_button": {
"message": "Modell wird verwendet",
"description": ""
},
@@ -579,6 +583,10 @@
"message": "Auf 0 setzen, wenn Sie die Fenstergröße nicht angeben möchten.",
"description": ""
},
+ "prefs_OpenAIComp_API_Key": {
+ "message": "OpenAI Comp API-Schlüssel",
+ "description": ""
+ },
"Optional": {
"message": "Optional",
"description": ""
@@ -591,6 +599,88 @@
"message": "Bei Anmeldeproblemen im ThunderAI-Fenster öffnen Sie ChatGPT in einem neuen Tab über die Schaltfläche rechts, melden Sie sich an, schließen Sie dann den Tab und fahren Sie fort, ThunderAI zu verwenden.",
"description": ""
},
+ "placeholder_mail_text_body": {
+ "message": "E-Mail-Inhalt",
+ "description": ""
+ },
+ "placeholder_mail_html_body": {
+ "message": "HTML-E-Mail-Inhalt",
+ "description": ""
+ },
+ "placeholder_mail_subject": {
+ "message": "E-Mail-Betreff",
+ "description": ""
+ },
+ "placeholder_selected_text": {
+ "message": "Ausgewählter Text",
+ "description": ""
+ },
+ "placeholder_additional_text": {
+ "message": "Zusätzlicher Text",
+ "description": ""
+ },
+ "placeholder_junk_score": {
+ "message": "Spam-Score",
+ "description": ""
+ },
+ "placeholder_recipients": {
+ "message": "Empfänger",
+ "description": ""
+ },
+ "placeholder_cc_list": {
+ "message": "CC-Liste",
+ "description": ""
+ },
+ "placeholder_author": {
+ "message": "Autor",
+ "description": ""
+ },
+ "prefs_OptionText_placeholders_use_default_value": {
+ "message": "Platzhalter: standardwert verwenden",
+ "description": ""
+ },
+ "prefs_OptionText_placeholders_use_default_value_info": {
+ "message": "Wenn aktiviert, werden die Platzhalter mit den Standardwerten ausgefüllt, wenn kein Wert angegeben wird. Andernfalls bleiben die Platzhalter erhalten.",
+ "description": ""
+ },
+ "prefs_OptionText_max_prompt_length": {
+ "message": "Maximale Eingabelänge",
+ "description": ""
+ },
+ "prefs_OptionText_max_prompt_length_Info": {
+ "message": "Dies ist die maximale Anzahl von Zeichen, die in einer Eingabe verwendet werden können. Andernfalls wird eine Fehlermeldung angezeigt. Der Wert ist für die ChatGPT-Webschnittstelle nicht bearbeitbar.",
+ "description": ""
+ },
+ "prefs_OptionText_chatgpt_web_model": {
+ "message": "ChatGPT Web-Modell",
+ "description": ""
+ },
+ "prefs_OptionText_chatgpt_web_model_info": {
+ "message": "Dies ist das Modell, das für die ChatGPT-Webschnittstelle festgelegt wird. Wenn keines angegeben ist oder ein falsches Modell bereitgestellt wird, wird das Standardmodell von ChatGPT auf der Webseite festgelegt.",
+ "description": ""
+ },
+ "prefs_OptionText_chatgpt_web_tempchat": {
+ "message": "ChatGPT Web temporärer Chat",
+ "description": ""
+ },
+ "prefs_OptionText_chatgpt_web_tempchat_info": {
+ "message": "Wenn aktiviert, wird der temporäre Chat in der ChatGPT-Webschnittstelle verwendet.",
+ "description": ""
+ },
+ "chatgpt_btn_model": {
+ "message": "Aktuelles Modell verwenden",
+ "description": ""
+ },
+ "SendingPrompt": {
+ "message": "Sende Eingabe...",
+ "description": ""
+ },
+ "AllowedValues": {
+ "message": "Erlaubte Werte",
+ "description": ""
+ },
+ "prefs_OptionText_btnManagePrompts_infoline": {
+ "message": "Sie können jetzt zusätzliche Datenplatzhalter verwenden!",
"prefs_OptionText_openai_comp_use_v1": {
"message": "\"v1\"-Kompatibilität beibehalten",
"description": ""
diff --git a/_locales/en/messages.json b/_locales/en/messages.json
index b05edca8..1827b126 100644
--- a/_locales/en/messages.json
+++ b/_locales/en/messages.json
@@ -12,7 +12,11 @@
"description": ""
},
"prompt_reply": {
- "message": "Reply to this",
+ "message": "Reply to this email",
+ "description": ""
+ },
+ "prompt_reply_advanced": {
+ "message": "Reply to this thread",
"description": ""
},
"prompt_rewrite_polite": {
@@ -236,7 +240,7 @@
"description": ""
},
"chatgpt_win_model_warning": {
- "message": "You have set the option to use ChatGPT-4, but it seems that it is not loading correctly. Have you chosen the model 4 or 4o at the top?",
+ "message": "You have set the option to use a specific model, but it seems that it is not loading correctly. Please check the value and try again. For now, you can press the blue button to continue.",
"description": ""
},
"chatgpt_win_custom_text": {
@@ -260,7 +264,7 @@
"description": ""
},
"msg_prompt_too_long": {
- "message": "The text you provided is too long. You need to reduce it to use ChatGPT.",
+ "message": "The text you provided is too long. You need to reduce it.",
"description": ""
},
"prefs_OptionText_release_notes": {
@@ -388,19 +392,19 @@
"description": ""
},
"customprompts_form_label_define_response_lang": {
- "message": "Define the reponse languange in the prompt",
+ "message": "Define the reponse language in the prompt",
"description": ""
},
"prefs_Connection_type": {
"message": "Connection Type",
"description": ""
},
- "prefs_Connection_type_ChatGTP_Web": {
- "message": "ChatGTP Web Interface",
+ "prefs_Connection_type_ChatGPT_Web": {
+ "message": "ChatGPT Web Interface",
"description": ""
},
- "prefs_Connection_type_ChatGTP_API": {
- "message": "ChatGTP OpenAI API",
+ "prefs_Connection_type_ChatGPT_API": {
+ "message": "ChatGPT OpenAI API",
"description": ""
},
"prefs_ChatGPT_API_Key": {
@@ -435,7 +439,7 @@
"message": "You've not choosen a model for the ChatGPT API. Please choose one in the options page.",
"description": ""
},
- "chagtp_api_send_button": {
+ "chagpt_api_send_button": {
"message": "Using model",
"description": ""
},
@@ -595,6 +599,88 @@
"message": "In case of login issues in the ThunderAI window, open ChatGPT in a new tab using the button on the right, log in, then close the tab and continue using ThunderAI.",
"description": ""
},
+ "placeholder_mail_text_body": {
+ "message": "Mail body",
+ "description": ""
+ },
+ "placeholder_mail_html_body": {
+ "message": "HTML mail body",
+ "description": ""
+ },
+ "placeholder_mail_subject": {
+ "message": "Mail subject",
+ "description": ""
+ },
+ "placeholder_selected_text": {
+ "message": "Selected text",
+ "description": ""
+ },
+ "placeholder_additional_text": {
+ "message": "Additional text",
+ "description": ""
+ },
+ "placeholder_junk_score": {
+ "message": "Junk score",
+ "description": ""
+ },
+ "placeholder_recipients": {
+ "message": "Recipients",
+ "description": ""
+ },
+ "placeholder_cc_list": {
+ "message": "CC list",
+ "description": ""
+ },
+ "placeholder_author": {
+ "message": "Author",
+ "description": ""
+ },
+ "prefs_OptionText_placeholders_use_default_value": {
+ "message": "Placeholders: use default value",
+ "description": ""
+ },
+ "prefs_OptionText_placeholders_use_default_value_info": {
+ "message": "If checked, the placeholders will be filled with the default values when no value is provided. Otherwise, the placeholders will be kept in place.",
+ "description": ""
+ },
+ "prefs_OptionText_max_prompt_length" : {
+ "message": "Max prompt length",
+ "description": ""
+ },
+ "prefs_OptionText_max_prompt_length_Info" : {
+ "message": "This is the maximum number of characters that can be used in a prompt. Otherwise, an error message will be displayed. The value is not editable for the ChatGPT Web Interface.",
+ "description": ""
+ },
+ "prefs_OptionText_chatgpt_web_model": {
+ "message": "ChatGPT Web model",
+ "description": ""
+ },
+ "prefs_OptionText_chatgpt_web_model_info": {
+ "message": "This is the model that will be enforced for the ChatGPT Web Interface. If none is specified or an incorrect one is provided, the default model will be set by ChatGPT on the webpage.",
+ "description": ""
+ },
+ "prefs_OptionText_chatgpt_web_tempchat": {
+ "message": "ChatGPT Web temporary chat",
+ "description": ""
+ },
+ "prefs_OptionText_chatgpt_web_tempchat_info": {
+ "message": "If checked, the temporary chat will be used in the ChatGPT Web Interface.",
+ "description": ""
+ },
+ "chatgpt_btn_model": {
+ "message": "Use the current model",
+ "description": ""
+ },
+ "SendingPrompt": {
+ "message": "Sending prompt...",
+ "description": ""
+ },
+ "AllowedValues": {
+ "message": "Allowed values",
+ "description": ""
+ },
+ "prefs_OptionText_btnManagePrompts_infoline": {
+ "message": "You can now use additional data placeholders!",
"prefs_OptionText_openai_comp_use_v1" : {
"message": "Keep the \"v1\" compatibility",
"description": ""
diff --git a/_locales/fr/messages.json b/_locales/fr/messages.json
index f8e369a6..23f27344 100644
--- a/_locales/fr/messages.json
+++ b/_locales/fr/messages.json
@@ -12,7 +12,11 @@
"description": ""
},
"prompt_reply": {
- "message": "Répondre à ceci",
+ "message": "Répondez à cet e-mail",
+ "description": ""
+ },
+ "prompt_reply_advanced": {
+ "message": "Répondez à ce fil de discussion",
"description": ""
},
"prompt_rewrite_polite": {
@@ -236,7 +240,7 @@
"description": ""
},
"chatgpt_win_model_warning": {
- "message": "Vous avez choisi l'option d'utiliser ChatGPT-4, mais il semble qu'il ne se charge pas correctement. Avez-vous choisi le modèle 4 ou 4o en haut ?",
+ "message": "Vous avez choisi d'utiliser un modèle spécifique, mais il semble qu'il ne se charge pas correctement. Veuillez vérifier la valeur et réessayer. Pour l'instant, vous pouvez appuyer sur le bouton bleu pour continuer.",
"description": ""
},
"chatgpt_win_custom_text": {
@@ -260,7 +264,7 @@
"description": ""
},
"msg_prompt_too_long": {
- "message": "Le texte que vous avez fourni est trop long. Vous devez le réduire pour utiliser ChatGPT.",
+ "message": "Le texte que vous avez fourni est trop long. Vous devez le raccourcir.",
"description": ""
},
"prefs_OptionText_release_notes": {
@@ -395,12 +399,12 @@
"message": "Type de connexion",
"description": ""
},
- "prefs_Connection_type_ChatGTP_Web": {
- "message": "Interface Web ChatGTP",
+ "prefs_Connection_type_ChatGPT_Web": {
+ "message": "Interface Web ChatGPT",
"description": ""
},
- "prefs_Connection_type_ChatGTP_API": {
- "message": "API OpenAI ChatGTP",
+ "prefs_Connection_type_ChatGPT_API": {
+ "message": "API OpenAI ChatGPT",
"description": ""
},
"prefs_ChatGPT_API_Key": {
@@ -435,7 +439,7 @@
"message": "Vous n'avez pas choisi de modèle pour l'API ChatGPT. Veuillez en choisir un sur la page des options.",
"description": ""
},
- "chagtp_api_send_button": {
+ "chagpt_api_send_button": {
"message": "Utilisation du modèle",
"description": ""
},
@@ -579,6 +583,10 @@
"message": "Réglez sur 0 si vous ne souhaitez pas spécifier la taille de la fenêtre.",
"description": ""
},
+ "prefs_OpenAIComp_API_Key": {
+ "message": "Clé API OpenAI Comp",
+ "description": ""
+ },
"Optional": {
"message": "Optionnel",
"description": ""
@@ -591,6 +599,88 @@
"message": "En cas de problèmes de connexion dans la fenêtre ThunderAI, ouvrez ChatGPT dans un nouvel onglet à l'aide du bouton à droite, connectez-vous, puis fermez l'onglet et continuez à utiliser ThunderAI.",
"description": ""
},
+ "placeholder_mail_text_body": {
+ "message": "Corps du mail",
+ "description": ""
+ },
+ "placeholder_mail_html_body": {
+ "message": "Corps du mail HTML",
+ "description": ""
+ },
+ "placeholder_mail_subject": {
+ "message": "Objet du mail",
+ "description": ""
+ },
+ "placeholder_selected_text": {
+ "message": "Texte sélectionné",
+ "description": ""
+ },
+ "placeholder_additional_text": {
+ "message": "Texte supplémentaire",
+ "description": ""
+ },
+ "placeholder_junk_score": {
+ "message": "Score de spam",
+ "description": ""
+ },
+ "placeholder_recipients": {
+ "message": "Destinataires",
+ "description": ""
+ },
+ "placeholder_cc_list": {
+ "message": "Liste CC",
+ "description": ""
+ },
+ "placeholder_author": {
+ "message": "Auteur",
+ "description": ""
+ },
+ "prefs_OptionText_placeholders_use_default_value": {
+ "message": "Espaces réservés : utiliser la valeur par défaut",
+ "description": ""
+ },
+ "prefs_OptionText_placeholders_use_default_value_info": {
+ "message": "Si coché, les espaces réservés seront remplis avec les valeurs par défaut si aucune valeur n'est fournie. Sinon, les espaces réservés resteront en place.",
+ "description": ""
+ },
+ "prefs_OptionText_max_prompt_length": {
+ "message": "Longueur maximale de l'invite",
+ "description": ""
+ },
+ "prefs_OptionText_max_prompt_length_Info": {
+ "message": "C'est le nombre maximum de caractères qui peuvent être utilisés dans une invite. Sinon, un message d'erreur sera affiché. La valeur n'est pas modifiable pour l'interface Web de ChatGPT.",
+ "description": ""
+ },
+ "prefs_OptionText_chatgpt_web_model": {
+ "message": "Modèle Web ChatGPT",
+ "description": ""
+ },
+ "prefs_OptionText_chatgpt_web_model_info": {
+ "message": "C'est le modèle qui sera appliqué pour l'interface Web de ChatGPT. Si aucun n'est spécifié ou si un modèle incorrect est fourni, le modèle par défaut sera défini par ChatGPT sur la page Web.",
+ "description": ""
+ },
+ "prefs_OptionText_chatgpt_web_tempchat": {
+ "message": "Chat temporaire Web ChatGPT",
+ "description": ""
+ },
+ "prefs_OptionText_chatgpt_web_tempchat_info": {
+ "message": "Si coché, le chat temporaire sera utilisé dans l'interface Web de ChatGPT.",
+ "description": ""
+ },
+ "chatgpt_btn_model": {
+ "message": "Utiliser le modèle actuel",
+ "description": ""
+ },
+ "SendingPrompt": {
+ "message": "Envoi de l'invite...",
+ "description": ""
+ },
+ "AllowedValues": {
+ "message": "Valeurs autorisées",
+ "description": ""
+ },
+ "prefs_OptionText_btnManagePrompts_infoline": {
+ "message": "Vous pouvez maintenant utiliser des espaces réservés de données supplémentaires !",
"prefs_OptionText_openai_comp_use_v1": {
"message": "Conserver la compatibilité \"v1\"",
"description": ""
diff --git a/_locales/it/messages.json b/_locales/it/messages.json
index 786a83f0..5f3f48c9 100644
--- a/_locales/it/messages.json
+++ b/_locales/it/messages.json
@@ -12,7 +12,11 @@
"description": ""
},
"prompt_reply": {
- "message": "Rispondi",
+ "message": "Rispondi a questa email",
+ "description": ""
+ },
+ "prompt_reply_advanced": {
+ "message": "Rispondi a questo thread",
"description": ""
},
"prompt_rewrite_polite": {
@@ -236,7 +240,7 @@
"description": ""
},
"chatgpt_win_model_warning": {
- "message": "Hai impostato l'opzione per utilizzare ChatGPT-4, ma sembra che non si stia caricando. Hai selezionato il modello 4 o 4o in alto?",
+ "message": "Hai impostato l'opzione per utilizzare un modello specifico, ma sembra che non si stia caricando correttamente. Controlla il valore e riprova. Per ora, puoi premere il pulsante blu per continuare.",
"description": ""
},
"chatgpt_win_custom_text": {
@@ -260,7 +264,7 @@
"description": ""
},
"msg_prompt_too_long": {
- "message": "Il testo che vuoi inviare a ChatGPT è troppo lungo. Devi ridurlo per poter procedere.",
+ "message": "Il testo che vuoi inviare è troppo lungo. Devi ridurlo per poter procedere.",
"description": ""
},
"prefs_OptionText_release_notes": {
@@ -395,12 +399,12 @@
"message": "Tipo di connessione",
"description": ""
},
- "prefs_Connection_type_ChatGTP_Web": {
- "message": "Interfaccia Web ChatGTP",
+ "prefs_Connection_type_ChatGPT_Web": {
+ "message": "Interfaccia Web ChatGPT",
"description": ""
},
- "prefs_Connection_type_ChatGTP_API": {
- "message": "API OpenAI per ChatGTP",
+ "prefs_Connection_type_ChatGPT_API": {
+ "message": "API OpenAI per ChatGPT",
"description": ""
},
"prefs_ChatGPT_API_Key": {
@@ -435,7 +439,7 @@
"message": "Non hai scelto un modello per l'API di ChatGPT. Per favore, scegline uno nella pagina delle opzioni.",
"description": ""
},
- "chagtp_api_send_button": {
+ "chagpt_api_send_button": {
"message": "Modello utilizzato",
"description": ""
},
@@ -579,6 +583,10 @@
"message": "Imposta a 0 se non desideri specificare la dimensione della finestra.",
"description": ""
},
+ "prefs_OpenAIComp_API_Key": {
+ "message": "Chiave API OpenAI Comp",
+ "description": ""
+ },
"Optional": {
"message": "Opzionale",
"description": ""
@@ -591,6 +599,88 @@
"message": "In caso di problemi di accesso nella finestra di ThunderAI, apri ChatGPT in un nuovo tab utilizzando il pulsante a destra, accedi, quindi chiudi la scheda e continua a usare ThunderAI.",
"description": ""
},
+ "placeholder_mail_text_body": {
+ "message": "Corpo del messaggio",
+ "description": ""
+ },
+ "placeholder_mail_html_body": {
+ "message": "Corpo del messaggio in HTML",
+ "description": ""
+ },
+ "placeholder_mail_subject": {
+ "message": "Oggetto del messaggio",
+ "description": ""
+ },
+ "placeholder_selected_text": {
+ "message": "Testo selezionato",
+ "description": ""
+ },
+ "placeholder_additional_text": {
+ "message": "Testo aggiuntivo",
+ "description": ""
+ },
+ "placeholder_junk_score": {
+ "message": "Punteggio di spam",
+ "description": ""
+ },
+ "placeholder_recipients": {
+ "message": "Destinatari",
+ "description": ""
+ },
+ "placeholder_cc_list": {
+ "message": "Lista CC",
+ "description": ""
+ },
+ "placeholder_author": {
+ "message": "Autore",
+ "description": ""
+ },
+ "prefs_OptionText_placeholders_use_default_value": {
+ "message": "Segnaposti: usa valore predefinito",
+ "description": ""
+ },
+ "prefs_OptionText_placeholders_use_default_value_info": {
+ "message": "Se selezionato, i segnaposti saranno riempiti con i valori predefiniti quando non viene fornito alcun valore. Altrimenti, i segnaposti rimarranno visibili nel testo.",
+ "description": ""
+ },
+ "prefs_OptionText_max_prompt_length": {
+ "message": "Lunghezza massima del prompt",
+ "description": ""
+ },
+ "prefs_OptionText_max_prompt_length_Info": {
+ "message": "Questa è la lunghezza massima di caratteri che può essere utilizzata in un prompt. Altrimenti, verrà visualizzato un messaggio di errore. Il valore non è modificabile per l'interfaccia Web di ChatGPT.",
+ "description": ""
+ },
+ "prefs_OptionText_chatgpt_web_model": {
+ "message": "Modello Web ChatGPT",
+ "description": ""
+ },
+ "prefs_OptionText_chatgpt_web_model_info": {
+ "message": "Questo è il modello che verrà utilizzato nell'interfaccia Web di ChatGPT. Se non viene specificato o ne viene fornito uno errato, ChatGPT imposterà il modello predefinito sulla pagina Web.",
+ "description": ""
+ },
+ "prefs_OptionText_chatgpt_web_tempchat": {
+ "message": "Chat temporanea di ChatGPT",
+ "description": ""
+ },
+ "prefs_OptionText_chatgpt_web_tempchat_info": {
+ "message": "Se selezionato, la chat temporanea verrà utilizzata nell'interfaccia Web di ChatGPT.",
+ "description": ""
+ },
+ "chatgpt_btn_model": {
+ "message": "Usa il modello corrente",
+ "description": ""
+ },
+ "SendingPrompt": {
+ "message": "Invio del prompt...",
+ "description": ""
+ },
+ "AllowedValues": {
+ "message": "Valori consentiti",
+ "description": ""
+ },
+ "prefs_OptionText_btnManagePrompts_infoline": {
+ "message": "Ora puoi utilizzare segnaposti per i dati aggiuntivi!",
"prefs_OptionText_openai_comp_use_v1": {
"message": "Mantieni la compatibilità con \"v1\"",
"description": ""
diff --git a/_locales/pt-br/messages.json b/_locales/pt-br/messages.json
index 848f2ece..b9d7e210 100644
--- a/_locales/pt-br/messages.json
+++ b/_locales/pt-br/messages.json
@@ -12,7 +12,11 @@
"description": ""
},
"prompt_reply": {
- "message": "Responda a isso",
+ "message": "Responda a este e-mail",
+ "description": ""
+ },
+ "prompt_reply_advanced": {
+ "message": "Responda a este tópico",
"description": ""
},
"prompt_rewrite_polite": {
@@ -236,7 +240,7 @@
"description": ""
},
"chatgpt_win_model_warning": {
- "message": "Você definiu a opção para usar o ChatGPT-4, mas parece que não está carregando corretamente. Você escolheu o modelo 4 ou 4o na parte superior?",
+ "message": "Você configurou a opção para usar um modelo específico, mas parece que ele não está carregando corretamente. Por favor, verifique o valor e tente novamente. Por enquanto, você pode pressionar o botão azul para continuar.",
"description": ""
},
"chatgpt_win_custom_text": {
@@ -260,7 +264,7 @@
"description": ""
},
"msg_prompt_too_long": {
- "message": "O texto que você forneceu é muito longo. Você precisa reduzi-lo para usar o ChatGPT.",
+ "message": "O texto que você forneceu é muito longo. Você precisa reduzi-lo.",
"description": ""
},
"prefs_OptionText_release_notes": {
@@ -395,11 +399,11 @@
"message": "Tipo de Conexão",
"description": ""
},
- "prefs_Connection_type_ChatGTP_Web": {
+ "prefs_Connection_type_ChatGPT_Web": {
"message": "Interface Web do ChatGPT",
"description": ""
},
- "prefs_Connection_type_ChatGTP_API": {
+ "prefs_Connection_type_ChatGPT_API": {
"message": "API OpenAI do ChatGPT",
"description": ""
},
@@ -435,7 +439,7 @@
"message": "Você não escolheu um modelo para a API do ChatGPT. Por favor, escolha um na página de opções.",
"description": ""
},
- "chagtp_api_send_button": {
+ "chagpt_api_send_button": {
"message": "Usando modelo",
"description": ""
},
@@ -595,6 +599,88 @@
"message": "Em caso de problemas de login na janela do ThunderAI, abra o ChatGPT em uma nova aba usando o botão à direita, faça o login, depois feche a aba e continue usando o ThunderAI.",
"description": ""
},
+ "placeholder_mail_text_body": {
+ "message": "Corpo do e-mail",
+ "description": ""
+ },
+ "placeholder_mail_html_body": {
+ "message": "Corpo do e-mail HTML",
+ "description": ""
+ },
+ "placeholder_mail_subject": {
+ "message": "Assunto do e-mail",
+ "description": ""
+ },
+ "placeholder_selected_text": {
+ "message": "Texto selecionado",
+ "description": ""
+ },
+ "placeholder_additional_text": {
+ "message": "Texto adicional",
+ "description": ""
+ },
+ "placeholder_junk_score": {
+ "message": "Pontuação de spam",
+ "description": ""
+ },
+ "placeholder_recipients": {
+ "message": "Destinatários",
+ "description": ""
+ },
+ "placeholder_cc_list": {
+ "message": "Lista CC",
+ "description": ""
+ },
+ "placeholder_author": {
+ "message": "Autor",
+ "description": ""
+ },
+ "prefs_OptionText_placeholders_use_default_value": {
+ "message": "Marcadores de posição: usar valor padrão",
+ "description": ""
+ },
+ "prefs_OptionText_placeholders_use_default_value_info": {
+ "message": "Se marcado, os marcadores de posição serão preenchidos com os valores padrão quando nenhum valor for fornecido. Caso contrário, os marcadores de posição serão mantidos no lugar.",
+ "description": ""
+ },
+ "prefs_OptionText_max_prompt_length": {
+ "message": "Comprimento máximo do prompt",
+ "description": ""
+ },
+ "prefs_OptionText_max_prompt_length_Info": {
+ "message": "Este é o número máximo de caracteres que podem ser usados em um prompt. Caso contrário, uma mensagem de erro será exibida. O valor não é editável para a Interface Web do ChatGPT.",
+ "description": ""
+ },
+ "prefs_OptionText_chatgpt_web_model": {
+ "message": "Modelo Web do ChatGPT",
+ "description": ""
+ },
+ "prefs_OptionText_chatgpt_web_model_info": {
+ "message": "Este é o modelo que será aplicado para a Interface Web do ChatGPT. Se nenhum for especificado ou um incorreto for fornecido, o modelo padrão será definido pelo ChatGPT na página web.",
+ "description": ""
+ },
+ "prefs_OptionText_chatgpt_web_tempchat": {
+ "message": "Chat temporário Web do ChatGPT",
+ "description": ""
+ },
+ "prefs_OptionText_chatgpt_web_tempchat_info": {
+ "message": "Se marcado, o chat temporário será utilizado na Interface Web do ChatGPT.",
+ "description": ""
+ },
+ "chatgpt_btn_model": {
+ "message": "Usar o modelo atual",
+ "description": ""
+ },
+ "SendingPrompt": {
+ "message": "Enviando prompt...",
+ "description": ""
+ },
+ "AllowedValues": {
+ "message": "Valores permitidos",
+ "description": ""
+ },
+ "prefs_OptionText_btnManagePrompts_infoline": {
+ "message": "Agora você pode usar marcadores de posição adicionais!",
"prefs_OptionText_openai_comp_use_v1": {
"message": "Manter a compatibilidade com \"v1\"",
"description": ""
diff --git a/api_webchat/controller.js b/api_webchat/controller.js
index 72bf7ac4..e904871a 100644
--- a/api_webchat/controller.js
+++ b/api_webchat/controller.js
@@ -20,10 +20,13 @@
* The original code has been released under the Apache License, Version 2.0.
*/
+import { placeholdersUtils } from '../js/mzta-placeholders.js';
+
// Get the LLM to be used
const urlParams = new URLSearchParams(window.location.search);
const llm = urlParams.get('llm');
const call_id = urlParams.get('call_id');
+const ph_def_val = urlParams.get('ph_def_val');
// Data received from the user
let promptData = null;
@@ -93,6 +96,7 @@ switch (llm) {
}
}
+//let prefs_ph = await browser.storage.sync.get({placeholders_use_default_value: false});
// Event listeners for worker messages
worker.onmessage = function(event) {
@@ -126,7 +130,15 @@ browser.runtime.onMessage.addListener((message, sender, sendResponse) => {
if(message.do_custom_text=="1") {
let userInput = prompt(browser.i18n.getMessage("chatgpt_win_custom_text"));
if(userInput !== null) {
- message.prompt += " " + userInput;
+ if(!placeholdersUtils.hasPlaceholder(message.prompt, 'additional_text')){
+ // no additional_text placeholder, do as usual
+ message.prompt += " " + userInput;
+ }else{
+ // we have the additional_text placeholder, do the magic!
+ let finalSubs = {};
+ finalSubs["additional_text"] = userInput;
+ message.prompt = placeholdersUtils.replacePlaceholders(message.prompt, finalSubs, ph_def_val==='1')
+ }
}
}
promptData = message;
diff --git a/api_webchat/messageInput.js b/api_webchat/messageInput.js
index 1331781b..7d044487 100644
--- a/api_webchat/messageInput.js
+++ b/api_webchat/messageInput.js
@@ -169,8 +169,8 @@ class MessageInput extends HTMLElement {
setModel(model){
this.model = model;
- this._sendButton.title = browser.i18n.getMessage("chagtp_api_send_button") + ": " + this.model;
- this._stopButton.title = browser.i18n.getMessage("chagtp_api_send_button") + ": " + this.model;
+ this._sendButton.title = browser.i18n.getMessage("chagpt_api_send_button") + ": " + this.model;
+ this._stopButton.title = browser.i18n.getMessage("chagpt_api_send_button") + ": " + this.model;
}
handleMessageSent() {
@@ -186,7 +186,7 @@ class MessageInput extends HTMLElement {
this._sendButton.style.display = 'block';
this._stopButton.setAttribute('disabled', 'disabled');
this._stopButton.style.display = 'none';
- this._stopButton.title = browser.i18n.getMessage("chagtp_api_send_button") + ": " + this.model;
+ this._stopButton.title = browser.i18n.getMessage("chagpt_api_send_button") + ": " + this.model;
this.hideStatusMessage();
this.setStatusMessage('');
}
diff --git a/customprompts/mzta-custom-prompts.css b/customprompts/mzta-custom-prompts.css
index 4d7fb217..d96b29ca 100644
--- a/customprompts/mzta-custom-prompts.css
+++ b/customprompts/mzta-custom-prompts.css
@@ -163,6 +163,46 @@ table .sort.desc {
margin-bottom: 0px;
}
+.autocomplete-container {
+ position: relative;
+}
+
+.autocomplete-list {
+ position: absolute;
+ top: 100%;
+ left: 0;
+ right: 0;
+ background-color: white;
+ border: 1px solid #ccc;
+ z-index: 1000;
+ max-height: 200px;
+ overflow-y: auto;
+ padding: 0;
+ margin: 0;
+ list-style: none;
+ font-size: small;
+}
+
+.autocomplete-list li {
+ padding: 8px;
+ cursor: pointer;
+}
+
+.autocomplete-list li:hover {
+ background-color: #f0f0f0;
+}
+
+.autocomplete-list li.active {
+ background-color: #ddd;
+}
+
+.hidden {
+ display: none;
+}
+
+.need_custom_text_span, .need_selected_span{
+ padding-right: 2px;
+}
@media (prefers-color-scheme: dark) {
body {
@@ -196,6 +236,18 @@ table .sort.desc {
.storage_space{
color: rgb(182, 182, 182);
- }
+ }
+ .autocomplete-list {
+ background-color: #2E2F36;
+ border: 1px solid #2E2F36;
+ }
+
+ .autocomplete-list li:hover {
+ background-color: #4c4e58;
+ }
+
+ .autocomplete-list li.active {
+ background-color: #4c4e58;
+ }
}
\ No newline at end of file
diff --git a/customprompts/mzta-custom-prompts.html b/customprompts/mzta-custom-prompts.html
index 22055da4..7ec3af37 100644
--- a/customprompts/mzta-custom-prompts.html
+++ b/customprompts/mzta-custom-prompts.html
@@ -10,8 +10,8 @@
Added a loading indicator in the menu when sending a prompt.
+
Added a new default prompt that uses the placeholders and allows replying to an email thread. It requires selecting the text of the first email to identify which is the one to reply to and the others in the thread [#150].