feat(short-drama-agent-front): 完善视觉资产审核流程
This commit is contained in:
1 parent
dc8bb17a23
commit
b88ad8770f
45 files changed
+2258
-352
No files matched your search
+1
@@ -206,6 +206,7 @@ export function commitPreview(overrides: Partial<CandidateCommitCheckPreview> =
|
||||
relationRepairTargets: [],
|
||||
checks: {
|
||||
qualityPolicyMatches: true,
|
||||
durationBudgetCurrent: true,
|
||||
episodeNumbersMatch: true,
|
||||
episodeFingerprintsMatch: true,
|
||||
noActiveExecutions: true,
|
||||
|
||||
Vendored
+49
@@ -1,3 +1,8 @@
|
||||
import {
|
||||
characterCheckLabels,
|
||||
type CharacterCheckResult,
|
||||
type ImageValidationResult
|
||||
} from '@/features/subject-images/validation'
|
||||
import type { SubjectImageGenerationPreview } from '@/features/subject-images/types'
|
||||
|
||||
/**
|
||||
@@ -17,3 +22,47 @@ export function imagePreviewFixture(subjectFormId = 'form-db-1'): SubjectImageGe
|
||||
references: []
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 返回绑定当前图库图像的只读审核来源。
|
||||
* @param url 正式预检路径
|
||||
* @param sourceCurrent 来源是否仍有效
|
||||
* @returns 对应当前图片的预检响应
|
||||
*/
|
||||
export function validationPreviewResponse(url: string, sourceCurrent = true) {
|
||||
const [, subjectFormId, imageId] = url.match(/subject-forms\/([^/]+)\/images\/([^/]+)\/validate\/preview$/) ?? []
|
||||
return new Response(
|
||||
JSON.stringify({
|
||||
data: {
|
||||
subjectFormId,
|
||||
imageId,
|
||||
sourceCurrent,
|
||||
canValidate: sourceCurrent,
|
||||
sourceStaleReason: sourceCurrent ? null : '本次机位采用的几何已过期',
|
||||
providerInputSnapshot: null,
|
||||
providerInputFingerprint: null
|
||||
}
|
||||
})
|
||||
)
|
||||
}
|
||||
/**
|
||||
* 模拟已通过明确审核的角色候选。
|
||||
* @param imageId 当前候选
|
||||
* @returns 四项完整的像素审核证据
|
||||
*/
|
||||
export function approvedCharacter(imageId: string): ImageValidationResult {
|
||||
return {
|
||||
subjectId: 'subject-db-1',
|
||||
imageId,
|
||||
passed: true,
|
||||
sourceRequirementsPassed: true,
|
||||
sourceVisualRequirements: [],
|
||||
summary: '已核对图像',
|
||||
issues: [],
|
||||
characterCheckResults: (Object.keys(characterCheckLabels) as CharacterCheckResult['check'][]).map(check => ({
|
||||
check,
|
||||
status: check.endsWith('References') ? 'not_applicable' : 'passed',
|
||||
evidence: '具体观察结果'
|
||||
}))
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user