Skip to content

Agent Zero AI framework

fix(email): prevent email reply prompt from injecting into non-email chats

linuztxa3821fbec0fb
diff --git a/plugins/_email_integration/extensions/python/system_prompt/_20_email_context.py b/plugins/_email_integration/extensions/python/system_prompt/_20_email_context.py
index d55dba89b..039534443 100644
--- a/plugins/_email_integration/extensions/python/system_prompt/_20_email_context.py
+++ b/plugins/_email_integration/extensions/python/system_prompt/_20_email_context.py
@@ -16,5 +16,5 @@ class EmailContextPrompt(Extension):
# Only inject email conversation context if this chat was started by email
if self.agent.context.data.get(CTX_EMAIL_HANDLER):
- prompt = self.agent.read_prompt("agent.system.tool.email_reply.md")
+ prompt = self.agent.read_prompt("fw.email.system_context_reply.md")
system_prompt.append(prompt)
diff --git a/plugins/_email_integration/prompts/agent.system.tool.email_reply.md b/plugins/_email_integration/prompts/fw.email.system_context_reply.md
similarity index 100%
rename from plugins/_email_integration/prompts/agent.system.tool.email_reply.md
rename to plugins/_email_integration/prompts/fw.email.system_context_reply.md