diff --git a/apps/ai-game-creator-shell/src/App.tsx b/apps/ai-game-creator-shell/src/App.tsx index 9ad52805c..21ab10253 100644 --- a/apps/ai-game-creator-shell/src/App.tsx +++ b/apps/ai-game-creator-shell/src/App.tsx @@ -11647,12 +11647,36 @@ export function App({ approved, }) .then((view) => { + if ( + localProjectPathRef.current !== nextProjectPath || + designAgentTurnRef.current?.projectPath !== + nextProjectPath || + designAgentTurnRef.current?.clientTurnId !== clientTurnId + ) { + return; + } applyDesignView(view, nextProjectPath); }) .catch((error) => { + if ( + localProjectPathRef.current !== nextProjectPath || + designAgentTurnRef.current?.projectPath !== + nextProjectPath || + designAgentTurnRef.current?.clientTurnId !== clientTurnId + ) { + return; + } setPlanGddError(String(error)); }) .finally(() => { + if ( + localProjectPathRef.current !== nextProjectPath || + designAgentTurnRef.current?.projectPath !== + nextProjectPath || + designAgentTurnRef.current?.clientTurnId !== clientTurnId + ) { + return; + } designAgentTurnRef.current = null; setPlanningV2TransientReply(''); setChatAgentBusy(false);