Agent Zero AI framework
fix(email): reference attachments before text parts and remove unused import
linuztx820928260c58
diff --git a/plugins/_email_integration/helpers/handler.py b/plugins/_email_integration/helpers/handler.pyindex cef388074..ef194f3fd 100644--- a/plugins/_email_integration/helpers/handler.py+++ b/plugins/_email_integration/helpers/handler.py@@ -12,7 +12,6 @@ import osfrom agent import Agent, AgentContext, AgentContextType, UserMessagefrom helpers import guids, plugins, files, runtimefrom helpers import message_queue as mq-from helpers.notification import NotificationManager, NotificationType, NotificationPriorityfrom helpers.persist_chat import save_tmp_chatfrom helpers.print_style import PrintStylefrom helpers.errors import format_errordiff --git a/plugins/_email_integration/helpers/imap_client.py b/plugins/_email_integration/helpers/imap_client.pyindex d90fb39ff..f88456d7a 100644--- a/plugins/_email_integration/helpers/imap_client.py+++ b/plugins/_email_integration/helpers/imap_client.py@@ -343,7 +343,7 @@ async def _parse_body(if cid:cid_map[cid.strip("<>")] = path- if not cid and body_parts:+ if not cid:body_parts.append(f"\n[attachment://{path}]\n")elif content_type == "text/plain":