fix: tighten public work type routing
This commit is contained in:
@@ -16,6 +16,7 @@ describe('unified creation specs', () => {
|
||||
'jump-hop',
|
||||
'match3d',
|
||||
'puzzle',
|
||||
'puzzle-clear',
|
||||
'rpg',
|
||||
'square-hole',
|
||||
'visual-novel',
|
||||
@@ -47,6 +48,11 @@ describe('unified creation specs', () => {
|
||||
generationStage: 'puzzle-generating',
|
||||
resultStage: 'puzzle-result',
|
||||
});
|
||||
expect(getUnifiedCreationSpec('puzzle-clear')).toMatchObject({
|
||||
workspaceStage: 'puzzle-clear-workspace',
|
||||
generationStage: 'puzzle-clear-generating',
|
||||
resultStage: 'puzzle-clear-result',
|
||||
});
|
||||
expect(getUnifiedCreationSpec('match3d')).toMatchObject({
|
||||
title: '抓大鹅',
|
||||
workspaceStage: 'match3d-agent-workspace',
|
||||
|
||||
@@ -2,11 +2,13 @@ import type {
|
||||
CreationEntryTypeConfig,
|
||||
UnifiedCreationSpec,
|
||||
} from '../../services/creationEntryConfigService';
|
||||
import type { PlatformCreationTypeId } from '../../../packages/shared/src/contracts/playTypes';
|
||||
|
||||
export const UNIFIED_CREATION_PLAY_IDS = [
|
||||
'rpg',
|
||||
'big-fish',
|
||||
'puzzle',
|
||||
'puzzle-clear',
|
||||
'match3d',
|
||||
'jump-hop',
|
||||
'wooden-fish',
|
||||
@@ -15,7 +17,7 @@ export const UNIFIED_CREATION_PLAY_IDS = [
|
||||
'visual-novel',
|
||||
'baby-object-match',
|
||||
'creative-agent',
|
||||
] as const;
|
||||
] as const satisfies readonly PlatformCreationTypeId[];
|
||||
|
||||
export type UnifiedCreationPlayId =
|
||||
(typeof UNIFIED_CREATION_PLAY_IDS)[number];
|
||||
@@ -82,6 +84,33 @@ const FALLBACK_UNIFIED_CREATION_SPECS: Record<
|
||||
},
|
||||
],
|
||||
},
|
||||
'puzzle-clear': {
|
||||
playId: 'puzzle-clear',
|
||||
title: '想做个什么玩法?',
|
||||
workspaceStage: 'puzzle-clear-workspace',
|
||||
generationStage: 'puzzle-clear-generating',
|
||||
resultStage: 'puzzle-clear-result',
|
||||
fields: [
|
||||
{
|
||||
id: 'title',
|
||||
kind: 'text',
|
||||
label: '作品标题',
|
||||
required: true,
|
||||
},
|
||||
{
|
||||
id: 'themePrompt',
|
||||
kind: 'text',
|
||||
label: '主题',
|
||||
required: true,
|
||||
},
|
||||
{
|
||||
id: 'backgroundReferenceImage',
|
||||
kind: 'image',
|
||||
label: '参考图',
|
||||
required: false,
|
||||
},
|
||||
],
|
||||
},
|
||||
match3d: {
|
||||
playId: 'match3d',
|
||||
title: '抓大鹅',
|
||||
|
||||
Reference in New Issue
Block a user