fix(email): reference attachments before text parts and remove unused import

linuztx committed Mar 23, 2026 at 18:28 UTC 820928260c58f647ca3ad6e031ef88c366b72676
2 files changed +1 -2
plugins/_email_integration/helpers/handler.py
-1
@@ -12,7 +12,6 @@ import os
12 from agent import Agent, AgentContext, AgentContextType, UserMessage
13 from helpers import guids, plugins, files, runtime
14 from helpers import message_queue as mq
15 -from helpers.notification import NotificationManager, NotificationType, NotificationPriority
15 from helpers.persist_chat import save_tmp_chat
16 from helpers.print_style import PrintStyle
17 from helpers.errors import format_error
plugins/_email_integration/helpers/imap_client.py
+1 -1
@@ -343,7 +343,7 @@ async def _parse_body(
343 if cid:
344 cid_map[cid.strip("<>")] = path
345
346 - if not cid and body_parts:
346 + if not cid:
347 body_parts.append(f"\n[attachment://{path}]\n")
348
349 elif content_type == "text/plain":