fix agent generation pending state on failures
This commit is contained in:
parent
54a4e15cf2
commit
80d862258b
@ -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,
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user