Fix prop confirmation bug, add Wan 2.7 model, refine multiple UI details, improve prop generation quality and aspect ratio, remove text overlays from Asset Center created images, and optimize prop filtering logic

This commit is contained in:
saturn
2026-04-03 22:36:41 +08:00
parent 854b932e67
commit 78b93331b4
136 changed files with 3393 additions and 875 deletions

View File

@@ -55,6 +55,23 @@ const prismaMock = vi.hoisted(() => ({
findUnique: vi.fn(async () => ({
id: 'global-location-1',
userId: 'user-1',
name: '遗物匕首',
})),
findFirst: vi.fn(async () => ({
id: 'global-location-1',
userId: 'user-1',
name: '遗物匕首',
})),
},
novelPromotionProject: {
findUnique: vi.fn(async () => ({
id: 'novel-project-1',
})),
},
novelPromotionLocation: {
findFirst: vi.fn(async () => ({
id: 'project-prop-1',
name: '遗物匕首',
})),
},
}))
@@ -146,6 +163,18 @@ const ROUTE_CASES: ReadonlyArray<LLMRouteCase> = [
expectedTargetType: 'GlobalLocation',
expectedProjectId: 'global-asset-hub',
},
{
routeFile: 'src/app/api/asset-hub/ai-modify-prop/route.ts',
body: {
propId: 'global-location-1',
variantId: 'prop-variant-1',
currentDescription: 'old prop desc',
modifyInstruction: 'make it look older',
},
expectedTaskType: TASK_TYPE.ASSET_HUB_AI_MODIFY_PROP,
expectedTargetType: 'GlobalLocation',
expectedProjectId: 'global-asset-hub',
},
{
routeFile: 'src/app/api/asset-hub/reference-to-character/route.ts',
body: { referenceImageUrl: 'https://example.com/ref.png' },
@@ -201,6 +230,19 @@ const ROUTE_CASES: ReadonlyArray<LLMRouteCase> = [
expectedTargetType: 'NovelPromotionLocation',
expectedProjectId: 'project-1',
},
{
routeFile: 'src/app/api/novel-promotion/[projectId]/ai-modify-prop/route.ts',
body: {
propId: 'project-prop-1',
variantId: 'project-prop-variant-1',
currentDescription: 'old prop',
modifyInstruction: 'add engraved details',
},
params: { projectId: 'project-1' },
expectedTaskType: TASK_TYPE.AI_MODIFY_PROP,
expectedTargetType: 'NovelPromotionLocation',
expectedProjectId: 'project-1',
},
{
routeFile: 'src/app/api/novel-promotion/[projectId]/ai-modify-shot-prompt/route.ts',
body: {
@@ -340,7 +382,7 @@ describe('api contract - llm observe routes (behavior)', () => {
})
it('keeps expected coverage size', () => {
expect(ROUTE_CASES.length).toBe(23)
expect(ROUTE_CASES.length).toBe(25)
})
for (const routeCase of ROUTE_CASES) {