MCPcopy Create free account
hub / github.com/anomalyco/opencode / isImageAttachment

Function isImageAttachment

packages/core/src/tool/webfetch.ts:100–101  ·  view source on GitHub ↗
(mime: string)

Source from the content-addressed store, hash-verified

98
99const mimeFrom = (contentType: string) => contentType.split(";", 1)[0]?.trim().toLowerCase() ?? ""
100const isImageAttachment = (mime: string) =>
101 mime.startsWith("image/") && mime !== "image/svg+xml" && mime !== "image/vnd.fastbidsheet"
102const isTextualMime = (mime: string) =>
103 !mime ||
104 mime.startsWith("text/") ||

Callers 1

webfetch.tsFile · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected