From a4a030dfb5ec5aeb91f753fda401bab57312664e Mon Sep 17 00:00:00 2001 From: Git Hooks Test Date: Wed, 16 Sep 2026 02:38:32 +0800 Subject: [PATCH] =?UTF-8?q?=E7=A7=BB=E9=99=A4=E9=A6=96=E9=A1=B5=E4=B8=8E?= =?UTF-8?q?=E5=B7=A5=E4=BD=9C=E5=8F=B0=E7=B4=A0=E6=9D=90=E7=94=9F=E6=88=90?= =?UTF-8?q?=E5=85=A5=E5=8F=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 首页只保留做游戏和做方案入口 移除项目工作台顶部生成素材按钮 同步相关测试与产品文档 --- .../src/components/WindowChrome.tsx | 2 +- .../src/view/home/index.tsx | 24 ++++------ .../src/view/project-development/index.tsx | 29 +----------- .../tests/appSurface/home.suite.ts | 14 +++--- .../projectResourceLiveIntegration.test.tsx | 44 ++----------------- .../tests/resourceCanvasManualLayout.test.tsx | 6 +-- ...AI游戏创作】项目开发工作台PRD-2026-07-20.md | 2 + 7 files changed, 23 insertions(+), 98 deletions(-) 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' ? (