mirror of
https://github.com/shumaiOne/shumai.git
synced 2026-11-23 08:26:35 +00:00
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:
@@ -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
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user