The {%mail_tags%} data placeholder has been renamed to {%tags_current_email%}
This commit is contained in:
parent
16ca1007d8
commit
e7c0fa5f6f
10 changed files with 19 additions and 19 deletions
|
|
@ -10,7 +10,7 @@
|
|||
<li><i>[ChatGPT API][Ollama API][OpenAI Comp API]</i> Added a special prompt to apply tag to emails [<a href="https://github.com/micz/ThunderAI/issues/183">#183</a>].</li>
|
||||
<li>Default prompts text has been translated [<a href="https://github.com/micz/ThunderAI/issues/185">#185</a>].</li>
|
||||
<li>Data placeholder <i>{%full_tags_list%}</i> for the full available tags list added [<a href="https://github.com/micz/ThunderAI/issues/197">#197</a>].</li>
|
||||
<li>Data placeholder <i>{%mail_tags%}</i> for the single mail tags list added [<a href="https://github.com/micz/ThunderAI/issues/198">#198</a>].</li>
|
||||
<li>Data placeholder <i>{%tags_current_email%}</i> for the single mail tags list added [<a href="https://github.com/micz/ThunderAI/issues/198">#198</a>].</li>
|
||||
<li>User <a href="https://forms.gle/1qK2wcbuhaRzhwyt9">survey link</a> added [<a href="https://github.com/micz/ThunderAI/issues/202">#202</a>].</li>
|
||||
<li><i>[OpenAI Comp API]</i> Added a button in the options page to manually insert the model [<a href="https://github.com/micz/ThunderAI/issues/205">#205</a>].</li>
|
||||
<li>Polish (pl) translation added, thanks to <a href="https://github.com/neexpl">neexpl</a>.</li>
|
||||
|
|
|
|||
|
|
@ -763,7 +763,7 @@
|
|||
"message": "Analysieren Sie den folgenden E-Mail-Text und erstellen Sie eine durch Kommas getrennte Liste von Tags, die den Inhalt zusammenfassen. Verwenden Sie Themen, Hauptthemen und relevante Beschreibungen als Tags. Stellen Sie sicher, dass die Tags prägnant und relevant für den Inhalt der E-Mail sind. E-Mail-Text: {%mail_text_body%} Berücksichtigen Sie die folgenden Details als Kontext: - Absender: {%author%} - Empfänger: {%recipients%} - CC-Liste: {%cc_list%} - E-Mail-Betreff: {%mail_subject%} Bitte basieren Sie Ihre Tags auf dem Text und Kontext der E-Mail und ignorieren Sie unnötige Informationen oder triviale Details. Die Ausgabe sollte nur eine Liste von durch Kommas getrennten Tags ohne zusätzlichen Kommentar oder Text sein.",
|
||||
"description": ""
|
||||
},
|
||||
"placeholder_mail_tags": {
|
||||
"placeholder_tags_current_email": {
|
||||
"message": "E-Mail-Tags",
|
||||
"description": ""
|
||||
},
|
||||
|
|
|
|||
|
|
@ -763,7 +763,7 @@
|
|||
"message": "Analyze the following email text and generate a comma-separated list of tags that summarize its content. Use themes, key topics, and relevant descriptors as tags. Ensure the tags are concise and relevant to the email's content.\nEmail text: {%mail_text_body%}\nConsider the following details for context:\n- Sender: {%author%}\n- Recipients: {%recipients%}\n- CC list: {%cc_list%}\n- Email subject: {%mail_subject%}\nPlease base your tags on the email's text and context, ignoring unnecessary information or trivial details. The output should be only a list of comma separated tags without any additional comment or text.",
|
||||
"description": ""
|
||||
},
|
||||
"placeholder_mail_tags": {
|
||||
"placeholder_tags_current_email": {
|
||||
"message": "Mail tags",
|
||||
"description": ""
|
||||
},
|
||||
|
|
|
|||
|
|
@ -763,7 +763,7 @@
|
|||
"message": "Analysez le texte de courriel suivant et générez une liste de tags séparés par des virgules qui résument son contenu. Utilisez des thèmes, des sujets clés et des descripteurs pertinents comme tags. Assurez-vous que les tags soient concis et pertinents pour le contenu du courriel. Texte du courriel : {%mail_text_body%} Considérez les détails suivants pour le contexte : - Expéditeur : {%author%} - Destinataires : {%recipients%} - Liste CC : {%cc_list%} - Sujet du courriel : {%mail_subject%} Veuillez baser vos tags sur le texte et le contexte du courriel, en ignorant les informations inutiles ou triviales. La sortie doit être uniquement une liste de tags séparés par des virgules, sans aucun commentaire ou texte supplémentaire.",
|
||||
"description": ""
|
||||
},
|
||||
"placeholder_mail_tags": {
|
||||
"placeholder_tags_current_email": {
|
||||
"message": "Tags de courriels",
|
||||
"description": ""
|
||||
},
|
||||
|
|
|
|||
|
|
@ -763,7 +763,7 @@
|
|||
"message": "Analizza il seguente testo email e genera una lista di tag separati da virgole che ne riassumano il contenuto. Usa temi, argomenti principali e descrittori pertinenti come tag. Assicurati che i tag siano concisi e rilevanti per il contenuto dell'email. Testo email: {%mail_text_body%} Considera i seguenti dettagli come contesto: - Mittente: {%author%} - Destinatari: {%recipients%} - Lista CC: {%cc_list%} - Oggetto dell'email: {%mail_subject%} Basa i tuoi tag sul testo e sul contesto dell'email, ignorando informazioni superflue o dettagli banali. L'output dovrebbe essere solo un elenco di tag separati da virgole, senza alcun commento o testo aggiuntivo.",
|
||||
"description": ""
|
||||
},
|
||||
"placeholder_mail_tags": {
|
||||
"placeholder_tags_current_email": {
|
||||
"message": "Tag delle email",
|
||||
"description": ""
|
||||
},
|
||||
|
|
|
|||
|
|
@ -763,7 +763,7 @@
|
|||
"message": "Przeanalizuj poniższy tekst e-maila i wygeneruj listę tagów oddzielonych przecinkami, które podsumowują jego treść. Użyj tematów, kluczowych zagadnień i odpowiednich opisów jako tagów. Upewnij się, że tagi są zwięzłe i odpowiednie do treści e-maila. Tekst e-maila: {%mail_text_body%} Weź pod uwagę następujące szczegóły w kontekście: - Nadawca: {%author%} - Odbiorcy: {%recipients%} - Lista DW: {%cc_list%} - Temat e-maila: {%mail_subject%} Oprzyj swoje tagi na treści i kontekście e-maila, ignorując zbędne informacje lub nieistotne szczegóły. Wynik powinien być jedynie listą tagów oddzielonych przecinkami, bez żadnych dodatkowych komentarzy ani tekstu.",
|
||||
"description": ""
|
||||
},
|
||||
"placeholder_mail_tags": {
|
||||
"placeholder_tags_current_email": {
|
||||
"message": "Tagi e-maila",
|
||||
"description": ""
|
||||
},
|
||||
|
|
|
|||
|
|
@ -763,7 +763,7 @@
|
|||
"message": "Analise o seguinte texto do e-mail e gere uma lista de tags separadas por vírgulas que resumam seu conteúdo. Use temas, tópicos principais e descritores relevantes como tags. Certifique-se de que as tags sejam concisas e relevantes para o conteúdo do e-mail. Texto do e-mail: {%mail_text_body%} Considere os seguintes detalhes como contexto: - Remetente: {%author%} - Destinatários: {%recipients%} - Lista CC: {%cc_list%} - Assunto do e-mail: {%mail_subject%} Baseie suas tags no texto e contexto do e-mail, ignorando informações desnecessárias ou triviais. A saída deve ser apenas uma lista de tags separadas por vírgulas, sem nenhum comentário ou texto adicional.",
|
||||
"description": ""
|
||||
},
|
||||
"placeholder_mail_tags": {
|
||||
"placeholder_tags_current_email": {
|
||||
"message": "Tags do e-mail",
|
||||
"description": ""
|
||||
},
|
||||
|
|
|
|||
|
|
@ -169,9 +169,9 @@ export class mzta_Menus {
|
|||
case 'junk_score':
|
||||
finalSubs['junk_score'] = curr_message.junkScore;
|
||||
break;
|
||||
case 'mail_tags':
|
||||
let mail_tags_array = await transformTagsLabels(curr_message.tags, full_tags_list[1]);
|
||||
finalSubs['mail_tags'] = mail_tags_array.join(", ");
|
||||
case 'tags_current_email':
|
||||
let tags_current_email_array = await transformTagsLabels(curr_message.tags, full_tags_list[1]);
|
||||
finalSubs['tags_current_email'] = tags_current_email_array.join(", ");
|
||||
break;
|
||||
case 'full_tags_list':
|
||||
finalSubs['full_tags_list'] = full_tags_list[0];
|
||||
|
|
@ -207,7 +207,7 @@ export class mzta_Menus {
|
|||
if(curr_prompt.is_special == '1'){ // Special prompts
|
||||
switch(curr_prompt.id){
|
||||
case 'prompt_add_tags': // Add tags to the email
|
||||
let mail_tags = '';
|
||||
let tags_current_email = '';
|
||||
let prefs_at = await browser.storage.sync.get({add_tags_maxnum: 3, connection_type: '', add_tags_force_lang: true, default_chatgpt_lang: ''});
|
||||
if((prefs_at.connection_type === '')||(prefs_at.connection_type === null)||(prefs_at.connection_type === undefined)||(prefs_at.connection_type === 'chatgpt_web')){
|
||||
console.error("[ThunderAI | AddTags] Invalid connection type: " + prefs_at.connection_type);
|
||||
|
|
@ -223,20 +223,20 @@ export class mzta_Menus {
|
|||
this.logger.log("fullPrompt: " + fullPrompt);
|
||||
// TODO: use the current API, abort if using chatgpt web
|
||||
// COMMENTED TO DO TESTS
|
||||
// mail_tags = "recipients, TEST, home, work, CAR, light";
|
||||
// tags_current_email = "recipients, TEST, home, work, CAR, light";
|
||||
let cmd_addTags = new mzta_specialCommand_AddTags(fullPrompt,prefs_at.connection_type,true);
|
||||
await cmd_addTags.initWorker();
|
||||
try{
|
||||
mail_tags = await cmd_addTags.sendPrompt();
|
||||
// console.log(">>>>>>>>>>> mail_tags: " + mail_tags);
|
||||
tags_current_email = await cmd_addTags.sendPrompt();
|
||||
// console.log(">>>>>>>>>>> tags_current_email: " + tags_current_email);
|
||||
}catch(err){
|
||||
console.error("[ThunderAI] Error getting tags: ", err);
|
||||
browser.tabs.sendMessage(tabs[0].id, { command: "sendAlert", curr_tab_type: tabs[0].type, message: "Error getting tags: " + err });
|
||||
return {ok:'0'};
|
||||
}
|
||||
this.logger.log("mail_tags: " + mail_tags);
|
||||
this.logger.log("tags_current_email: " + tags_current_email);
|
||||
console.log(">>>>>>>>>>>> full_tags_list: " + JSON.stringify(full_tags_list));
|
||||
browser.tabs.sendMessage(tabs[0].id, {command: "getTags", tags: mail_tags, messageId: curr_message.id});
|
||||
browser.tabs.sendMessage(tabs[0].id, {command: "getTags", tags: tags_current_email, messageId: curr_message.id});
|
||||
return {ok:'1'};
|
||||
break;
|
||||
default:
|
||||
|
|
|
|||
|
|
@ -97,8 +97,8 @@ const defaultPlaceholders = [
|
|||
is_default: "1",
|
||||
},
|
||||
{
|
||||
id: 'mail_tags',
|
||||
name: "__MSG_placeholder_mail_tags__",
|
||||
id: 'tags_current_email',
|
||||
name: "__MSG_placeholder_tags_current_email__",
|
||||
default_value: "",
|
||||
type: 0,
|
||||
is_default: "1",
|
||||
|
|
|
|||
|
|
@ -12,7 +12,7 @@
|
|||
<li><i>[ChatGPT API][Ollama API][OpenAI Comp API]</i> Added a special prompt to apply tag to emails [<a href="https://github.com/micz/ThunderAI/issues/183">#183</a>].</li>
|
||||
<li>Default prompts text has been translated [<a href="https://github.com/micz/ThunderAI/issues/185">#185</a>].</li>
|
||||
<li>Data placeholder <i>{%full_tags_list%}</i> for the full available tags list added [<a href="https://github.com/micz/ThunderAI/issues/197">#197</a>].</li>
|
||||
<li>Data placeholder <i>{%mail_tags%}</i> for the single mail tags list added [<a href="https://github.com/micz/ThunderAI/issues/198">#198</a>].</li>
|
||||
<li>Data placeholder <i>{%tags_current_email%}</i> for the single mail tags list added [<a href="https://github.com/micz/ThunderAI/issues/198">#198</a>].</li>
|
||||
<li>User <a href="https://forms.gle/1qK2wcbuhaRzhwyt9">survey link</a> added [<a href="https://github.com/micz/ThunderAI/issues/202">#202</a>].</li>
|
||||
<li>Polish (pl) translation added, thanks to <a href="https://github.com/neexpl">neexpl</a>.</li>
|
||||
<li><i>[OpenAI Comp API]</i> Added a button in the options page to manually insert the model [<a href="https://github.com/micz/ThunderAI/issues/205">#205</a>].</li>
|
||||
|
|
|
|||
Loading…
Reference in a new issue