Merge remote-tracking branch 'origin/master' into codex/editor-asset-library
# Conflicts: # docs/project-memory/shared-memory/decision-log.md
This commit is contained in:
@@ -4798,13 +4798,18 @@ export function PlatformEntryFlowShellImpl({
|
||||
woodenFishGenerationState,
|
||||
);
|
||||
const shouldShowExternalGenerationQueueStatus =
|
||||
isExternalGenerationQueueStage(selectionStage);
|
||||
isExternalGenerationQueueStage(selectionStage) ||
|
||||
(selectionStage === 'platform' &&
|
||||
platformBootstrap.platformTab === 'profile' &&
|
||||
platformBootstrap.canReadProtectedData);
|
||||
useEffect(() => {
|
||||
if (!shouldShowExternalGenerationQueueStatus) {
|
||||
setExternalGenerationQueueOverview(null);
|
||||
return;
|
||||
}
|
||||
|
||||
setExternalGenerationQueueOverview(null);
|
||||
|
||||
let disposed = false;
|
||||
let controller: AbortController | null = null;
|
||||
|
||||
@@ -4832,47 +4837,44 @@ export function PlatformEntryFlowShellImpl({
|
||||
controller?.abort();
|
||||
window.clearInterval(intervalId);
|
||||
};
|
||||
}, [shouldShowExternalGenerationQueueStatus]);
|
||||
const puzzleExternalGenerationQueueStatus = useMemo(
|
||||
() =>
|
||||
buildExternalGenerationQueueStatus(
|
||||
externalGenerationQueueOverview,
|
||||
puzzleOperation?.queueState ?? null,
|
||||
),
|
||||
[externalGenerationQueueOverview, puzzleOperation],
|
||||
);
|
||||
const jumpHopExternalGenerationQueueStatus = useMemo(
|
||||
() =>
|
||||
buildExternalGenerationQueueStatus(
|
||||
externalGenerationQueueOverview,
|
||||
jumpHopQueueState,
|
||||
),
|
||||
[externalGenerationQueueOverview, jumpHopQueueState],
|
||||
);
|
||||
const puzzleClearExternalGenerationQueueStatus = useMemo(
|
||||
() =>
|
||||
buildExternalGenerationQueueStatus(
|
||||
externalGenerationQueueOverview,
|
||||
puzzleClearQueueState,
|
||||
),
|
||||
[externalGenerationQueueOverview, puzzleClearQueueState],
|
||||
);
|
||||
const woodenFishExternalGenerationQueueStatus = useMemo(
|
||||
() =>
|
||||
buildExternalGenerationQueueStatus(
|
||||
externalGenerationQueueOverview,
|
||||
woodenFishQueueState,
|
||||
),
|
||||
[externalGenerationQueueOverview, woodenFishQueueState],
|
||||
);
|
||||
}, [authUi?.user?.id, shouldShowExternalGenerationQueueStatus]);
|
||||
const activeExternalGenerationJobState = useMemo(() => {
|
||||
const candidates = [
|
||||
puzzleOperation?.queueState ?? null,
|
||||
jumpHopQueueState,
|
||||
puzzleClearQueueState,
|
||||
woodenFishQueueState,
|
||||
].filter((candidate): candidate is ExternalGenerationJobStatusRecord =>
|
||||
Boolean(candidate),
|
||||
);
|
||||
|
||||
return (
|
||||
candidates.find(
|
||||
(candidate) =>
|
||||
candidate.status === 'queued' || candidate.status === 'running',
|
||||
) ??
|
||||
candidates[0] ??
|
||||
null
|
||||
);
|
||||
}, [
|
||||
jumpHopQueueState,
|
||||
puzzleClearQueueState,
|
||||
puzzleOperation?.queueState,
|
||||
woodenFishQueueState,
|
||||
]);
|
||||
const externalGenerationQueueStatus = useMemo(
|
||||
() =>
|
||||
buildExternalGenerationQueueStatus(
|
||||
externalGenerationQueueOverview,
|
||||
null,
|
||||
activeExternalGenerationJobState,
|
||||
),
|
||||
[externalGenerationQueueOverview],
|
||||
[activeExternalGenerationJobState, externalGenerationQueueOverview],
|
||||
);
|
||||
const profileExternalGenerationQueueStatus =
|
||||
platformBootstrap.canReadProtectedData &&
|
||||
platformBootstrap.platformTab === 'profile'
|
||||
? externalGenerationQueueStatus
|
||||
: null;
|
||||
const platformBootstrapErrorForDisplay = isCreationEntryDisabledErrorMessage(
|
||||
platformBootstrap.platformError,
|
||||
)
|
||||
@@ -15213,6 +15215,7 @@ export function PlatformEntryFlowShellImpl({
|
||||
isLoadingDashboard={platformBootstrap.isLoadingDashboard}
|
||||
hasUnreadDraftUpdate={hasUnreadDraftUpdates}
|
||||
profileTaskRefreshKey={profileTaskRefreshKey}
|
||||
profileGenerationQueueStatus={profileExternalGenerationQueueStatus}
|
||||
isDesktopLayout={isDesktopLayout}
|
||||
isResumingSaveWorldKey={platformBootstrap.isResumingSaveWorldKey}
|
||||
platformError={
|
||||
@@ -15649,7 +15652,6 @@ export function PlatformEntryFlowShellImpl({
|
||||
activeBadgeLabel="草稿生成中"
|
||||
pausedBadgeLabel="草稿生成已暂停"
|
||||
idleBadgeLabel="等待返回工作区"
|
||||
queueStatus={jumpHopExternalGenerationQueueStatus}
|
||||
/>
|
||||
</Suspense>
|
||||
</motion.div>
|
||||
@@ -15794,7 +15796,6 @@ export function PlatformEntryFlowShellImpl({
|
||||
setSelectionStage('match3d-agent-workspace');
|
||||
}}
|
||||
onRetry={retryMatch3DDraftGeneration}
|
||||
queueStatus={puzzleClearExternalGenerationQueueStatus}
|
||||
hideBatchModule
|
||||
/>
|
||||
</Suspense>
|
||||
@@ -16065,7 +16066,6 @@ export function PlatformEntryFlowShellImpl({
|
||||
activeBadgeLabel="草稿生成中"
|
||||
pausedBadgeLabel="草稿生成已暂停"
|
||||
idleBadgeLabel="等待返回工作区"
|
||||
queueStatus={woodenFishExternalGenerationQueueStatus}
|
||||
/>
|
||||
</Suspense>
|
||||
</motion.div>
|
||||
@@ -16266,7 +16266,6 @@ export function PlatformEntryFlowShellImpl({
|
||||
activeBadgeLabel="图片生成中"
|
||||
pausedBadgeLabel="图片生成已暂停"
|
||||
idleBadgeLabel="等待返回结果页"
|
||||
queueStatus={externalGenerationQueueStatus}
|
||||
/>
|
||||
</Suspense>
|
||||
</motion.div>
|
||||
@@ -16471,7 +16470,6 @@ export function PlatformEntryFlowShellImpl({
|
||||
setSelectionStage('jump-hop-workspace');
|
||||
}}
|
||||
onRetry={retryJumpHopDraftGeneration}
|
||||
queueStatus={externalGenerationQueueStatus}
|
||||
/>
|
||||
</Suspense>
|
||||
</motion.div>
|
||||
@@ -16620,7 +16618,6 @@ export function PlatformEntryFlowShellImpl({
|
||||
activeBadgeLabel="素材生成中"
|
||||
pausedBadgeLabel="素材生成已暂停"
|
||||
idleBadgeLabel="等待返回工作区"
|
||||
queueStatus={externalGenerationQueueStatus}
|
||||
/>
|
||||
</Suspense>
|
||||
</motion.div>
|
||||
@@ -16750,7 +16747,6 @@ export function PlatformEntryFlowShellImpl({
|
||||
setSelectionStage('wooden-fish-workspace');
|
||||
}}
|
||||
onRetry={retryWoodenFishDraftGeneration}
|
||||
queueStatus={externalGenerationQueueStatus}
|
||||
/>
|
||||
</Suspense>
|
||||
</motion.div>
|
||||
@@ -16944,7 +16940,6 @@ export function PlatformEntryFlowShellImpl({
|
||||
setSelectionStage('puzzle-agent-workspace');
|
||||
}}
|
||||
onRetry={retryPuzzleDraftGeneration}
|
||||
queueStatus={puzzleExternalGenerationQueueStatus}
|
||||
hideBatchModule
|
||||
/>
|
||||
</Suspense>
|
||||
@@ -17071,7 +17066,6 @@ export function PlatformEntryFlowShellImpl({
|
||||
activeBadgeLabel="草稿生成中"
|
||||
pausedBadgeLabel="草稿生成已暂停"
|
||||
idleBadgeLabel="等待返回工作区"
|
||||
queueStatus={externalGenerationQueueStatus}
|
||||
/>
|
||||
</Suspense>
|
||||
</motion.div>
|
||||
@@ -17315,7 +17309,6 @@ export function PlatformEntryFlowShellImpl({
|
||||
activeBadgeLabel="草稿编译中"
|
||||
pausedBadgeLabel="草稿生成已暂停"
|
||||
idleBadgeLabel="等待返回工作区"
|
||||
queueStatus={externalGenerationQueueStatus}
|
||||
/>
|
||||
</Suspense>
|
||||
</motion.div>
|
||||
|
||||
Reference in New Issue
Block a user