feat: refine UI, improve UX, optimize the analysis pipeline, and add character standing positions

This commit is contained in:
saturn
2026-04-02 17:39:16 +08:00
parent c3e74c228a
commit 9703714b69
153 changed files with 4472 additions and 1088 deletions

View File

@@ -6,7 +6,9 @@ const prismaMock = vi.hoisted(() => ({
project: { findUnique: vi.fn() },
novelPromotionProject: { findUnique: vi.fn() },
novelPromotionEpisode: { findUnique: vi.fn() },
$transaction: vi.fn(),
novelPromotionClip: { update: vi.fn(async () => ({})) },
locationImage: { createMany: vi.fn(async () => ({ count: 0 })) },
}))
const workerMock = vi.hoisted(() => ({
@@ -120,6 +122,7 @@ function buildJob(payload: Record<string, unknown>, episodeId: string | null = '
describe('worker story-to-script behavior', () => {
beforeEach(() => {
vi.clearAllMocks()
prismaMock.$transaction.mockImplementation(async (fn: (tx: typeof prismaMock) => Promise<unknown>) => await fn(prismaMock))
prismaMock.project.findUnique.mockResolvedValue({
id: 'project-1',
@@ -181,10 +184,10 @@ describe('worker story-to-script behavior', () => {
persistedClips: 1,
})
expect(helperMock.persistClips).toHaveBeenCalledWith({
expect(helperMock.persistClips).toHaveBeenCalledWith(expect.objectContaining({
episodeId: 'episode-1',
clipList: [{ clipId: 'clip-1', content: 'clip content', props: ['Knife'] }],
})
}))
expect(prismaMock.novelPromotionClip.update).toHaveBeenCalledWith({
where: { id: 'clip-row-1' },