add tags special prompt added. see #183
This commit is contained in:
parent
7ec4ef89a0
commit
27547da558
2 changed files with 30 additions and 0 deletions
|
|
@ -750,5 +750,13 @@
|
||||||
"prefs_OptionText_add_tags_Info": {
|
"prefs_OptionText_add_tags_Info": {
|
||||||
"message": "If checked, a menu item will be added to the dynamic menu to add tags to emails.",
|
"message": "If checked, a menu item will be added to the dynamic menu to add tags to emails.",
|
||||||
"description": ""
|
"description": ""
|
||||||
|
},
|
||||||
|
"prompt_add_tags": {
|
||||||
|
"message": "Add tags to emails",
|
||||||
|
"description": ""
|
||||||
|
},
|
||||||
|
"prompt_add_tags_full_text": {
|
||||||
|
"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.",
|
||||||
|
"description": ""
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -73,6 +73,7 @@ const defaultPrompts = [
|
||||||
need_custom_text: "0",
|
need_custom_text: "0",
|
||||||
define_response_lang: "1",
|
define_response_lang: "1",
|
||||||
is_default: "1",
|
is_default: "1",
|
||||||
|
is_special: "0",
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
id: 'prompt_reply_advanced',
|
id: 'prompt_reply_advanced',
|
||||||
|
|
@ -85,6 +86,7 @@ const defaultPrompts = [
|
||||||
need_custom_text: "0",
|
need_custom_text: "0",
|
||||||
define_response_lang: "1",
|
define_response_lang: "1",
|
||||||
is_default: "1",
|
is_default: "1",
|
||||||
|
is_special: "0",
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
id: 'prompt_rewrite_polite',
|
id: 'prompt_rewrite_polite',
|
||||||
|
|
@ -97,6 +99,7 @@ const defaultPrompts = [
|
||||||
need_custom_text: "0",
|
need_custom_text: "0",
|
||||||
define_response_lang: "1",
|
define_response_lang: "1",
|
||||||
is_default: "1",
|
is_default: "1",
|
||||||
|
is_special: "0",
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
id: 'prompt_rewrite_formal',
|
id: 'prompt_rewrite_formal',
|
||||||
|
|
@ -109,6 +112,7 @@ const defaultPrompts = [
|
||||||
need_custom_text: "0",
|
need_custom_text: "0",
|
||||||
define_response_lang: "1",
|
define_response_lang: "1",
|
||||||
is_default: "1",
|
is_default: "1",
|
||||||
|
is_special: "0",
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
id: 'prompt_classify',
|
id: 'prompt_classify',
|
||||||
|
|
@ -121,6 +125,7 @@ const defaultPrompts = [
|
||||||
need_custom_text: "0",
|
need_custom_text: "0",
|
||||||
define_response_lang: "1",
|
define_response_lang: "1",
|
||||||
is_default: "1",
|
is_default: "1",
|
||||||
|
is_special: "0",
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
id: 'prompt_summarize_this',
|
id: 'prompt_summarize_this',
|
||||||
|
|
@ -133,6 +138,7 @@ const defaultPrompts = [
|
||||||
need_custom_text: "0",
|
need_custom_text: "0",
|
||||||
define_response_lang: "1",
|
define_response_lang: "1",
|
||||||
is_default: "1",
|
is_default: "1",
|
||||||
|
is_special: "0",
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
id: 'prompt_translate_this',
|
id: 'prompt_translate_this',
|
||||||
|
|
@ -145,6 +151,7 @@ const defaultPrompts = [
|
||||||
need_custom_text: "0",
|
need_custom_text: "0",
|
||||||
define_response_lang: "0",
|
define_response_lang: "0",
|
||||||
is_default: "1",
|
is_default: "1",
|
||||||
|
is_special: "0",
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
id: 'prompt_this',
|
id: 'prompt_this',
|
||||||
|
|
@ -157,7 +164,21 @@ const defaultPrompts = [
|
||||||
need_custom_text: "0",
|
need_custom_text: "0",
|
||||||
define_response_lang: "0",
|
define_response_lang: "0",
|
||||||
is_default: "1",
|
is_default: "1",
|
||||||
|
is_special: "0",
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
id: 'prompt_add_tags',
|
||||||
|
name: "__MSG_prompt_add_tags__",
|
||||||
|
text: "prompt_add_tags_full_text",
|
||||||
|
type: "1",
|
||||||
|
action: "0",
|
||||||
|
need_selected: "0",
|
||||||
|
need_signature: "0",
|
||||||
|
need_custom_text: "0",
|
||||||
|
define_response_lang: "0",
|
||||||
|
is_default: "1",
|
||||||
|
is_special: "1",
|
||||||
|
}
|
||||||
];
|
];
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -167,6 +188,7 @@ export async function getPrompts(onlyEnabled = false){
|
||||||
const customPrompts = await getCustomPrompts();
|
const customPrompts = await getCustomPrompts();
|
||||||
// console.log('>>>>>>>>>>>> getPrompts customPrompts: ' + JSON.stringify(customPrompts));
|
// console.log('>>>>>>>>>>>> getPrompts customPrompts: ' + JSON.stringify(customPrompts));
|
||||||
let output = _defaultPrompts.concat(customPrompts);
|
let output = _defaultPrompts.concat(customPrompts);
|
||||||
|
output = output.filter(obj => obj.is_special != 1); // we do not want special prompts
|
||||||
if(onlyEnabled){
|
if(onlyEnabled){
|
||||||
output = output.filter(obj => obj.enabled != 0);
|
output = output.filter(obj => obj.enabled != 0);
|
||||||
}else{ // order only if we are not filtering, the filtering is for the menus and we are ordering there after i18n
|
}else{ // order only if we are not filtering, the filtering is for the menus and we are ordering there after i18n
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue