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

Function resolveInboundAttachments

src/bridge/inboundAttachments.ts:123–134  ·  view source on GitHub ↗
(
  attachments: InboundAttachment[],
)

Source from the content-addressed store, hash-verified

121 * @path refs. Empty string if none resolved.
122 */
123export async function resolveInboundAttachments(
124 attachments: InboundAttachment[],
125): Promise<string> {
126 if (attachments.length === 0) return ''
127 debug(`resolving ${attachments.length} attachment(s)`)
128 const paths = await Promise.all(attachments.map(resolveOne))
129 const ok = paths.filter((p): p is string => p !== undefined)
130 if (ok.length === 0) return ''
131 // Quoted form — extractAtMentionedFiles truncates unquoted @refs at the
132 // first space, which breaks any home dir with spaces (/Users/John Smith/).
133 return ok.map(p => `@"${p}"`).join(' ') + ' '
134}
135
136/**
137 * Prepend @path refs to content, whichever form it's in.

Callers 1

resolveAndPrependFunction · 0.85

Calls 1

debugFunction · 0.70

Tested by

no test coverage detected