GHHG10's picture
download
raw
404 Bytes
import type { FilePart } from "@opencode-ai/sdk/v2"
export function attached(part: FilePart) {
return part.url.startsWith("data:")
}
export function inline(part: FilePart) {
if (attached(part)) return false
return part.source?.text?.start !== undefined && part.source?.text?.end !== undefined
}
export function kind(part: FilePart) {
return part.mime.startsWith("image/") ? "image" : "file"
}

Xet Storage Details

Size:
404 Bytes
·
Xet hash:
e3f9c5bd322bd148dd9eee2f83a038615804b1f8b464ced2065b2f1bcf6173b1

Xet efficiently stores files, intelligently splitting them into unique chunks and accelerating uploads and downloads. More info.