fix(agent): only include duration_seconds for time-based media (video/audio)

This commit is contained in:
yiling
2026-08-30 15:51:23 +08:00
parent 07cb648183
commit 810e0c4cf5
2 changed files with 23 additions and 6 deletions
@@ -672,7 +672,7 @@ describe('Agent Chat Workflow', () => {
type: 'file',
name: 'doc.pdf',
mediaType: 'application/pdf',
media: { proxyType: 'pdf', frames: 15 },
media: { proxyType: 'pdf', frames: 15, duration: 0 },
parentId: 'f1',
}
}
@@ -729,6 +729,7 @@ describe('Agent Chat Workflow', () => {
mediaType: 'pdf',
totalPages: 15,
totalFrames: undefined,
durationSeconds: undefined,
}),
}),
}),