Add agent attachments with @agent mentions

This commit is contained in:
Shantur Rathore
2025-10-24 13:02:43 +01:00
parent 153387bbb4
commit d17e8e56c8
3 changed files with 286 additions and 24 deletions

View File

@@ -93,3 +93,18 @@ export function createTextAttachment(value: string, display: string, filename: s
},
}
}
export function createAgentAttachment(agentName: string): Attachment {
return {
id: crypto.randomUUID(),
type: "agent",
display: `@${agentName}`,
url: "",
filename: agentName,
mediaType: "text/plain",
source: {
type: "agent",
name: agentName,
},
}
}