From 80d862258bd72d572b0f0949216107439ba2e3ad Mon Sep 17 00:00:00 2001 From: Your Name Date: Wed, 25 Mar 2026 23:31:10 +0800 Subject: [PATCH] fix agent generation pending state on failures --- .../agents/AgentGenerationWorkspaceDarkV2.tsx | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/components/agents/AgentGenerationWorkspaceDarkV2.tsx b/components/agents/AgentGenerationWorkspaceDarkV2.tsx index 578ef545a..53e1e7878 100644 --- a/components/agents/AgentGenerationWorkspaceDarkV2.tsx +++ b/components/agents/AgentGenerationWorkspaceDarkV2.tsx @@ -2172,24 +2172,23 @@ export function AgentGenerationWorkspaceDarkV2({ return; } - if ( - pendingGeneration.modeType === "scene_generation" || - pendingGeneration.modeType === "detail_generation" - ) { - return; - } - if (!hasAssistantFailureAfterLastUser) { return; } - const hasProgress = latestReplacementResults.length > 0; + const hasProgress = + pendingGeneration.modeType === "scene_generation" + ? currentSceneGeneratedUrls.length > 0 + : pendingGeneration.modeType === "detail_generation" + ? detailGenerationRunResults.length > 0 + : latestReplacementResults.length > 0; if (!hasProgress) { setPendingGeneration(null); } }, [ currentSceneGeneratedUrls.length, + detailGenerationRunResults.length, hasAssistantFailureAfterLastUser, latestReplacementResults.length, pendingGeneration,