MCPcopy Index your code
hub / github.com/codeaashu/claude-code / extractInboundAttachments

Function extractInboundAttachments

src/bridge/inboundAttachments.ts:42–48  ·  view source on GitHub ↗
(msg: unknown)

Source from the content-addressed store, hash-verified

40
41/** Pull file_attachments off a loosely-typed inbound message. */
42export function extractInboundAttachments(msg: unknown): InboundAttachment[] {
43 if (typeof msg !== 'object' || msg === null || !('file_attachments' in msg)) {
44 return []
45 }
46 const parsed = attachmentsArraySchema().safeParse(msg.file_attachments)
47 return parsed.success ? parsed.data : []
48}
49
50/**
51 * Strip path components and keep only filename-safe chars. file_name comes

Callers 1

resolveAndPrependFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected