feat(short-drama-agent-front): 接入草案、首帧证据与审核继续

This commit is contained in:
GJ committed 2026-11-06 18:21:31 +08:00
1 parent 751106985e
commit d0264c08ce
23 files changed
+990 -170

No files matched your search

+4 -2
View File
@@ -114,7 +114,7 @@ function server() {
const executionState = { status: 'completed' as 'running' | 'completed' | 'failed' }
let batchMetadata: QualityInput | null = null
const fetcher = vi.fn<typeof fetch>().mockImplementation(async (url, options) => {
const path = String(url)
const path = String(url).split('?')[0]!
let data: unknown
if (options?.method === 'POST') {
if (path.endsWith('/generate-quality')) {
@@ -235,7 +235,9 @@ describe('视觉质量契约与付费边界', () => {
expect(data.fetcher).not.toHaveBeenCalled()
await data.service.run('validate', input({ allowedTexts: ['记忆当铺'] }))
expect(data.posts()).toHaveLength(1)
expect(data.posts()[0]?.[0]).toBe('/api/storyboard-shots/shot-1/keyframes/keyframe-1/validate')
expect(data.posts()[0]?.[0]).toBe(
'/api/storyboard-shots/shot-1/keyframes/keyframe-1/validate?projectId=' + data.projectId
)
expect(JSON.parse(String(data.posts()[0]?.[1]?.body))).toEqual({ allowedTexts: ['记忆当铺'] })
expect(data.service.session.value.receipt).toMatchObject({ kind: 'keyframe', result: { passed: true } })
})