From 79b49519b6c70932a3c0e766785567c15cffb439 Mon Sep 17 00:00:00 2001 From: Linghong Date: Tue, 15 Sep 2026 06:41:41 +0000 Subject: [PATCH] =?UTF-8?q?=E5=88=A0=E9=99=A4=E9=80=80=E5=BD=B9GDD?= =?UTF-8?q?=E4=BA=A4=E4=BB=98=E5=85=A5=E5=8F=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 移除已批准 fast GDD 自动转建游戏流程 清理工作台与首页创建控制器中的旧策划回调 保留 DirectCodex 正常做游戏入口 --- apps/ai-game-creator-shell/src/App.tsx | 10 --- .../features/app-shell/WorkspaceLauncher.tsx | 2 - .../src/features/app-shell/model.ts | 1 - .../app-shell/useHomeProjectCreation.ts | 69 ------------------- 4 files changed, 82 deletions(-) diff --git a/apps/ai-game-creator-shell/src/App.tsx b/apps/ai-game-creator-shell/src/App.tsx index 80d6a1a0d..f8463c9e3 100644 --- a/apps/ai-game-creator-shell/src/App.tsx +++ b/apps/ai-game-creator-shell/src/App.tsx @@ -528,7 +528,6 @@ type AppProps = { summaries: ProjectAgentRuntimeSummary[], ) => void; onAgentResultsChange?: (results: ProjectAgentResultSummary[]) => void; - onMakeGameFromApprovedGdd?: (projectPath: string) => Promise; }; type ExecuteChatAgentReplyInput = { @@ -571,7 +570,6 @@ export function App({ onPreviewChange, onAgentRuntimeSummariesChange, onAgentResultsChange, - onMakeGameFromApprovedGdd, }: AppProps = {}) { const { setTitle: setWindowTitle } = useWindowChrome(); const [designAgentActive, setDesignAgentActive] = useState(planningStartMode); @@ -11494,14 +11492,6 @@ export function App({ } : undefined } - onMakeGameFromApprovedGdd={ - onMakeGameFromApprovedGdd - ? () => - onMakeGameFromApprovedGdd( - localProject?.projectPath ?? projectPath, - ) - : undefined - } runtime={projectSupervisorRuntime} error={projectSupervisorRuntimeError} runtimeByAgentId={agentRuntimeById} diff --git a/apps/ai-game-creator-shell/src/features/app-shell/WorkspaceLauncher.tsx b/apps/ai-game-creator-shell/src/features/app-shell/WorkspaceLauncher.tsx index 58a188e6f..9349810d0 100644 --- a/apps/ai-game-creator-shell/src/features/app-shell/WorkspaceLauncher.tsx +++ b/apps/ai-game-creator-shell/src/features/app-shell/WorkspaceLauncher.tsx @@ -90,7 +90,6 @@ export function WorkspaceLauncherShell({ activeProjectAgentResults, setAgentResults: setActiveProjectAgentResults, resetLauncherHomeDraft, - startGameFromApprovedGdd, createHomeDraftAutomatically, openProject, homeCreationBusy, @@ -650,7 +649,6 @@ export function WorkspaceLauncherShell({ setActiveProjectAgentRuntimeSummaries } onAgentResultsChange={setActiveProjectAgentResults} - onMakeGameFromApprovedGdd={startGameFromApprovedGdd} onSwitchToGameRuntime={switchToGameRuntime} /> } diff --git a/apps/ai-game-creator-shell/src/features/app-shell/model.ts b/apps/ai-game-creator-shell/src/features/app-shell/model.ts index 5c54a5055..7b26a72f1 100644 --- a/apps/ai-game-creator-shell/src/features/app-shell/model.ts +++ b/apps/ai-game-creator-shell/src/features/app-shell/model.ts @@ -60,7 +60,6 @@ export type ProjectSupervisorComponentProps = { summaries: ProjectAgentRuntimeSummary[], ) => void; onAgentResultsChange?: (results: ProjectAgentResultSummary[]) => void; - onMakeGameFromApprovedGdd?: (projectPath: string) => Promise; onSwitchToGameRuntime?: (projectPath: string) => Promise; }; diff --git a/apps/ai-game-creator-shell/src/features/app-shell/useHomeProjectCreation.ts b/apps/ai-game-creator-shell/src/features/app-shell/useHomeProjectCreation.ts index 61fb8681a..1ac7d6058 100644 --- a/apps/ai-game-creator-shell/src/features/app-shell/useHomeProjectCreation.ts +++ b/apps/ai-game-creator-shell/src/features/app-shell/useHomeProjectCreation.ts @@ -19,7 +19,6 @@ import type { LauncherProjectContext, LocalGameProjectRevisionStatus, LocalProjectDirectoryStatus, - LocalProjectFileResult, PendingNonEmptyProject, ProjectStartMode, RenameLocalProjectResult, @@ -56,27 +55,6 @@ type UseHomeProjectCreationOptions = { rememberRecentWorkspace: (projectPath: string) => void; }; -const APPROVED_GDD_BUILD_PROMPT = [ - '请按照附件中的已批准 GDD 开始建造这款游戏。', - '', - '这份 GDD 已覆盖游戏定位与一句话概念、类型与美术方向、游戏支柱、核心循环、目标用户、平台与输入事实、MVP 系统、暂不纳入范围、创作者提示和原型验证项。', - '', - '请先阅读并理解附件中的 fast_gdd.md,以它作为本次建造的主要依据,优先实现其中 MVP 范围内的可运行游戏原型。', -].join('\n'); - -function createTextAttachmentFile(content: string) { - const file = new File([content], 'fast_gdd.md', { - type: 'text/markdown', - lastModified: Date.now(), - }); - if (typeof file.arrayBuffer !== 'function') { - Object.defineProperty(file, 'arrayBuffer', { - value: async () => new TextEncoder().encode(content).buffer, - }); - } - return file; -} - async function suggestAutomaticProjectName( invoke: TauriInvoke, draft: HomeDraft, @@ -152,7 +130,6 @@ export function useHomeProjectCreation({ const resetLauncherHomeDraft = useLauncherHomeDraftStore( (state) => state.reset, ); - const approvedGddStartInFlightRef = useRef(false); const [homeCreationOperation, setHomeCreationOperation] = useState( - 'read_local_project_file', - { - projectPath, - relativePath: 'game/fast_gdd.md', - commandId: 'file.read', - }, - ); - const file = createTextAttachmentFile(result.content); - - await createHomeDraftAutomaticallyWithOptions( - { - creationType: 'game', - prompt: APPROVED_GDD_BUILD_PROMPT, - attachments: [ - { - id: `approved-gdd-${Date.now().toString(36)}`, - file, - }, - ], - }, - 'direct-build', - { suggestName: false }, - ); - } finally { - approvedGddStartInFlightRef.current = false; - } - } - async function enterProjectDevelopment(context: LauncherProjectContext) { const entryToken = (projectEntryTokenRef.current += 1); /** @@ -962,7 +894,6 @@ export function useHomeProjectCreation({ ), pendingNonEmptyProject, resetLauncherHomeDraft, - startGameFromApprovedGdd, createHomeDraft, createHomeDraftAutomatically, openProject,