From 51068dd95cdf6d7f8e9aea6a61a152c82515b3bd Mon Sep 17 00:00:00 2001 From: mic Date: Fri, 25 Jul 2025 23:15:30 +0200 Subject: [PATCH] Added a new default prompt to reply with a custom command asked when exectutin the prompt. See #444 --- _locales/en/messages.json | 8 ++++++++ js/mzta-prompts.js | 17 +++++++++++++++++ 2 files changed, 25 insertions(+) diff --git a/_locales/en/messages.json b/_locales/en/messages.json index d531fa77..02d7d434 100644 --- a/_locales/en/messages.json +++ b/_locales/en/messages.json @@ -19,6 +19,10 @@ "message": "Reply to this thread", "description": "" }, + "prompt_reply_custom_command": { + "message": "Reply with command", + "description": "" + }, "prompt_rewrite_polite": { "message": "Rewrite polite", "description": "" @@ -735,6 +739,10 @@ "message": "Reply to the following email \"{%selected_text%}\", considering this is the full thread of emails \"{%mail_html_body%}\". Reply with only the needed text and with no extra comments or other text.", "description": "" }, + "prompt_reply_custom_command_full_text": { + "message": "Reply to the following email \"{%mail_text_body%}\". {%additional_text%}. Reply with only the needed text and with no extra comments or other text.", + "description": "" + }, "prompt_rewrite_full_text": { "message": "Rewrite the following text to be more polite. Reply with only the re-written text and with no extra comments or other text.", "description": "" diff --git a/js/mzta-prompts.js b/js/mzta-prompts.js index 238f40ca..f1fbce97 100644 --- a/js/mzta-prompts.js +++ b/js/mzta-prompts.js @@ -109,6 +109,23 @@ const defaultPrompts = [ is_default: "1", is_special: "0", }, + { + id: 'prompt_reply_custom_command', + name: "__MSG_prompt_reply_custom_command__", + text: "prompt_reply_custom_command_full_text", + type: "1", + action: "1", + need_selected: "0", + need_signature: "1", + need_custom_text: "1", + define_response_lang: "1", + use_diff_viewer: "0", + chatgpt_web_model: '', + chatgpt_web_project: '', + chatgpt_web_custom_gpt: '', + is_default: "1", + is_special: "0", + }, { id: 'prompt_rewrite_polite', name: "__MSG_prompt_rewrite_polite__",