feat(asset): replace mediaType/mimeType logic with proxyType

This commit is contained in:
yiling
2026-07-20 10:22:36 +08:00
parent c45a1d9ee9
commit f158d04686
40 changed files with 219 additions and 119 deletions
@@ -77,6 +77,14 @@ export function createReadPdfPagesTool(
}
}
const proxyType = (asset.media as PrismaJson.MediaInfo | null)?.proxyType
if (proxyType && proxyType !== 'pdf') {
return {
content: [{ type: 'text', text: `Asset ${targetAssetId} is not a PDF or document.` }],
details: {},
}
}
// Fetch trigger comment details for comment page and annotations
let commentTimestamp: number | null = null
let annotations: unknown = null