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
+164
-24
@@ -9,29 +9,118 @@ import type { Checkpoint } from '@/features/workflows/types'
|
||||
*/
|
||||
export function candidateState(overrides: Partial<BreakdownState> = {}): BreakdownState {
|
||||
const plan: EpisodePlan = {
|
||||
episodeNo: 1, episodeTitle: '第一集', storyGoal: '', centralConflict: '', emotionalArc: '', pacing: '', endingHook: '',
|
||||
beats: [{ beatNo: 1, title: '取物', purpose: 'action', description: '', visualFocus: '', narrativeGoal: '', emotionalTone: '', estimatedDurationSeconds: 8, subjectRefs: ['@CH0001', '@PR0001'], isKeyBeat: false }]
|
||||
episodeNo: 1,
|
||||
episodeTitle: '第一集',
|
||||
storyGoal: '',
|
||||
centralConflict: '',
|
||||
emotionalArc: '',
|
||||
pacing: '',
|
||||
endingHook: '',
|
||||
beats: [
|
||||
{
|
||||
beatNo: 1,
|
||||
title: '取物',
|
||||
purpose: 'action',
|
||||
description: '',
|
||||
visualFocus: '',
|
||||
narrativeGoal: '',
|
||||
emotionalTone: '',
|
||||
estimatedDurationSeconds: 8,
|
||||
subjectRefs: ['@CH0001', '@PR0001'],
|
||||
isKeyBeat: false
|
||||
}
|
||||
]
|
||||
}
|
||||
return {
|
||||
projectId: 'candidate-project', candidateOnly: true, storyboardPersisted: false,
|
||||
projectId: 'candidate-project',
|
||||
candidateOnly: true,
|
||||
storyboardPersisted: false,
|
||||
expectedEpisodeFingerprints: { 1: 'fingerprint' },
|
||||
runConfig: { groupSize: 3, modules: ['character', 'prop'], episodeGroups: [], sourceEpisodes: [{ episodeNo: 1 }] },
|
||||
runConfig: {
|
||||
groupSize: 3,
|
||||
modules: ['character', 'prop'],
|
||||
episodeGroups: [],
|
||||
sourceEpisodes: [{ episodeNo: 1 }]
|
||||
},
|
||||
subjectCandidates: [
|
||||
{ profileId: 'person', name: '人物', ref: '@CH0001', module: 'character', description: '', appearance_prompt: '' },
|
||||
{
|
||||
profileId: 'person',
|
||||
name: '人物',
|
||||
ref: '@CH0001',
|
||||
module: 'character',
|
||||
description: '',
|
||||
appearance_prompt: ''
|
||||
},
|
||||
{ profileId: 'prop', name: '铜铃', ref: '@PR0001', module: 'prop', description: '', appearance_prompt: '' }
|
||||
],
|
||||
subjectForms: [
|
||||
{ formId: 'person-form', profileId: 'person', type: 'character', name: '人物形态', isDefault: true, description: '', appearancePrompt: '' },
|
||||
{ formId: 'prop-form', profileId: 'prop', type: 'prop', name: '铜铃形态', isDefault: true, description: '', appearancePrompt: '' }
|
||||
{
|
||||
formId: 'person-form',
|
||||
profileId: 'person',
|
||||
type: 'character',
|
||||
name: '人物形态',
|
||||
isDefault: true,
|
||||
description: '',
|
||||
appearancePrompt: ''
|
||||
},
|
||||
{
|
||||
formId: 'prop-form',
|
||||
profileId: 'prop',
|
||||
type: 'prop',
|
||||
name: '铜铃形态',
|
||||
isDefault: true,
|
||||
description: '',
|
||||
appearancePrompt: ''
|
||||
}
|
||||
],
|
||||
storyboardPlans: [plan],
|
||||
storyboardEpisodeShots: [{ episodeNo: 1, episodePlan: plan, beatShots: [{ beatNo: 1, shots: [1, 2].map(shotNo => ({
|
||||
shotNo, title: `动作镜头 ${shotNo}`, description: '人物拿起铜铃', visualFocus: '', durationSeconds: 4,
|
||||
subjectRefs: ['@CH0001'], subjectBindings: [{ subjectRef: '@CH0001', profileId: 'person', formId: 'person-form', formName: '人物形态' }],
|
||||
requiredActions: [{ id: `action-${shotNo}`, description: '铜铃已经在手中', kind: 'state', mustPerformInShot: false }],
|
||||
durationPlanning: { complexity: 'low', phases: [{ action: '铜铃已经在手中', actionIds: [`action-${shotNo}`], estimatedSeconds: 4 }], transitionSeconds: 0, recommendedDurationSeconds: 4, reason: '测试' }
|
||||
})) }] }],
|
||||
storyboardShotValidation: { valid: true, issues: [] }, storyboardPendingQualityEpisodeNos: [], ...overrides
|
||||
storyboardEpisodeShots: [
|
||||
{
|
||||
episodeNo: 1,
|
||||
episodePlan: plan,
|
||||
beatShots: [
|
||||
{
|
||||
beatNo: 1,
|
||||
shots: [1, 2].map(shotNo => ({
|
||||
shotNo,
|
||||
title: `动作镜头 ${shotNo}`,
|
||||
description: '人物拿起铜铃',
|
||||
visualFocus: '',
|
||||
durationSeconds: 4,
|
||||
subjectRefs: ['@CH0001'],
|
||||
subjectBindings: [
|
||||
{
|
||||
subjectRef: '@CH0001',
|
||||
profileId: 'person',
|
||||
formId: 'person-form',
|
||||
formName: '人物形态'
|
||||
}
|
||||
],
|
||||
requiredActions: [
|
||||
{
|
||||
id: `action-${shotNo}`,
|
||||
description: '铜铃已经在手中',
|
||||
kind: 'state',
|
||||
mustPerformInShot: false
|
||||
}
|
||||
],
|
||||
durationPlanning: {
|
||||
complexity: 'low',
|
||||
phases: [
|
||||
{ action: '铜铃已经在手中', actionIds: [`action-${shotNo}`], estimatedSeconds: 4 }
|
||||
],
|
||||
transitionSeconds: 0,
|
||||
recommendedDurationSeconds: 4,
|
||||
reason: '测试'
|
||||
}
|
||||
}))
|
||||
}
|
||||
]
|
||||
}
|
||||
],
|
||||
storyboardShotValidation: { valid: true, issues: [] },
|
||||
storyboardPendingQualityEpisodeNos: [],
|
||||
...overrides
|
||||
}
|
||||
}
|
||||
|
||||
@@ -47,13 +136,17 @@ export function resourceConflictState(overrides: Partial<BreakdownState> = {}):
|
||||
{ id: 'hold', description: '左手握住铜铃', kind: 'action', mustPerformInShot: true },
|
||||
{ id: 'wave', description: '左手向村民挥动', kind: 'action', mustPerformInShot: true }
|
||||
]
|
||||
shot.durationPlanning!.phases = [{
|
||||
action: '握铃时挥手', actionIds: ['hold', 'wave'], estimatedSeconds: 4,
|
||||
resourceOccupancy: [
|
||||
{ ownerRef: '@CH0001', resource: 'left_hand', actionId: 'hold', usage: 'hold', shareable: false },
|
||||
{ ownerRef: '@CH0001', resource: 'left_hand', actionId: 'wave', usage: 'move', shareable: false }
|
||||
]
|
||||
}]
|
||||
shot.durationPlanning!.phases = [
|
||||
{
|
||||
action: '握铃时挥手',
|
||||
actionIds: ['hold', 'wave'],
|
||||
estimatedSeconds: 4,
|
||||
resourceOccupancy: [
|
||||
{ ownerRef: '@CH0001', resource: 'left_hand', actionId: 'hold', usage: 'hold', shareable: false },
|
||||
{ ownerRef: '@CH0001', resource: 'left_hand', actionId: 'wave', usage: 'move', shareable: false }
|
||||
]
|
||||
}
|
||||
]
|
||||
return state
|
||||
}
|
||||
|
||||
@@ -64,7 +157,13 @@ export function resourceConflictState(overrides: Partial<BreakdownState> = {}):
|
||||
* @returns 检查点记录
|
||||
*/
|
||||
export function candidateCheckpoint(state = candidateState(), checkpointId = 'candidate-current'): Checkpoint {
|
||||
return { checkpointId, createdAt: '2026-10-17T09:28:59Z', workflowName: 'breakdown', metadata: { nodeName: 'candidate_action_batch_repair', sourceCheckpointId: 'old' }, state }
|
||||
return {
|
||||
checkpointId,
|
||||
createdAt: '2026-10-17T09:28:59Z',
|
||||
workflowName: 'breakdown',
|
||||
metadata: { nodeName: 'candidate_action_batch_repair', sourceCheckpointId: 'old' },
|
||||
state
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -73,7 +172,23 @@ export function candidateCheckpoint(state = candidateState(), checkpointId = 'ca
|
||||
* @returns 候选重新审核响应
|
||||
*/
|
||||
export function candidateReview(overrides: Partial<CandidateRevalidation> = {}): CandidateRevalidation {
|
||||
return { projectId: 'candidate-project', checkpointId: 'candidate-current', episodeCount: 1, shotCount: 2, previousIssues: [], currentIssues: [], missingSubjectRefs: [], pendingQualityEpisodeNos: [], actionQualityBlocks: [], actionRepairTargets: [], propReferenceDiagnostics: [], pendingWithoutActionBlocks: [], candidateValidation: { valid: true, issues: [] }, canCommit: false, ...overrides }
|
||||
return {
|
||||
projectId: 'candidate-project',
|
||||
checkpointId: 'candidate-current',
|
||||
episodeCount: 1,
|
||||
shotCount: 2,
|
||||
previousIssues: [],
|
||||
currentIssues: [],
|
||||
missingSubjectRefs: [],
|
||||
pendingQualityEpisodeNos: [],
|
||||
actionQualityBlocks: [],
|
||||
actionRepairTargets: [],
|
||||
propReferenceDiagnostics: [],
|
||||
pendingWithoutActionBlocks: [],
|
||||
candidateValidation: { valid: true, issues: [] },
|
||||
canCommit: false,
|
||||
...overrides
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -82,5 +197,30 @@ export function candidateReview(overrides: Partial<CandidateRevalidation> = {}):
|
||||
* @returns 只读安全检查
|
||||
*/
|
||||
export function commitPreview(overrides: Partial<CandidateCommitPreview> = {}): CandidateCommitPreview {
|
||||
return { projectId: 'candidate-project', checkpointId: 'candidate-current', ready: true, readOnly: true, checks: { qualityPolicyMatches: true, episodeNumbersMatch: true, episodeFingerprintsMatch: true, noActiveExecutions: true, noActiveVideos: true, noSubjectIdentities: true, noSubjectImages: true, noProtectedShots: true }, counts: { episodes: 1, existingStoryboards: 0, activeExecutions: 0, activeVideos: 0, subjectIdentities: 0, subjectImages: 0, protectedShots: 0 }, ...overrides }
|
||||
return {
|
||||
projectId: 'candidate-project',
|
||||
checkpointId: 'candidate-current',
|
||||
ready: true,
|
||||
readOnly: true,
|
||||
checks: {
|
||||
qualityPolicyMatches: true,
|
||||
episodeNumbersMatch: true,
|
||||
episodeFingerprintsMatch: true,
|
||||
noActiveExecutions: true,
|
||||
noActiveVideos: true,
|
||||
noSubjectIdentities: true,
|
||||
noSubjectImages: true,
|
||||
noProtectedShots: true
|
||||
},
|
||||
counts: {
|
||||
episodes: 1,
|
||||
existingStoryboards: 0,
|
||||
activeExecutions: 0,
|
||||
activeVideos: 0,
|
||||
subjectIdentities: 0,
|
||||
subjectImages: 0,
|
||||
protectedShots: 0
|
||||
},
|
||||
...overrides
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user