fix(short-drama-agent-front): 修复代码格式检查问题
This commit is contained in:
1 parent
81d6a85260
commit
48fce3975f
87 files changed
+5714
-1436
No files matched your search
@@ -13,7 +13,16 @@ export const candidateCheckLabels: Record<keyof CandidateCommitPreview['checks']
|
||||
noProtectedShots: '没有需要保护的镜头资产'
|
||||
}
|
||||
/** 必须逐项校验的固定安全门禁,不根据响应动态减少检查项。 */
|
||||
export const candidateCheckKeys = ['qualityPolicyMatches', 'episodeNumbersMatch', 'episodeFingerprintsMatch', 'noActiveExecutions', 'noActiveVideos', 'noSubjectIdentities', 'noSubjectImages', 'noProtectedShots'] as const
|
||||
export const candidateCheckKeys = [
|
||||
'qualityPolicyMatches',
|
||||
'episodeNumbersMatch',
|
||||
'episodeFingerprintsMatch',
|
||||
'noActiveExecutions',
|
||||
'noActiveVideos',
|
||||
'noSubjectIdentities',
|
||||
'noSubjectImages',
|
||||
'noProtectedShots'
|
||||
] as const
|
||||
|
||||
/**
|
||||
* 安全预检查必须逐项通过且属于当前项目和候选,不能只相信 ready。
|
||||
@@ -22,7 +31,11 @@ export const candidateCheckKeys = ['qualityPolicyMatches', 'episodeNumbersMatch'
|
||||
* @param checkpointId 当前候选版本
|
||||
* @returns 是否可进入最终确认
|
||||
*/
|
||||
export function candidatePreviewReady(preview: CandidateCommitPreview | null, projectId: string, checkpointId?: string): boolean {
|
||||
export function candidatePreviewReady(
|
||||
preview: CandidateCommitPreview | null,
|
||||
projectId: string,
|
||||
checkpointId?: string
|
||||
): boolean {
|
||||
if (!preview || preview.projectId !== projectId || preview.checkpointId !== checkpointId) return false
|
||||
// 外部 JSON 的布尔值必须严格为 true,不接受缺失值或字符串等真值。
|
||||
const flags: unknown[] = [preview.readOnly, preview.ready, ...candidateCheckKeys.map(key => preview.checks?.[key])]
|
||||
|
||||
Reference in new issue
Block a user