diff --git a/.github/ISSUE_TEMPLATE/bug_report.yml b/.github/ISSUE_TEMPLATE/bug_report.yml
index 33486910..b17d5088 100644
--- a/.github/ISSUE_TEMPLATE/bug_report.yml
+++ b/.github/ISSUE_TEMPLATE/bug_report.yml
@@ -56,7 +56,7 @@ body:
- ChatGPT Web Interface
- OpenAI ChatGPT API
- Google Gemini API
- - Anthropic API
+ - Claude API
- Ollama API
- OpenAI Compatible API
- type: markdown
diff --git a/.github/workflows/prerelease_comment_issue.yml b/.github/workflows/prerelease_comment_issue.yml
index c61d4fda..d82226b3 100644
--- a/.github/workflows/prerelease_comment_issue.yml
+++ b/.github/workflows/prerelease_comment_issue.yml
@@ -3,8 +3,6 @@ name: pre-release comment issues
on:
release:
types: [published, edited]
- # opzionale: test manuale
- workflow_dispatch: {}
permissions:
contents: read
@@ -50,8 +48,7 @@ jobs:
const milestoneTitle = parsed.milestoneTitle; // es. "3.7.0"
const prereleaseTagDisplay = tagName.startsWith("v") ? tagName : `v${tagName}`;
- const commentBody = `This feature could be tested in pre-release ${prereleaseTagDisplay}.`;
-
+ const commentBody = `This feature is available for testing in the pre-release version [${prereleaseTagDisplay}](https://github.com/micz/ThunderAI/releases).`;
core.info(`(MAIN) Looking for milestone '${milestoneTitle}' in ${owner}/${repo}`);
// Find milestone (open or closed)
diff --git a/CHANGELOG.md b/CHANGELOG.md
index d40cd6ab..f202f26b 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -4,6 +4,18 @@
+
Version 3.7.0 - ??/??/2025
+
+ - [All APIs] It's now possibile to define a list of tags to be used when autotagging received emails [#436]. The tags are are now shown in the information header in the AI API chat [#289].
+ - [All APIs] The prompt id and name are now shown in the information header in the AI API chat [#436].
+ - Added the {%mail_attachments_info%} placeholder to retrieve the name, type and file size of the mail attachments [#446].
+ - [Google Gemini API]Support for the thinkingBudget parameter has been added [#494].
+ - [OpenAI Comp API] Added DeepSeek configuration [#486].
+ - [ChatGPT Web] Added a message to explain to click on "Force completion" if the ChatGPT job is not done after 7 seconds [#419].
+ - Anthropic API renamed to Claude API [#510].
+ - Various code improvements and minor bugs fixed.
+ - ...
+
Version 3.6.1 - 23/08/2025
- [OpenAI Comp API] Perplexity configuration fixed [#461].
diff --git a/README.md b/README.md
index e866075c..d35f39ba 100644
--- a/README.md
+++ b/README.md
@@ -31,8 +31,15 @@ Using an API integration, you can activate some automatic features:
>
>
> - **Google Gemini**
-> - You can use also the _System Instructions_ option if needed.
+> - You can use also the _System Instructions_ and _thinkingBudget_ options if needed.
>
+>
+>
+>
+> - **Claude API**
+> - You need to grant the permission "_Access your data for sites in the https://anthropic.com domain_" to use the Claude API.
+>
+>
>
>
> - **Using Ollama**
@@ -44,11 +51,6 @@ Using an API integration, you can activate some automatic features:
> - **OpenAI Compatible API**
> - You can also use a local OpenAI Compatible API server, like LM Studio or Mistral AI!
> - There is also an option to remove the "v1" segment from the API url, if needed, and to manually set the model name if the server doesn't have a models list endpoint.
->
->
->
-> - **Anthropic API**
-> - Use Claude directly!
@@ -102,6 +104,8 @@ _The language status represents the percentage of translated strings in the late
- loading.io for the loading SVGs
- [Fluent Design System](https://www.iconfinder.com/fluent-designsystem) for the Custom Prompts table sorting icons
- [JessiGue](https://www.flaticon.com/authors/jessigue) for the show/hide icon for api key fields
+- [Iconka.com](https://www.iconarchive.com/artist/iconka.html) for the autotag context menu icon
+- [Icojam](https://www.iconarchive.com/artist/icojam.html) for the spam filter context menu icon
diff --git a/_locales/bg/messages.json b/_locales/bg/messages.json
index 68bb922d..3d511f32 100644
--- a/_locales/bg/messages.json
+++ b/_locales/bg/messages.json
@@ -1,6 +1,6 @@
{
"extensionDescription": {
- "message": "Използвайте ChatGPT, Google Gemini, Anthropic или Ollama, за да подобрите вашите имейли!"
+ "message": "Използвайте ChatGPT, Google Gemini, Claude или Ollama, за да подобрите вашите имейли!"
},
"menu_title": {
"message": "ИИ"
diff --git a/_locales/cs/messages.json b/_locales/cs/messages.json
index a47e25fe..d0b12318 100644
--- a/_locales/cs/messages.json
+++ b/_locales/cs/messages.json
@@ -24,7 +24,7 @@
"message": "Přidat do nabídky"
},
"extensionDescription": {
- "message": "Použijte ChatGPT, Google Gemini, Anthropic nebo Ollama pro vylepšení vašich e-mailů!"
+ "message": "Použijte ChatGPT, Google Gemini, Claude nebo Ollama pro vylepšení vašich e-mailů!"
},
"menu_title": {
"message": "AI"
@@ -960,10 +960,10 @@
"message": "Přidat novou úlohu"
},
"prefs_Anthropic_API_Key": {
- "message": "Klíč API Anthropic"
+ "message": "Klíč API Claude"
},
"Anthropic_Version": {
- "message": "Verze API Anthropic"
+ "message": "Verze API Claude"
},
"Anthropic_Version_Info": {
"message": "POVINNÉ. Neměňte tuto hodnotu, pokud nevíte, co děláte. Více informací zde:"
@@ -1001,7 +1001,7 @@
"message": "Tento zástupný symbol nepřidává žádný text, ale zabraňuje automatickému přidání těla emailu na konec výzvy."
},
"ask_anthropic_api_permission_1": {
- "message": "Pro používání integrace API Anthropic musíte udělit požadované oprávnění."
+ "message": "Pro používání integrace API Claude musíte udělit požadované oprávnění."
},
"ask_integration_permission_2_popup": {
"message": "Klikněte zde pro otevření nové karty a postupujte podle instrukcí."
@@ -1034,34 +1034,34 @@
"message": "Pokud je v možnostech nebo v dotazu specifikován projekt, přepíše nastavení Vlastního GPT."
},
"prefs_Connection_type_Anthropic_API": {
- "message": "API Anthropic"
+ "message": "API Claude"
},
"Anthropic_Models": {
- "message": "Modely Anthropic"
+ "message": "Modely Claude"
},
"Anthropic_Models_Fetch": {
- "message": "Aktualizovat seznam modelů Anthropic"
+ "message": "Aktualizovat seznam modelů Claude"
},
"Anthropic_Models_Error_fetching": {
- "message": "Chyba při pokusu o načtení modelů Anthropic"
+ "message": "Chyba při pokusu o načtení modelů Claude"
},
"prefs_OptionText_anthropic_max_tokens": {
- "message": "Maximální počet tokenů Anthropic"
+ "message": "Maximální počet tokenů Claude"
},
"prefs_OptionText_anthropic_max_tokens_Info": {
"message": "Maximální počet tokenů, které se mají vygenerovat v dokončení. Počet tokenů vaší výzvy plus max_tokens nesmí překročit délku kontextu modelu."
},
"anthropic_empty_apikey": {
- "message": "Nepřidali jste klíč API pro API Anthropic. Vložte jej prosím na stránce s možnostmi."
+ "message": "Nepřidali jste klíč API pro API Claude. Vložte jej prosím na stránce s možnostmi."
},
"anthropic_empty_model": {
- "message": "Nevybírali jste model pro API Anthropic. Vyberte jej prosím na stránce s možnostmi."
+ "message": "Nevybírali jste model pro API Claude. Vyberte jej prosím na stránce s možnostmi."
},
"anthropic_empty_version": {
- "message": "Nepřidali jste řetězec verze pro API Anthropic. Vložte jej prosím na stránce s možnostmi."
+ "message": "Nepřidali jste řetězec verze pro API Claude. Vložte jej prosím na stránce s možnostmi."
},
"anthropic_api_request_failed": {
- "message": "Selhal požadavek API Anthropic"
+ "message": "Selhal požadavek API Claude"
},
"_api_connecting": {
"message": "Pokus o připojení k $api_string$ s následující konfigurací...",
diff --git a/_locales/de/messages.json b/_locales/de/messages.json
index ba2f8a88..a0979b2d 100644
--- a/_locales/de/messages.json
+++ b/_locales/de/messages.json
@@ -1,6 +1,6 @@
{
"extensionDescription": {
- "message": "Verwenden Sie ChatGPT, Google Gemini, Anthropic oder Ollama, um Ihre E-Mails zu verbessern!",
+ "message": "Verwenden Sie ChatGPT, Google Gemini, Claude oder Ollama, um Ihre E-Mails zu verbessern!",
"description": "Description of the extension."
},
"menu_title": {
@@ -760,7 +760,7 @@
"message": "Wenn ausgewählt, wird die KI automatisch Tags zu neu empfangenen E-Mails hinzufügen."
},
"prefs_OptionText_add_tags_auto_only_inbox": {
- "message": "Tags nur zu E-Mails im Posteingang hinzufügen"
+ "message": "Fügen Sie nur Tags zu E-Mails im Posteingang hinzu"
},
"prefs_OptionText_add_tags_auto_only_inbox_Info": {
"message": "Wenn ausgewählt, wird die KI nur Tags zu E-Mails hinzufügen, die im Posteingangsordner empfangen wurden."
@@ -1072,22 +1072,22 @@
"message": "Bitte korrigieren Sie die folgende E-Mail und beheben Sie alle Rechtschreib- oder Grammatikfehler. Antworten Sie nur mit dem korrigierten Text, ohne zusätzliche Kommentare oder sonstigen Text.\n\n„{%mail_typed_text%}“"
},
"prefs_Connection_type_Anthropic_API": {
- "message": "Anthropic API"
+ "message": "Claude API"
},
"anthropic_empty_version": {
- "message": "Sie haben keinen Versionsstring für die Anthropic-API hinzugefügt. Bitte fügen Sie einen auf der Optionsseite ein."
+ "message": "Sie haben keinen Versionsstring für die Claude-API hinzugefügt. Bitte fügen Sie einen auf der Optionsseite ein."
},
"Anthropic_Models_Error_fetching": {
- "message": "Fehler beim Abrufen der Anthropic-Modelle"
+ "message": "Fehler beim Abrufen der Claude-Modelle"
},
"prefs_Anthropic_API_Key": {
- "message": "Anthropic API-Schlüssel"
+ "message": "Claude API-Schlüssel"
},
"prefs_OptionText_anthropic_max_tokens_Info": {
"message": "Die maximale Anzahl von Tokens, die in der Vervollständigung generiert werden soll. Die Anzahl der Tokens Ihres Prompts plus max_tokens darf die Kontextlänge des Modells nicht überschreiten."
},
"anthropic_api_request_failed": {
- "message": "Anfrage an die Anthropic-API fehlgeschlagen"
+ "message": "Anfrage an die Claude-API fehlgeschlagen"
},
"_api_connecting": {
"message": "Verbindungsversuch zu $api_string$ mit der folgenden Konfiguration...",
@@ -1098,28 +1098,28 @@
}
},
"Anthropic_Models_Fetch": {
- "message": "Anthropic-Modellliste aktualisieren"
+ "message": "Claude-Modellliste aktualisieren"
},
"Custom": {
"message": "Benutzerdefiniert"
},
"Anthropic_Version": {
- "message": "Anthropic-API-Version"
+ "message": "Claude-API-Version"
},
"prefs_OptionText_anthropic_max_tokens": {
- "message": "Maximale Anzahl an Tokens für Anthropic"
+ "message": "Maximale Anzahl an Tokens für Claude"
},
"anthropic_empty_apikey": {
- "message": "Sie haben keinen API-Schlüssel für die Anthropic-API hinzugefügt. Bitte fügen Sie einen auf der Optionsseite ein."
+ "message": "Sie haben keinen API-Schlüssel für die Claude-API hinzugefügt. Bitte fügen Sie einen auf der Optionsseite ein."
},
"ask_anthropic_api_permission_1": {
- "message": "Um die Anthropic-API-Integration zu verwenden, müssen Sie die erforderliche Berechtigung erteilen."
+ "message": "Um die Claude-API-Integration zu verwenden, müssen Sie die erforderliche Berechtigung erteilen."
},
"Anthropic_Models": {
- "message": "Anthropic Modelle"
+ "message": "Claude Modelle"
},
"anthropic_empty_model": {
- "message": "Sie haben kein Modell für die Anthropic-API ausgewählt. Bitte wählen Sie eines auf der Optionsseite aus."
+ "message": "Sie haben kein Modell für die Claude-API ausgewählt. Bitte wählen Sie eines auf der Optionsseite aus."
},
"_api_connecting_model": {
"message": "Modell",
@@ -1257,5 +1257,47 @@
},
"prefs_OpenAIComp_ClearModelsList": {
"message": "Modellliste löschen"
+ },
+ "prefs_OptionText_add_tags_auto_uselist": {
+ "message": "Verwenden Sie nur diese Tags"
+ },
+ "prefs_OptionText_add_tags_auto_uselist_Info": {
+ "message": "Wenn diese Option aktiviert ist, fügt die KI nur Tags aus der folgenden Liste hinzu."
+ },
+ "prefs_OptionText_add_tags_auto_uselist_list_Info": {
+ "message": "Die Liste muss mindestens einen Tag enthalten. Fügen Sie pro Zeile einen Tag hinzu oder trennen Sie sie durch ein Komma."
+ },
+ "prompt_add_tags_use_list": {
+ "message": "Verwenden Sie nur die Tags in dieser durch Kommas getrennten Liste"
+ },
+ "prefs_OptionText_add_tags_use_specific_integration_Info": {
+ "message": "Wenn diese Option aktiviert ist, werden das unten angegebene Modell und die API zum Hinzufügen von Tags zu E-Mails verwendet, unabhängig von der in der ThunderAI-Optionsseite gewählten Einstellung."
+ },
+ "placeholder_mail_attachments_info": {
+ "message": "Informationen zu den Anhängen in der E-Mail"
+ },
+ "prefs_OptionText_use_specific_integration": {
+ "message": "Spezifisches Modell und API verwenden"
+ },
+ "prefs_OptionText_spamfilter_use_specific_integration_Info": {
+ "message": "Wenn diese Option aktiviert ist, werden das unten angegebene Modell und die API für den Spamfilter verwendet, unabhängig von der in der ThunderAI-Optionsseite gewählten Einstellung."
+ },
+ "chatgpt_click_force_completion": {
+ "message": "Es scheint nicht möglich zu sein festzustellen, ob ChatGPT fertig ist. Klicken Sie hier, um den Abschluss des Auftrags zu erzwingen."
+ },
+ "warn_API_needed": {
+ "message": "Um diese Funktion zu nutzen, benötigen Sie eine API-Integration anstelle der ChatGPT-Webintegration. Sie können eine spezifische API auf der Einstellungsseite der Funktion definieren, indem Sie zuerst das obige Kontrollkästchen aktivieren und dann auf die Schaltfläche links klicken."
+ },
+ "prefs_google_gemini_thinking_budget": {
+ "message": "Thinking Budget"
+ },
+ "prefs_google_gemini_thinking_budget_Info": {
+ "message": "Legen Sie die Anzahl der Token fest, die für das Denken verwendet werden sollen. Lassen Sie dieses Feld leer, wenn das ausgewählte Modell Denken nicht unterstützt oder wenn Sie die Standardmethode verwenden möchten. Geben Sie 0 ein, um das Denken zu deaktivieren, oder -1, um dynamisches Denken zu aktivieren."
+ },
+ "SelectAll": {
+ "message": "Alles auswählen"
+ },
+ "DeselectAll": {
+ "message": "Alles abwählen"
}
}
diff --git a/_locales/en/messages.json b/_locales/en/messages.json
index b02f8c67..ad7acde8 100644
--- a/_locales/en/messages.json
+++ b/_locales/en/messages.json
@@ -1,6 +1,6 @@
{
"extensionDescription": {
- "message": "Use ChatGPT, Google Gemini, Anthropic or Ollama to enhance your emails!",
+ "message": "Use ChatGPT, Google Gemini, Claude or Ollama to enhance your emails!",
"description": "Description of the extension."
},
"menu_title": {
@@ -1127,14 +1127,34 @@
"message": "If checked, the AI will add only existing tags and won't create new tags.",
"description": ""
},
+ "prefs_OptionText_add_tags_auto_uselist": {
+ "message": "Use only these tags",
+ "description": ""
+ },
+ "prefs_OptionText_add_tags_auto_uselist_Info": {
+ "message": "If checked, the AI will add only tags from the list below.",
+ "description": ""
+ },
+ "prefs_OptionText_add_tags_auto_uselist_list_Info": {
+ "message": "The list must contain at least one tag. Add a tag per line, or separated by a comma.",
+ "description": ""
+ },
+ "prompt_add_tags_use_list": {
+ "message": "Use only the tags in this comma separated list",
+ "description": ""
+ },
"prefs_OptionText_add_tags_auto_only_inbox": {
- "message": "Only add tags to inbox emails",
+ "message": "Only add tags to emails in the inbox",
"description": ""
},
"prefs_OptionText_add_tags_auto_only_inbox_Info": {
"message": "If checked, the AI will only add tags to emails received in the inbox folder.",
"description": ""
},
+ "prefs_OptionText_add_tags_use_specific_integration_Info": {
+ "message": "If checked, the Model and API specified below will be used for adding tags to emails, regardless the one choosen in the ThunderAI options page.",
+ "description": ""
+ },
"placeholder_thunderai_def_sign": {
"message": "Default signature as defined in ThunderAI options.",
"description": ""
@@ -1143,6 +1163,10 @@
"message": "Default language as defined in ThunderAI options.",
"description": ""
},
+ "placeholder_mail_attachments_info": {
+ "message": "Information about the attachments in the email",
+ "description": ""
+ },
"empty": {
"message": "This placeholder doesn't add any text, but it prevents the email body from being automatically appended at the end of the prompt.",
"description": ""
@@ -1183,6 +1207,14 @@
"message": "Spam Filter Options",
"description": ""
},
+ "prefs_OptionText_use_specific_integration": {
+ "message": "Use specific Model and API",
+ "description": ""
+ },
+ "prefs_OptionText_spamfilter_use_specific_integration_Info": {
+ "message": "If checked, the Model and API specified below will be used for the spam filter, regardless the one chosen in the ThunderAI options page.",
+ "description": ""
+ },
"prefs_OptionText_spamfilter_threshold": {
"message": "Spam threshold",
"description": ""
@@ -1352,7 +1384,7 @@
"description": ""
},
"ask_anthropic_api_permission_1": {
- "message": "To use the Anthropic API integration, you need to grant the required permission.",
+ "message": "To use the Claude API integration, you need to grant the required permission.",
"description": ""
},
"ask_integration_permission_2_popup": {
@@ -1428,27 +1460,27 @@
"description": ""
},
"prefs_Anthropic_API_Key": {
- "message": "Anthropic API Key",
+ "message": "Claude API Key",
"description": ""
},
"prefs_Connection_type_Anthropic_API": {
- "message": "Anthropic API",
+ "message": "Claude API",
"description": ""
},
"Anthropic_Models": {
- "message": "Anthropic Models",
+ "message": "Claude Models",
"description": ""
},
"Anthropic_Models_Fetch": {
- "message": "Update Anthropic Models list",
+ "message": "Update Claude Models list",
"description": ""
},
"Anthropic_Models_Error_fetching": {
- "message": "Error trying to fetch Anthropic models",
+ "message": "Error trying to fetch Claude models",
"description": ""
},
"Anthropic_Version": {
- "message": "Anthropic API Version",
+ "message": "Claude API Version",
"description": ""
},
"Anthropic_Version_Info": {
@@ -1456,7 +1488,7 @@
"description": ""
},
"prefs_OptionText_anthropic_max_tokens": {
- "message": "Anthropic Max Tokens",
+ "message": "Claude Max Tokens",
"description": ""
},
"prefs_OptionText_anthropic_max_tokens_Info": {
@@ -1464,19 +1496,19 @@
"description": ""
},
"anthropic_empty_apikey": {
- "message": "You've not added an API Key for the Anthropic API. Please insert one in the options page.",
+ "message": "You've not added an API Key for the Claude API. Please insert one in the options page.",
"description": ""
},
"anthropic_empty_model": {
- "message": "You've not chosen a model for the Anthropic API. Please choose one in the options page.",
+ "message": "You've not chosen a model for the Claude API. Please choose one in the options page.",
"description": ""
},
"anthropic_empty_version": {
- "message": "You've not added a version string for the Anthropic API. Please insert one in the options page.",
+ "message": "You've not added a version string for the Claude API. Please insert one in the options page.",
"description": ""
},
"anthropic_api_request_failed": {
- "message": "Anthropic API request failed",
+ "message": "Claude API request failed",
"description": ""
},
"_api_connecting": {
@@ -1628,5 +1660,29 @@
"OpenAIComp_ClearModelsList_Confirm": {
"message": "Are you sure you want to clear the Models List? This action cannot be undone.",
"description": ""
+ },
+ "chatgpt_click_force_completion": {
+ "message": "It seems that it's not possible to get if ChatGPT has finished. Click here to force the completion of the job.",
+ "description": ""
+ },
+ "warn_API_needed": {
+ "message": "To use this feature, you need an API integration rather than the ChatGPT Web Integration. You can define a specific API in the feature settings page by first checking the checkbox above and then clicking the button on the left.",
+ "description": ""
+ },
+ "prefs_google_gemini_thinking_budget": {
+ "message": "Thinking Budget",
+ "description": ""
+ },
+ "prefs_google_gemini_thinking_budget_Info": {
+ "message": "Define the number of tokens to be used for thinking. Leave this field blank if the selected model does not support thinking or if you want to use the default method. Enter 0 to disable thinking, or -1 to enable dynamic thinking.",
+ "description": ""
+ },
+ "SelectAll": {
+ "message": "Select All",
+ "description": ""
+ },
+ "DeselectAll": {
+ "message": "Deselect All",
+ "description": ""
}
}
\ No newline at end of file
diff --git a/_locales/eo/messages.json b/_locales/eo/messages.json
index 4624c571..5d17bbcf 100644
--- a/_locales/eo/messages.json
+++ b/_locales/eo/messages.json
@@ -3,7 +3,7 @@
"message": "Respondi per"
},
"extensionDescription": {
- "message": "Uzu ChatGPT, Google Gemini, Anthropic aŭ Ollama por poluri viajn retpoŝtajn mesaĝojn!"
+ "message": "Uzu ChatGPT, Google Gemini, Claude aŭ Ollama por poluri viajn retpoŝtajn mesaĝojn!"
},
"prompt_rewrite_formal": {
"message": "Reverki formale"
diff --git a/_locales/es/messages.json b/_locales/es/messages.json
index fadf06a5..92c85674 100644
--- a/_locales/es/messages.json
+++ b/_locales/es/messages.json
@@ -1,6 +1,6 @@
{
"extensionDescription": {
- "message": "¡Usa ChatGPT, Google Gemini, Anthropic u Ollama para mejorar tus emails!"
+ "message": "¡Usa ChatGPT, Google Gemini, Claude u Ollama para mejorar tus emails!"
},
"menu_title": {
"message": "IA"
diff --git a/_locales/fr/messages.json b/_locales/fr/messages.json
index 4f31c877..beac8f79 100644
--- a/_locales/fr/messages.json
+++ b/_locales/fr/messages.json
@@ -1,6 +1,6 @@
{
"extensionDescription": {
- "message": "Utilise ChatGPT, Goolge Gemini, Anthropic ou Ollama pour améliorer tes e-mails !",
+ "message": "Utilise ChatGPT, Goolge Gemini, Claude ou Ollama pour améliorer tes e-mails !",
"description": "Description of the extension."
},
"menu_title": {
@@ -778,7 +778,7 @@
"message": "Ajouter des tags automatiquement"
},
"prefs_OptionText_add_tags_auto_only_inbox": {
- "message": "Ajouter des tags uniquement aux e-mails de la boîte de réception"
+ "message": "Ajoutez des balises uniquement aux e-mails de la boîte de réception"
},
"prefs_OptionText_spamfilter_threshold": {
"message": "Seuil de spam"
@@ -1080,34 +1080,34 @@
}
},
"anthropic_empty_model": {
- "message": "Vous n'avez pas choisi de modèle pour l'API Anthropic. Veuillez en sélectionner un dans la page des options."
+ "message": "Vous n'avez pas choisi de modèle pour l'API Claude. Veuillez en sélectionner un dans la page des options."
},
"Anthropic_Version_Info": {
"message": "OBLIGATOIRE. Ne modifiez pas cette valeur sauf si vous savez ce que vous faites. Plus d'informations sur :"
},
"ask_anthropic_api_permission_1": {
- "message": "Pour utiliser l'intégration de l'API Anthropic, vous devez accorder l'autorisation requise."
+ "message": "Pour utiliser l'intégration de l'API Claude, vous devez accorder l'autorisation requise."
},
"prefs_OptionText_anthropic_max_tokens_Info": {
"message": "Le nombre maximum de jetons à générer dans la complétion. Le total des jetons de votre invite plus max_tokens ne peut pas dépasser la longueur du contexte du modèle."
},
"anthropic_empty_apikey": {
- "message": "Vous n'avez pas ajouté de clé API pour l'API Anthropic. Veuillez en insérer une dans la page des options."
+ "message": "Vous n'avez pas ajouté de clé API pour l'API Claude. Veuillez en insérer une dans la page des options."
},
"anthropic_empty_version": {
- "message": "Vous n'avez pas ajouté de chaîne de version pour l'API Anthropic. Veuillez en insérer une dans la page des options."
+ "message": "Vous n'avez pas ajouté de chaîne de version pour l'API Claude. Veuillez en insérer une dans la page des options."
},
"apiwebchat_selection_info": {
"message": "Si vous sélectionnez du texte, seule cette portion sera prise en compte."
},
"Anthropic_Version": {
- "message": "Version de l’API Anthropic"
+ "message": "Version de l’API Claude"
},
"prefs_OptionText_anthropic_max_tokens": {
- "message": "Nombre maximum de jetons Anthropic"
+ "message": "Nombre maximum de jetons Claude"
},
"anthropic_api_request_failed": {
- "message": "Échec de la requête à l'API Anthropic"
+ "message": "Échec de la requête à l'API Claude"
},
"prefs_OpenAIComp_AvailableServices": {
"message": "Services Disponibles"
@@ -1124,19 +1124,19 @@
}
},
"prefs_Anthropic_API_Key": {
- "message": "Clé API Anthropic"
+ "message": "Clé API Claude"
},
"prefs_Connection_type_Anthropic_API": {
- "message": "API Anthropic"
+ "message": "API Claude"
},
"Anthropic_Models": {
- "message": "Modèles Anthropic"
+ "message": "Modèles Claude"
},
"Anthropic_Models_Fetch": {
- "message": "Mettre à jour la liste des modèles Anthropic"
+ "message": "Mettre à jour la liste des modèles Claude"
},
"Anthropic_Models_Error_fetching": {
- "message": "Erreur lors de la tentative de récupération des modèles Anthropic"
+ "message": "Erreur lors de la tentative de récupération des modèles Claude"
},
"_api_connecting_model": {
"message": "Modèle",
@@ -1257,5 +1257,47 @@
},
"OpenAIComp_ClearModelsList_Confirm": {
"message": "Êtes-vous sûr de vouloir effacer la liste des modèles ? Cette action est irréversible."
+ },
+ "prefs_OptionText_add_tags_auto_uselist": {
+ "message": "Utilisez uniquement ces balises"
+ },
+ "prefs_OptionText_add_tags_auto_uselist_Info": {
+ "message": "Si cette option est cochée, l’IA ajoutera uniquement des balises de la liste ci-dessous."
+ },
+ "prefs_OptionText_add_tags_auto_uselist_list_Info": {
+ "message": "La liste doit contenir au moins une balise. Ajoutez une balise par ligne ou séparée par une virgule."
+ },
+ "prompt_add_tags_use_list": {
+ "message": "Utilisez uniquement les balises de cette liste séparée par des virgules"
+ },
+ "prefs_OptionText_add_tags_use_specific_integration_Info": {
+ "message": "Si cette option est cochée, le Modèle et l’API spécifiés ci-dessous seront utilisés pour ajouter des balises aux e-mails, quel que soit celui choisi dans la page des options de ThunderAI."
+ },
+ "placeholder_mail_attachments_info": {
+ "message": "Informations sur les pièces jointes dans l’e-mail"
+ },
+ "prefs_OptionText_use_specific_integration": {
+ "message": "Utiliser un Modèle et une API spécifiques"
+ },
+ "prefs_OptionText_spamfilter_use_specific_integration_Info": {
+ "message": "Si cette option est cochée, le Modèle et l’API spécifiés ci-dessous seront utilisés pour le filtre anti-spam, quel que soit celui choisi dans la page des options de ThunderAI."
+ },
+ "chatgpt_click_force_completion": {
+ "message": "Il semble qu’il ne soit pas possible de savoir si ChatGPT a terminé. Cliquez ici pour forcer l’achèvement du travail."
+ },
+ "warn_API_needed": {
+ "message": "Pour utiliser cette fonctionnalité, vous avez besoin d’une intégration API plutôt que de l’intégration Web de ChatGPT. Vous pouvez définir une API spécifique dans la page des paramètres de la fonctionnalité en cochant d’abord la case ci-dessus, puis en cliquant sur le bouton à gauche."
+ },
+ "prefs_google_gemini_thinking_budget_Info": {
+ "message": "Définissez le nombre de jetons à utiliser pour le raisonnement. Laissez ce champ vide si le modèle sélectionné ne prend pas en charge le raisonnement ou si vous souhaitez utiliser la méthode par défaut. Entrez 0 pour désactiver le raisonnement, ou -1 pour l’activer de manière dynamique."
+ },
+ "prefs_google_gemini_thinking_budget": {
+ "message": "Thinking Budget"
+ },
+ "SelectAll": {
+ "message": "Tout sélectionner"
+ },
+ "DeselectAll": {
+ "message": "Tout désélectionner"
}
}
diff --git a/_locales/hr/messages.json b/_locales/hr/messages.json
index c913a94a..2b67fc51 100644
--- a/_locales/hr/messages.json
+++ b/_locales/hr/messages.json
@@ -1,6 +1,6 @@
{
"extensionDescription": {
- "message": "Koristite ChatGPT, Google Gemini, Anthropic ili Ollama kako bi poboljšali vaše e-poruke!",
+ "message": "Koristite ChatGPT, Google Gemini, Claude ili Ollama kako bi poboljšali vaše e-poruke!",
"description": "Description of the extension."
},
"menu_title": {
diff --git a/_locales/hu/messages.json b/_locales/hu/messages.json
index 5a3f973d..62e99942 100644
--- a/_locales/hu/messages.json
+++ b/_locales/hu/messages.json
@@ -1,6 +1,6 @@
{
"extensionDescription": {
- "message": "Használja a ChatGPT, Google Gemini, Anthropic vagy Ollama modelleket, hogy még jobbá tegye emailjeit!"
+ "message": "Használja a ChatGPT, Google Gemini, Claude vagy Ollama modelleket, hogy még jobbá tegye emailjeit!"
},
"menu_title": {
"message": "MI"
diff --git a/_locales/it/messages.json b/_locales/it/messages.json
index 58093c59..880e5f38 100644
--- a/_locales/it/messages.json
+++ b/_locales/it/messages.json
@@ -1,6 +1,6 @@
{
"extensionDescription": {
- "message": "Usa ChatGPT, Google Gemini, Anthropic oppure Ollama per migliorare le tue email!",
+ "message": "Usa ChatGPT, Google Gemini, Claude oppure Ollama per migliorare le tue email!",
"description": "Description of the extension."
},
"menu_title": {
@@ -1078,46 +1078,46 @@
"message": "HTML selezionato"
},
"prefs_Connection_type_Anthropic_API": {
- "message": "API Anthropic"
+ "message": "API Claude"
},
"ask_anthropic_api_permission_1": {
- "message": "Per utilizzare l'integrazione con l'API di Anthropic, è necessario concedere l'autorizzazione richiesta."
+ "message": "Per utilizzare l'integrazione con l'API di Claude, è necessario concedere l'autorizzazione richiesta."
},
"Anthropic_Version_Info": {
"message": "OBBLIGATORIO. Non modificare questo valore a meno che tu non sappia esattamente cosa stai facendo. Maggiori informazioni su:"
},
"Anthropic_Models": {
- "message": "Modelli di Anthropic"
+ "message": "Modelli di Claude"
},
"Anthropic_Models_Fetch": {
- "message": "Aggiorna l'elenco dei modelli di Anthropic"
+ "message": "Aggiorna l'elenco dei modelli di Claude"
},
"Anthropic_Models_Error_fetching": {
- "message": "Errore durante il tentativo di recupero dei modelli di Anthropic"
+ "message": "Errore durante il tentativo di recupero dei modelli di Claude"
},
"Anthropic_Version": {
- "message": "Versione API di Anthropic"
+ "message": "Versione API di Claude"
},
"prefs_Anthropic_API_Key": {
- "message": "Chiave API di Anthropic"
+ "message": "Chiave API di Claude"
},
"anthropic_empty_model": {
- "message": "Non hai selezionato un modello per l'API di Anthropic. Scegline uno nella pagina delle opzioni."
+ "message": "Non hai selezionato un modello per l'API di Claude. Scegline uno nella pagina delle opzioni."
},
"prefs_OpenAIComp_AvailableServices_Info": {
"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 Anthropic"
+ "message": "Numero massimo di token di Claude"
},
"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."
},
"anthropic_empty_apikey": {
- "message": "Non hai aggiunto una chiave per l'API di Anthropic. Inseriscila nella pagina delle opzioni."
+ "message": "Non hai aggiunto una chiave per l'API di Claude. Inseriscila nella pagina delle opzioni."
},
"anthropic_empty_version": {
- "message": "Non hai aggiunto la versione per l'API di Anthropic. Inseriscila nella pagina delle opzioni."
+ "message": "Non hai aggiunto la versione per l'API di Claude. Inseriscila nella pagina delle opzioni."
},
"_api_connecting": {
"message": "Tentativo di connessione a $api_string$ utilizzando la seguente configurazione...",
@@ -1169,7 +1169,7 @@
}
},
"anthropic_api_request_failed": {
- "message": "Richiesta all'API di Anthropic non riuscita"
+ "message": "Richiesta all'API di Claude non riuscita"
},
"prefs_OptionText_reply_type_Info": {
"message": "Questa è la modalità di risposta predefinita che verrà utilizzata quando rispondi a un'email. Puoi scegliere l'altra modalità nella finestra di risposta."
@@ -1260,5 +1260,47 @@
},
"OpenAIComp_ClearModelsList_Confirm": {
"message": "Sei sicuro di voler cancellare l’elenco dei modelli? Questa azione non può essere annullata."
+ },
+ "prefs_OptionText_add_tags_auto_uselist": {
+ "message": "Usa solo questi tag"
+ },
+ "prefs_OptionText_add_tags_auto_uselist_Info": {
+ "message": "Se selezionato, l'IA aggiungerà solo i tag dall'elenco qui sotto."
+ },
+ "prefs_OptionText_add_tags_auto_uselist_list_Info": {
+ "message": "L’elenco deve contenere almeno un tag. Aggiungi un tag per riga o separato da una virgola."
+ },
+ "prompt_add_tags_use_list": {
+ "message": "Usa solo i tag in questo elenco separato da virgole"
+ },
+ "prefs_OptionText_add_tags_use_specific_integration_Info": {
+ "message": "Se selezionato, il Modello e l’API specificati qui sotto verranno utilizzati per aggiungere tag alle email, indipendentemente da quello scelto nella pagina delle opzioni di ThunderAI."
+ },
+ "placeholder_mail_attachments_info": {
+ "message": "Informazioni sugli allegati nell’email"
+ },
+ "prefs_OptionText_use_specific_integration": {
+ "message": "Usa Modello e API specifici"
+ },
+ "prefs_OptionText_spamfilter_use_specific_integration_Info": {
+ "message": "Se selezionato, il Modello e l’API specificati qui sotto verranno utilizzati per il filtro antispam, indipendentemente da quello scelto nella pagina delle opzioni di ThunderAI."
+ },
+ "chatgpt_click_force_completion": {
+ "message": "Sembra che non sia possibile verificare se ChatGPT ha terminato. Clicca qui per forzare il completamento del lavoro."
+ },
+ "warn_API_needed": {
+ "message": "Per utilizzare questa funzionalità, è necessaria un’integrazione API invece dell’integrazione Web di ChatGPT. Puoi definire una specifica API nella pagina delle impostazioni della funzionalità selezionando prima la casella di controllo qui sopra e poi cliccando il pulsante a sinistra."
+ },
+ "prefs_google_gemini_thinking_budget": {
+ "message": "Thinking Budget"
+ },
+ "prefs_google_gemini_thinking_budget_Info": {
+ "message": "Definisci il numero di token da utilizzare per il ragionamento. Lascia questo campo vuoto se il modello selezionato non supporta il ragionamento o se desideri utilizzare il metodo predefinito. Inserisci 0 per disabilitare il ragionamento oppure -1 per abilitarlo in modo dinamico."
+ },
+ "SelectAll": {
+ "message": "Seleziona tutto"
+ },
+ "DeselectAll": {
+ "message": "Deseleziona tutto"
}
}
diff --git a/_locales/pl/messages.json b/_locales/pl/messages.json
index d4b6be92..088344ae 100644
--- a/_locales/pl/messages.json
+++ b/_locales/pl/messages.json
@@ -1,6 +1,6 @@
{
"extensionDescription": {
- "message": "Używaj ChatGPT, Goolge Gemini, Anthropic lub Ollama do ulepszania swoich e-maili!",
+ "message": "Używaj ChatGPT, Goolge Gemini, Claude lub Ollama do ulepszania swoich e-maili!",
"description": "Description of the extension."
},
"menu_title": {
diff --git a/_locales/pt-br/messages.json b/_locales/pt-br/messages.json
index 960c4c79..d9941262 100644
--- a/_locales/pt-br/messages.json
+++ b/_locales/pt-br/messages.json
@@ -1,6 +1,6 @@
{
"extensionDescription": {
- "message": "Use o ChatGPT, Goolge Gemini, Anthropic ou o Ollama para aprimorar seus e-mails!",
+ "message": "Use o ChatGPT, Goolge Gemini, Claude ou o Ollama para aprimorar seus e-mails!",
"description": "Description of the extension."
},
"menu_title": {
diff --git a/_locales/pt/messages.json b/_locales/pt/messages.json
index cf68ee66..c695c403 100644
--- a/_locales/pt/messages.json
+++ b/_locales/pt/messages.json
@@ -108,7 +108,7 @@
"message": "Se estiver tudo certo, depois de importar carrega no botão \"Guardar Tudo\"."
},
"extensionDescription": {
- "message": "Usa o ChatGPT, Google Gemini, Anthropic ou Ollama para melhorar os teus emails!"
+ "message": "Usa o ChatGPT, Google Gemini, Claude ou Ollama para melhorar os teus emails!"
},
"customPrompts_form_label_Name": {
"message": "Nome"
diff --git a/_locales/ru/messages.json b/_locales/ru/messages.json
index 473a6c7b..d0df3d25 100644
--- a/_locales/ru/messages.json
+++ b/_locales/ru/messages.json
@@ -1065,10 +1065,10 @@
"message": "Если в опциях или в подсказке указан Проект, временный чат не будет использоваться."
},
"prefs_Anthropic_API_Key": {
- "message": "Ключ API Anthropic"
+ "message": "Ключ API Claude"
},
"prefs_Connection_type_Anthropic_API": {
- "message": "Антропный(Anthropic) API"
+ "message": "Антропный(Claude) API"
},
"Anthropic_Models": {
"message": "Антропологические модели"
@@ -1086,22 +1086,22 @@
"message": "ОБЯЗАТЕЛЬНО. Не изменяйте это значение, если не знаете, что делаете. Доп. информация на сайте:"
},
"prefs_OptionText_anthropic_max_tokens": {
- "message": "Anthropic максимум токенов"
+ "message": "Claude максимум токенов"
},
"prefs_OptionText_anthropic_max_tokens_Info": {
"message": "Максимальное кол-во токенов, генерируемых в процессе завершения. Кол-во токенов в подсказке плюс max_tokens не может превышать длину контекста модели."
},
"anthropic_empty_apikey": {
- "message": "Вы не добавили ключ API для API Anthropic. Пожалуйста, введите его на странице параметров."
+ "message": "Вы не добавили ключ API для API Claude. Пожалуйста, введите его на странице параметров."
},
"anthropic_empty_model": {
- "message": "Вы не выбрали модель для Anthropic API. Пожалуйста, выберите ее на странице параметров."
+ "message": "Вы не выбрали модель для Claude API. Пожалуйста, выберите ее на странице параметров."
},
"anthropic_empty_version": {
- "message": "Вы не добавили строку версии для API Anthropic. Пожалуйста, вставьте ее на странице параметров."
+ "message": "Вы не добавили строку версии для API Claude. Пожалуйста, вставьте ее на странице параметров."
},
"anthropic_api_request_failed": {
- "message": "Anthropic API-запрос не удался"
+ "message": "Claude API-запрос не удался"
},
"_api_connecting": {
"message": "Попытка подключения к $api_string$ с использованием следующей конфигурации...",
diff --git a/_locales/zh_Hans/messages.json b/_locales/zh_Hans/messages.json
index 33fa33d0..ccbdaa63 100644
--- a/_locales/zh_Hans/messages.json
+++ b/_locales/zh_Hans/messages.json
@@ -48,7 +48,7 @@
"message": "保存所有变动"
},
"extensionDescription": {
- "message": "使用 ChatGPT、Google Gemini、Anthropic 或 Ollama 来提升你的电子邮件!"
+ "message": "使用 ChatGPT、Google Gemini、Claude 或 Ollama 来提升你的电子邮件!"
},
"menu_title": {
"message": "AI"
diff --git a/_locales/zh_Hant/messages.json b/_locales/zh_Hant/messages.json
index 693be535..22158154 100644
--- a/_locales/zh_Hant/messages.json
+++ b/_locales/zh_Hant/messages.json
@@ -300,7 +300,7 @@
"message": "額外屬性"
},
"Anthropic_Models": {
- "message": "Anthropic 模型"
+ "message": "Claude 模型"
},
"_api_connecting_model": {
"message": "模型",
@@ -317,7 +317,7 @@
"message": "啟用思考"
},
"extensionDescription": {
- "message": "使用 ChatGPT、Google Gemini、Anthropic 或 Ollama 來幫你寫好你的郵件吧!"
+ "message": "使用 ChatGPT、Google Gemini、Claude 或 Ollama 來幫你寫好你的郵件吧!"
},
"customPrompts_form_label_Name": {
"message": "名稱"
@@ -394,7 +394,7 @@
"message": "自訂"
},
"prefs_Connection_type_Anthropic_API": {
- "message": "Anthropic API"
+ "message": "Claude API"
},
"save": {
"message": "儲存"
@@ -645,13 +645,13 @@
"message": "這是將針對 ChatGPT 網頁介面強制執行的專案。"
},
"Anthropic_Models_Fetch": {
- "message": "更新 Anthropic 模型列表"
+ "message": "更新 Claude 模型列表"
},
"prefs_Anthropic_API_Key": {
- "message": "Anthropic API 金鑰"
+ "message": "Claude API 金鑰"
},
"anthropic_api_request_failed": {
- "message": "Anthropic API 請求失敗"
+ "message": "Claude API 請求失敗"
},
"OpenAIComp_Configs_ConfirmApply": {
"message": "您確定要套用設定「$config_name$」嗎?",
@@ -815,7 +815,7 @@
"message": "點擊此處開啟新分頁並按照說明進行操作。"
},
"ask_anthropic_api_permission_1": {
- "message": "要使用 Anthropic API 整合,您需要授予所需的權限。"
+ "message": "要使用 Claude API 整合,您需要授予所需的權限。"
},
"ask_integration_permission_ok": {
"message": "已授予權限。您可以按一下此處關閉此分頁並返回主視窗。"
@@ -845,7 +845,7 @@
"message": "如果在選項或提示中指定了專案,則不會使用臨時聊天。"
},
"Anthropic_Models_Error_fetching": {
- "message": "嘗試取得 Anthropic 模型時出錯"
+ "message": "嘗試取得 Claude 模型時出錯"
},
"_api_connecting": {
"message": "嘗試使用以下配置連接到 $api_string$...",
@@ -856,10 +856,10 @@
}
},
"anthropic_empty_model": {
- "message": "您尚未選擇 Anthropic API 的模型。請在選項頁面中選擇一個。"
+ "message": "您尚未選擇 Claude API 的模型。請在選項頁面中選擇一個。"
},
"anthropic_empty_version": {
- "message": "您尚未新增 Anthropic API 的版本字串。請在選項頁面中輸入一個。"
+ "message": "您尚未新增 Claude API 的版本字串。請在選項頁面中輸入一個。"
},
"ChatGPT_chatgpt_api_store_info": {
"message": "如果勾選,您的聊天記錄將由 OpenAI 儲存。"
@@ -916,7 +916,7 @@
"message": "自動新增標籤"
},
"anthropic_empty_apikey": {
- "message": "您尚未新增 Anthropic API 的 API 金鑰。請在選項頁面中輸入一個。"
+ "message": "您尚未新增 Claude API 的 API 金鑰。請在選項頁面中輸入一個。"
},
"prefs_OpenAIComp_ForceModel": {
"message": "手動輸入模型"
@@ -928,7 +928,7 @@
"message": "管理任務設定"
},
"Anthropic_Version": {
- "message": "Anthropic API 版本"
+ "message": "Claude API 版本"
},
"prefs_OptionText_spamfilter": {
"message": "自動垃圾郵件過濾器"
@@ -937,7 +937,7 @@
"message": "已移到垃圾郵件"
},
"prefs_OptionText_anthropic_max_tokens": {
- "message": "Anthropic 最大 Token 數"
+ "message": "Claude 最大 Token 數"
},
"prefs_OpenAIComp_API_Key": {
"message": "OpenAI 相容 API 金鑰"
diff --git a/api_webchat/controller.js b/api_webchat/controller.js
index 7434816e..43d8211a 100644
--- a/api_webchat/controller.js
+++ b/api_webchat/controller.js
@@ -20,6 +20,7 @@
* The original code has been released under the Apache License, Version 2.0.
*/
+import { prefs_default } from '../options/mzta-options-default.js';
import { placeholdersUtils } from '../js/mzta-placeholders.js';
import { getAPIsInitMessageString, convertNewlinesToBr } from '../js/mzta-utils.js';
@@ -28,6 +29,8 @@ 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');
+const prompt_id = urlParams.get('prompt_id');
+const prompt_name = urlParams.get('prompt_name');
// Data received from the user
let promptData = null;
@@ -73,24 +76,52 @@ messageInput.setMessagesArea(messagesArea);
switch (llm) {
case "chatgpt_api": {
- let prefs_api = await browser.storage.sync.get({chatgpt_api_key: '', chatgpt_model: '', chatgpt_developer_messages:'', chatgpt_api_store: false, do_debug: false});
+ let prefs_api = await browser.storage.sync.get({
+ chatgpt_api_key: prefs_default.chatgpt_api_key,
+ chatgpt_model: prefs_default.chatgpt_model,
+ chatgpt_developer_messages: prefs_default.chatgpt_developer_messages,
+ chatgpt_api_store: prefs_default.chatgpt_api_store,
+ do_debug: prefs_default.do_debug,
+ });
let i18nStrings = {};
i18nStrings["chatgpt_api_request_failed"] = browser.i18n.getMessage('chatgpt_api_request_failed');
i18nStrings["error_connection_interrupted"] = browser.i18n.getMessage('error_connection_interrupted');
messageInput.setModel(prefs_api.chatgpt_model);
messagesArea.setLLMName("ChatGPT");
- worker.postMessage({ type: 'init', chatgpt_api_key: prefs_api.chatgpt_api_key, chatgpt_model: prefs_api.chatgpt_model, chatgpt_developer_messages: prefs_api.chatgpt_developer_messages, chatgpt_api_store: prefs_api.chatgpt_api_store, do_debug: prefs_api.do_debug, i18nStrings: i18nStrings});
+ worker.postMessage({
+ type: 'init',
+ chatgpt_api_key: prefs_api.chatgpt_api_key,
+ chatgpt_model: prefs_api.chatgpt_model,
+ chatgpt_developer_messages: prefs_api.chatgpt_developer_messages,
+ chatgpt_api_store: prefs_api.chatgpt_api_store,
+ do_debug: prefs_api.do_debug,
+ i18nStrings: i18nStrings,
+ });
let additional_text_elements = [];
additional_text_elements.push({label: 'OpenAI Store', value: (prefs_api.chatgpt_api_store ? 'Yes' : 'No')});
if(prefs_api.chatgpt_developer_messages && prefs_api.chatgpt_developer_messages.length > 0) {
additional_text_elements.push({label: browser.i18n.getMessage("ChatGPT_Developer_Messages"), value: prefs_api.chatgpt_developer_messages});
}
- messagesArea.appendUserMessage(getAPIsInitMessageString("ChatGPT API", prefs_api.chatgpt_model, '', '', additional_text_elements), "info");
- browser.runtime.sendMessage({command: "openai_api_ready_" + call_id, window_id: (await browser.windows.getCurrent()).id});
+ additional_text_elements.push({label: "Prompt", value: '[' + prompt_id + '] ' + decodeURIComponent(prompt_name)});
+ messagesArea.appendUserMessage(getAPIsInitMessageString({
+ api_string: "ChatGPT API",
+ model_string: prefs_api.chatgpt_model,
+ additional_messages: additional_text_elements
+ }), "info");
+ browser.runtime.sendMessage({
+ command: "openai_api_ready_" + call_id,
+ window_id: (await browser.windows.getCurrent()).id
+ });
break;
}
case "google_gemini_api": {
- let prefs_api = await browser.storage.sync.get({google_gemini_api_key: '', google_gemini_model: '', google_gemini_system_instruction: '', do_debug: false});
+ let prefs_api = await browser.storage.sync.get({
+ google_gemini_api_key: prefs_default.google_gemini_api_key,
+ google_gemini_model: prefs_default.google_gemini_model,
+ google_gemini_system_instruction: prefs_default.google_gemini_system_instruction,
+ google_gemini_thinking_budget: prefs_default.google_gemini_thinking_budget,
+ do_debug: prefs_default.do_debug,
+ });
let i18nStrings = {};
i18nStrings["google_gemini_api_request_failed"] = browser.i18n.getMessage('google_gemini_api_request_failed');
i18nStrings["error_connection_interrupted"] = browser.i18n.getMessage('error_connection_interrupted');
@@ -100,45 +131,135 @@ switch (llm) {
if(prefs_api.google_gemini_system_instruction && prefs_api.google_gemini_system_instruction.length > 0) {
additional_text_elements.push({label: browser.i18n.getMessage("GoogleGemini_SystemInstruction"), value: prefs_api.google_gemini_system_instruction});
}
- worker.postMessage({ type: 'init', google_gemini_api_key: prefs_api.google_gemini_api_key, google_gemini_model: prefs_api.google_gemini_model, google_gemini_system_instruction: prefs_api.google_gemini_system_instruction, do_debug: prefs_api.do_debug, i18nStrings: i18nStrings});
- messagesArea.appendUserMessage(getAPIsInitMessageString("Google Gemini API", prefs_api.google_gemini_model, '', '', additional_text_elements), "info");
- browser.runtime.sendMessage({command: "google_gemini_api_ready_" + call_id, window_id: (await browser.windows.getCurrent()).id});
+ additional_text_elements.push({label: 'Thinking Budget', value: prefs_api.google_gemini_thinking_budget});
+ additional_text_elements.push({label: "Prompt", value: '[' + prompt_id + '] ' + decodeURIComponent(prompt_name)});
+ worker.postMessage({
+ type: 'init',
+ google_gemini_api_key: prefs_api.google_gemini_api_key,
+ google_gemini_model: prefs_api.google_gemini_model,
+ google_gemini_system_instruction: prefs_api.google_gemini_system_instruction,
+ google_gemini_thinking_budget: prefs_api.google_gemini_thinking_budget,
+ do_debug: prefs_api.do_debug,
+ i18nStrings: i18nStrings,
+ });
+ messagesArea.appendUserMessage(getAPIsInitMessageString({
+ api_string: "Google Gemini API",
+ model_string: prefs_api.google_gemini_model,
+ additional_messages: additional_text_elements
+ }), "info");
+ browser.runtime.sendMessage({
+ command: "google_gemini_api_ready_" + call_id,
+ window_id: (await browser.windows.getCurrent()).id
+ });
break;
}
case "ollama_api": {
- let prefs_api = await browser.storage.sync.get({ollama_host: '', ollama_model: '', ollama_num_ctx: 0, ollama_think: false, do_debug: false});
+ let prefs_api = await browser.storage.sync.get({
+ ollama_host: prefs_default.ollama_host,
+ ollama_model: prefs_default.ollama_model,
+ ollama_num_ctx: prefs_default.ollama_num_ctx,
+ ollama_think: prefs_default.ollama_think,
+ do_debug: prefs_default.do_debug,
+ });
let i18nStrings = {};
i18nStrings["ollama_api_request_failed"] = browser.i18n.getMessage('ollama_api_request_failed');
i18nStrings["error_connection_interrupted"] = browser.i18n.getMessage('error_connection_interrupted');
messageInput.setModel(prefs_api.ollama_model);
messagesArea.setLLMName("Ollama Local");
- worker.postMessage({ type: 'init', ollama_host: prefs_api.ollama_host, ollama_model: prefs_api.ollama_model, ollama_num_ctx: prefs_api.ollama_num_ctx, ollama_think: prefs_api.ollama_think, do_debug: prefs_api.do_debug, i18nStrings: i18nStrings});
- browser.runtime.sendMessage({command: "ollama_api_ready_" + call_id, window_id: (await browser.windows.getCurrent()).id});
- messagesArea.appendUserMessage(getAPIsInitMessageString("Ollama API", prefs_api.ollama_model, prefs_api.ollama_host), "info");
+ worker.postMessage({
+ type: 'init',
+ ollama_host: prefs_api.ollama_host,
+ ollama_model: prefs_api.ollama_model,
+ ollama_num_ctx: prefs_api.ollama_num_ctx,
+ ollama_think: prefs_api.ollama_think,
+ do_debug: prefs_api.do_debug,
+ i18nStrings: i18nStrings
+ });
+ browser.runtime.sendMessage({
+ command: "ollama_api_ready_" + call_id,
+ window_id: (await browser.windows.getCurrent()).id
+ });
+ let additional_text_elements = [];
+ additional_text_elements.push({label: "Prompt", value: '[' + prompt_id + '] ' + decodeURIComponent(prompt_name)});
+ messagesArea.appendUserMessage(getAPIsInitMessageString({
+ api_string: "Ollama API",
+ model_string: prefs_api.ollama_model,
+ host_string: prefs_api.ollama_host,
+ additional_messages: additional_text_elements
+ }), "info");
break;
}
case "openai_comp_api": {
- let prefs_api = await browser.storage.sync.get({openai_comp_host: '', openai_comp_model: '', openai_comp_api_key: '', openai_comp_use_v1: true, openai_comp_chat_name: '', do_debug: false});
+ let prefs_api = await browser.storage.sync.get({
+ openai_comp_host: prefs_default.openai_comp_host,
+ openai_comp_model: prefs_default.openai_comp_model,
+ openai_comp_api_key: prefs_default.openai_comp_api_key,
+ openai_comp_use_v1: prefs_default.openai_comp_use_v1,
+ openai_comp_chat_name: prefs_default.openai_comp_chat_name,
+ do_debug: prefs_default.do_debug,
+ });
let i18nStrings = {};
i18nStrings["OpenAIComp_api_request_failed"] = browser.i18n.getMessage('OpenAIComp_api_request_failed');
i18nStrings["error_connection_interrupted"] = browser.i18n.getMessage('error_connection_interrupted');
messageInput.setModel(prefs_api.openai_comp_model);
messagesArea.setLLMName(prefs_api.openai_comp_chat_name);
- worker.postMessage({ type: 'init', openai_comp_host: prefs_api.openai_comp_host, openai_comp_model: prefs_api.openai_comp_model, openai_comp_api_key: prefs_api.openai_comp_api_key, openai_comp_use_v1: prefs_api.openai_comp_use_v1, do_debug: prefs_api.do_debug, i18nStrings: i18nStrings});
- messagesArea.appendUserMessage(getAPIsInitMessageString("OpenAI Compatible API", prefs_api.openai_comp_model, prefs_api.openai_comp_host), "info");
- browser.runtime.sendMessage({command: "openai_comp_api_ready_" + call_id, window_id: (await browser.windows.getCurrent()).id});
+ worker.postMessage({
+ type: 'init',
+ openai_comp_host: prefs_api.openai_comp_host,
+ openai_comp_model: prefs_api.openai_comp_model,
+ openai_comp_api_key: prefs_api.openai_comp_api_key,
+ openai_comp_use_v1: prefs_api.openai_comp_use_v1,
+ do_debug: prefs_api.do_debug,
+ i18nStrings: i18nStrings,
+ });
+ let additional_text_elements = [];
+ additional_text_elements.push({label: "Prompt", value: '[' + prompt_id + '] ' + decodeURIComponent(prompt_name)});
+ messagesArea.appendUserMessage(getAPIsInitMessageString({
+ api_string: "OpenAI Compatible API",
+ model_string: prefs_api.openai_comp_model,
+ host_string: prefs_api.openai_comp_host,
+ additional_messages: additional_text_elements
+ }), "info");
+ browser.runtime.sendMessage({
+ command: "openai_comp_api_ready_" + call_id,
+ window_id: (await browser.windows.getCurrent()).id
+ });
break;
}
case "anthropic_api": {
- let prefs_api = await browser.storage.sync.get({anthropic_api_key: '', anthropic_model: '', anthropic_version: '2023-06-01', anthropic_max_tokens: 4096, do_debug: false});
+ let prefs_api = await browser.storage.sync.get({
+ anthropic_api_key: prefs_default.anthropic_api_key,
+ anthropic_model: prefs_default.anthropic_model,
+ anthropic_version: prefs_default.anthropic_version,
+ anthropic_max_tokens: prefs_default.anthropic_max_tokens,
+ do_debug: prefs_default.do_debug,
+ });
let i18nStrings = {};
i18nStrings["anthropic_api_request_failed"] = browser.i18n.getMessage('anthropic_api_request_failed');
i18nStrings["error_connection_interrupted"] = browser.i18n.getMessage('error_connection_interrupted');
messageInput.setModel(prefs_api.anthropic_model);
messagesArea.setLLMName("Anthropic");
- worker.postMessage({ type: 'init', anthropic_api_key: prefs_api.anthropic_api_key, anthropic_model: prefs_api.anthropic_model, anthropic_version: prefs_api.anthropic_version, anthropic_max_tokens: prefs_api.anthropic_max_tokens, do_debug: prefs_api.do_debug, i18nStrings: i18nStrings});
- messagesArea.appendUserMessage(getAPIsInitMessageString("Anthropic API", prefs_api.anthropic_model, '', prefs_api.anthropic_version), "info");
- browser.runtime.sendMessage({command: "anthropic_api_ready_" + call_id, window_id: (await browser.windows.getCurrent()).id});
+ worker.postMessage({
+ type: 'init',
+ anthropic_api_key: prefs_api.anthropic_api_key,
+ anthropic_model: prefs_api.anthropic_model,
+ anthropic_version: prefs_api.anthropic_version,
+ anthropic_max_tokens: prefs_api.anthropic_max_tokens,
+ do_debug: prefs_api.do_debug,
+ i18nStrings: i18nStrings,
+ });
+ let additional_text_elements = [];
+ additional_text_elements.push({label: "Prompt", value: '[' + prompt_id + '] ' + decodeURIComponent(prompt_name)});
+ messagesArea.appendUserMessage(getAPIsInitMessageString({
+ api_string: "Claude API",
+ model_string: prefs_api.anthropic_model,
+ version_string: prefs_api.anthropic_version,
+ additional_messages: additional_text_elements
+ }), "info");
+ browser.runtime.sendMessage({
+ command: "anthropic_api_ready_" + call_id,
+ window_id: (await browser.windows.getCurrent()).id
+ });
break;
}
}
@@ -191,7 +312,11 @@ browser.runtime.onMessage.addListener((message, sender, sendResponse) => {
// we have the additional_text placeholder, do the magic!
let finalSubs = {};
finalSubs["additional_text"] = userInput;
- promptData.prompt = placeholdersUtils.replacePlaceholders(promptData.prompt, finalSubs, ph_def_val==='1')
+ promptData.prompt = placeholdersUtils.replacePlaceholders({
+ text: promptData.prompt,
+ replacements: finalSubs,
+ use_default_value: ph_def_val==='1'
+ })
}
sendPrompt(promptData);
}
@@ -206,4 +331,4 @@ browser.runtime.onMessage.addListener((message, sender, sendResponse) => {
function sendPrompt(message){
messageInput._setMessageInputValue(convertNewlinesToBr(message.prompt));
messageInput._handleNewChatMessage();
-}
\ No newline at end of file
+}
diff --git a/api_webchat/messagesArea.js b/api_webchat/messagesArea.js
index eb61eca0..3696dbe2 100644
--- a/api_webchat/messagesArea.js
+++ b/api_webchat/messagesArea.js
@@ -20,6 +20,7 @@
* The original code has been released under the Apache License, Version 2.0.
*/
+import { prefs_default } from '../options/mzta-options-default.js';
const messagesAreaTemplate = document.createElement('template');
const messagesAreaStyle = document.createElement('style');
@@ -383,7 +384,7 @@ class MessagesArea extends HTMLElement {
splitButton.appendChild(actionButton);
const fullTextHTMLAtAssignment = this.fullTextHTML.trim().replace(/^"|"$/g, '').replace(/^"/, '
').replace(/"<\/p>$/, '
'); // strip quotation marks
//console.log(">>>>>>>>>>>> fullTextHTMLAtAssignment: " + fullTextHTMLAtAssignment);
- let reply_type_pref = await browser.storage.sync.get({reply_type: 'reply_all'});
+ let reply_type_pref = await browser.storage.sync.get({ reply_type: prefs_default.reply_type });
if((promptData.action == "1") && (promptData.mailMessageId != -1)) {
const actionButton_line2 = document.createElement('span');
actionButton_line2.classList.add('action_btn_info');
@@ -613,4 +614,4 @@ function removeAloneBRs(htmlString) {
});
return doc.body.innerHTML;
-}
\ No newline at end of file
+}
diff --git a/images/autotags.png b/images/autotags.png
new file mode 100644
index 00000000..7490e48e
Binary files /dev/null and b/images/autotags.png differ
diff --git a/images/spamfilter.png b/images/spamfilter.png
new file mode 100644
index 00000000..a068ef4e
Binary files /dev/null and b/images/spamfilter.png differ
diff --git a/js/api/anthropic.js b/js/api/anthropic.js
index 662b45df..1f03b571 100644
--- a/js/api/anthropic.js
+++ b/js/api/anthropic.js
@@ -27,7 +27,13 @@ export class Anthropic {
max_tokens = 4096;
stream = false;
- constructor(apiKey, version, model, max_tokens = 4096, stream = false) {
+ constructor({
+ apiKey = '',
+ version = '',
+ model = '',
+ max_tokens = 4096,
+ stream = false,
+ } = {}) {
this.apiKey = apiKey;
this.version = version;
this.model = model;
@@ -49,7 +55,7 @@ export class Anthropic {
if (!response.ok) {
const errorDetail = await response.text();
- let err_msg = "[ThunderAI] Anthropic API request failed: " + response.status + " " + response.statusText + ", Detail: " + errorDetail;
+ let err_msg = "[ThunderAI] Claude API request failed: " + response.status + " " + response.statusText + ", Detail: " + errorDetail;
console.error(err_msg);
let output = {};
output.ok = false;
@@ -64,11 +70,11 @@ export class Anthropic {
return output;
}catch (error) {
- console.error("[ThunderAI] Anthropic API request failed: " + error);
+ console.error("[ThunderAI] Claude API request failed: " + error);
let output = {};
output.is_exception = true;
output.ok = false;
- output.error = "Anthropic API request failed: " + error;
+ output.error = "Claude API request failed: " + error;
return output;
}
}
@@ -95,13 +101,13 @@ export class Anthropic {
});
return response;
}catch (error) {
- console.error("[ThunderAI] Anthropic API request failed: " + error);
+ console.error("[ThunderAI] Claude API request failed: " + error);
let output = {};
output.is_exception = true;
output.ok = false;
- output.error = "Anthropic API request failed: " + error;
+ output.error = "Claude API request failed: " + error;
return output;
}
}
-}
\ No newline at end of file
+}
diff --git a/js/api/google_gemini.js b/js/api/google_gemini.js
index d0d8a055..f2e2eb67 100644
--- a/js/api/google_gemini.js
+++ b/js/api/google_gemini.js
@@ -24,12 +24,26 @@ export class GoogleGemini {
model = '';
system_instruction = '';
stream = false;
+ thinking_budget = ''; // Model default
- constructor(apiKey, model, system_instruction, stream) {
+ constructor({
+ apiKey = '',
+ model = '',
+ system_instruction = '',
+ stream = false,
+ thinking_budget = '',
+ } = {}) {
this.apiKey = apiKey;
this.model = model;
this.system_instruction = system_instruction;
this.stream = stream;
+ this.thinking_budget = String(thinking_budget ?? '').trim();
+ /* Info from: https://ai.google.dev/gemini-api/docs/thinking?#set-budget
+ # Turn on thinking with a specific token limit: "thinking_budget": 1024
+ # Thinking off: "thinking_budget": 0
+ # Turn on dynamic thinking: "thinking_budget": -1
+ # Keep model default thinking: "thinking_budget": ""
+ */
}
@@ -83,7 +97,15 @@ export class GoogleGemini {
parts:{
text: this.system_instruction
}
- }
+ };
+ }
+
+ if(this.thinking_budget !== '') {
+ google_gemini_body.generationConfig = {
+ thinkingConfig: {
+ thinking_budget: this.thinking_budget,
+ }
+ };
}
// console.log("[ThunderAI] Google Gemini API request: " + JSON.stringify(google_gemini_body));
diff --git a/js/api/ollama.js b/js/api/ollama.js
index 5c10763a..9a4be836 100644
--- a/js/api/ollama.js
+++ b/js/api/ollama.js
@@ -24,8 +24,14 @@ export class Ollama {
num_ctx = 0;
think = false;
- constructor(host, model, stream = false, num_ctx = 0, think = false) {
- this.host = host.trim().replace(/\/+$/, "");
+ constructor({
+ host = '',
+ model = '',
+ stream = false,
+ num_ctx = 0,
+ think = false,
+ } = {}) {
+ this.host = (host || '').trim().replace(/\/+$/, "");
this.model = model;
this.stream = stream;
this.num_ctx = num_ctx;
@@ -123,4 +129,4 @@ export class Ollama {
// return output;
// }
// }
-}
\ No newline at end of file
+}
diff --git a/js/api/openai.js b/js/api/openai.js
index 11884e7e..6d589c4c 100644
--- a/js/api/openai.js
+++ b/js/api/openai.js
@@ -27,7 +27,13 @@ export class OpenAI {
stream = false;
store = false;
- constructor(apiKey, model, developer_messages, stream, store) {
+ constructor({
+ apiKey = '',
+ model = '',
+ developer_messages = '',
+ stream = false,
+ store = false
+ } = {}) {
this.apiKey = apiKey;
this.model = model;
this.developer_messages = developer_messages;
@@ -120,4 +126,4 @@ export class OpenAI {
return data.token_count;
}
-}
\ No newline at end of file
+}
diff --git a/js/api/openai_comp.js b/js/api/openai_comp.js
index a0ba14ec..3e975b62 100644
--- a/js/api/openai_comp.js
+++ b/js/api/openai_comp.js
@@ -27,8 +27,14 @@ export class OpenAIComp {
use_v1 = true;
stream = false;
- constructor(host, model, apiKey = '', stream = false, use_v1 = true) {
- this.host = host.trim().replace(/\/+$/, "");
+ constructor({
+ host = '',
+ model = '',
+ apiKey = '',
+ stream = false,
+ use_v1 = true,
+ } = {}) {
+ this.host = (host || '').trim().replace(/\/+$/, "");
this.model = model;
this.stream = stream;
this.apiKey = apiKey;
@@ -107,4 +113,4 @@ export class OpenAIComp {
}
}
-}
\ No newline at end of file
+}
diff --git a/js/api/openai_comp_configs.js b/js/api/openai_comp_configs.js
index cffb2fba..35ce9cd9 100644
--- a/js/api/openai_comp_configs.js
+++ b/js/api/openai_comp_configs.js
@@ -32,6 +32,13 @@ export const openAICompConfigs = [
host: '',
use_v1: true,
},
+ {
+ id: 'deepseek',
+ name: 'DeepSeek API',
+ chat_name: 'DeepSeek',
+ host: 'https://api.deepseek.com',
+ use_v1: false,
+ },
{
id: 'grok',
name: 'Grok API',
diff --git a/js/mzta-chatgpt.js b/js/mzta-chatgpt.js
index 822c4d32..9eef407a 100644
--- a/js/mzta-chatgpt.js
+++ b/js/mzta-chatgpt.js
@@ -29,6 +29,7 @@ let current_tabId = null;
let current_mailMessageId = null;
let selectionChangeTimeout = null;
let isDragging = false;
+let delay_wait_completion = 7000; // milliseconds
async function chatgpt_sendMsg(msg, method ='') { // return -1 send button not found, -2 textarea not found
let textArea = document.getElementById('prompt-textarea')
@@ -77,9 +78,10 @@ async function chatgpt_sendMsg(msg, method ='') { // return -1 send button
async function chatgpt_isIdle() {
return new Promise(resolve => {
const intervalId = setInterval(() => {
- if (chatgpt_getRegenerateButton() || do_force_completion) {
- clearInterval(intervalId); resolve(true);
-}}, 100);});}
+ if (chatgpt_getRegenerateButton() || do_force_completion) {
+ clearInterval(intervalId); resolve(true);
+ }
+ }, 100);});}
function chatgpt_getRegenerateButton() {
for (const mainSVG of document.querySelectorAll('main svg.icon')) {
@@ -132,6 +134,9 @@ function addCustomDiv(prompt_action,tabId,mailMessageId) {
style.textContent += "#mzta-btn_close_diff{position:absolute;bottom:10px;left:50%;transform:translateX(-50%);}";
style.textContent += "#mzta-btn_change_reply_type{padding-left:4px;padding-right:10px;margin-left:0px;border-bottom-left-radius:0px;border-top-left-radius:0px;height:2.7em;}";
style.textContent += ".mzta-btn_reply{padding-right:4px;margin-right:0px;border-bottom-right-radius:0px;border-top-right-radius:0px;}";
+ style.textContent += "#mzta-forcecomp-hint{display:none;position:fixed;bottom:30px;right:90px;width:20em;background: #c3cefeff;color: #111827;padding:10px 14px;border-radius:12px;box-shadow:0 4px 10px rgba(0,0,0,.2);font-size:14px;font-weight:bold;z-index:2000;pointer:default;}";
+ style.textContent += "#mzta-forcecomp-hint .label{display:block;line-height:1.3;}";
+ style.textContent += "#mzta-forcecomp-hint svg{position:absolute;bottom:-10px;right:-20px;width:40px;height:40px;}";
// Add