diff --git a/apps/ai-game-creator-shell/src/components/WindowChrome.tsx b/apps/ai-game-creator-shell/src/components/WindowChrome.tsx index 948cf54a0..70f9eb496 100644 --- a/apps/ai-game-creator-shell/src/components/WindowChrome.tsx +++ b/apps/ai-game-creator-shell/src/components/WindowChrome.tsx @@ -8,9 +8,9 @@ import { subscribeTauriEvent } from '../services/tauriEventSubscription'; import { AppUpdateNotice } from './AppUpdateNotice'; import { WINDOW_CHROME_DEFAULT_TITLE, + type WindowChromeActiveProjectRuns, WindowChromeContext, type WindowChromeContextValue, - type WindowChromeActiveProjectRuns, } from './windowChromeContext'; type WindowChromeProps = { diff --git a/apps/ai-game-creator-shell/src/view/home/index.tsx b/apps/ai-game-creator-shell/src/view/home/index.tsx index 4310caee6..16236d779 100644 --- a/apps/ai-game-creator-shell/src/view/home/index.tsx +++ b/apps/ai-game-creator-shell/src/view/home/index.tsx @@ -4,7 +4,6 @@ import { FolderKanban, FolderOpen, Gamepad2, - Image, Loader2, type LucideIcon, Sparkles, @@ -50,13 +49,6 @@ const HOME_CREATION_TYPE_ITEMS: readonly HomeCreationTypeItem[] = [ emptyPrompt: '请输入游戏灵感或上传参考素材', icon: Gamepad2, }, - { - creationType: 'art', - label: '做素材', - placeholder: '今天想做什么样的美术素材', - emptyPrompt: '请输入素材需求或上传参考图', - icon: Image, - }, { creationType: 'doc', label: '做方案', @@ -66,7 +58,7 @@ const HOME_CREATION_TYPE_ITEMS: readonly HomeCreationTypeItem[] = [ }, ]; -// 首页只在做游戏与做方案之间分叉:做素材已被 master 并进直连构建,与做游戏同链, +// 首页只保留做游戏与做方案两个入口;素材生成在项目内按实际工作流触发。 export type HomeProjectRow = { path: string; name: string; @@ -149,13 +141,15 @@ export default function HomeView({ const [planningCompletionEnabled, setPlanningCompletionEnabled] = useState(false); const homeCreationBusyRef = useRef(false); + const effectiveCreationType = + homeCreationType === 'art' ? 'game' : homeCreationType; const activeCreationType = HOME_CREATION_TYPE_ITEMS.find( - (item) => item.creationType === homeCreationType, + (item) => item.creationType === effectiveCreationType, ) ?? HOME_CREATION_TYPE_ITEMS[0]!; - // 做方案始终走立项策划链路;做游戏勾选“策划补全”时复用该链路,做素材保持直接开建。 + // 做方案始终走立项策划链路;做游戏勾选“策划补全”时复用该链路。 const startMode = resolveHomeStartMode( - homeCreationType, + effectiveCreationType, planningCompletionEnabled, ); @@ -166,7 +160,7 @@ export default function HomeView({ const referencedAttachments = richTextToAttachments(homeRichText); const prompt = richTextToPrompt(homeRichText); if (!prompt && referencedAttachments.length === 0) { - if (homeCreationType !== 'doc') { + if (effectiveCreationType !== 'doc') { onStatusChange(activeCreationType.emptyPrompt); } return; @@ -177,7 +171,7 @@ export default function HomeView({ onStatusChange( await onCreateDraftAutomatically( { - creationType: homeCreationType, + creationType: effectiveCreationType, prompt, attachments: referencedAttachments, }, @@ -274,7 +268,7 @@ export default function HomeView({
- {homeCreationType === 'game' ? ( + {effectiveCreationType === 'game' ? (