feat(agent): enable read_asset tool for autofill agent (#396)

* feat(agent): enable read_asset tool for autofill agent

* fix(transcode): trigger autofill task for pdf assets

* fix(transcode): allow autofill task creation on all file assets

* fix(agent): require targetAssetId and teamId for autofill read_asset authorization

* feat(agent): instruct autofill agent to report failure directly if read_asset fails
This commit is contained in:
Yiling-J
2026-09-08 14:19:03 +08:00
committed by GitHub
parent 3a05332cd6
commit 04fd571bd9
10 changed files with 548 additions and 144 deletions
+1 -10
View File
@@ -932,16 +932,7 @@ export async function createAutofillTaskIfEnabledActivity(
project: true,
},
})
if (!asset) {
return
}
const proxyType =
(asset.media as PrismaJson.MediaInfo | null)?.proxyType ||
getProxyType(asset.mediaType, asset.name)
const isVideo = proxyType === 'video'
const isImage = proxyType === 'image'
if (!isVideo && !isImage) {
if (!asset || (asset.type !== 'file' && asset.type !== 'version_stack') || asset.isDeleted) {
return
}