From 047815a7d55df51a4811ec43c3dd2414fd0946a5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=9B=B7=E7=94=B5=E8=8A=BD=E8=A1=A3?= Date: Thu, 28 May 2026 19:54:12 -0400 Subject: [PATCH] Badge agent-to-agent file handoffs in chat Attachments rendered identically regardless of how they were transferred. When an agent sends a file through the handoff path, mark its attachment card with an AI-to-AI badge so the design's handoff indicator is present. --- .../renderer/src/pages/chat/ChatMessageRow.tsx | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-) diff --git a/AgentCompany-New/src/renderer/src/pages/chat/ChatMessageRow.tsx b/AgentCompany-New/src/renderer/src/pages/chat/ChatMessageRow.tsx index 36879eeb..b42f5de0 100644 --- a/AgentCompany-New/src/renderer/src/pages/chat/ChatMessageRow.tsx +++ b/AgentCompany-New/src/renderer/src/pages/chat/ChatMessageRow.tsx @@ -54,7 +54,11 @@ export function ChatMessageRow({ {messageFiles.length > 0 && (
- {messageFiles.map((file) => )} + {messageFiles.map((file) => { + const attachment = attachments.find((item) => item.messageId === message.id && item.fileId === file.id); + const handoff = bot && attachment?.transferType === "handoff"; + return ; + })}
)} {onOpenThread && ( @@ -128,7 +132,7 @@ function mentionLabel(mention: ChatMentionRecord, context: MessageContext): stri throw new Error("Message mention target type is unsupported."); } -function AttachmentCard({ file }: { file: FileObjectRecord }) { +function AttachmentCard({ file, handoff = false }: { file: FileObjectRecord; handoff?: boolean }) { return (
-
{file.name}
+
+ {file.name} + {handoff && ( + + AI → AI + + )} +
{file.kind.toUpperCase()} · {file.sha256.slice(0, 8)}