修复生成确认与素材导出
补齐外部生成确认请求的 JSON Content-Type 本地屏蔽已确认终态任务避免轮询重复弹窗 单素材导出改为读取 Blob 后触发浏览器下载 序列帧导出按 frame objectKey 换签读取
This commit is contained in:
@@ -2146,6 +2146,9 @@ export function PlatformEntryFlowShellImpl({
|
||||
const acknowledgingExternalGenerationDialogKeysRef = useRef<Set<string>>(
|
||||
new Set(),
|
||||
);
|
||||
const locallyAcknowledgedExternalGenerationJobIdsRef = useRef<Set<string>>(
|
||||
new Set(),
|
||||
);
|
||||
const [
|
||||
pendingPlatformTaskCompletionDialog,
|
||||
setPendingPlatformTaskCompletionDialog,
|
||||
@@ -4973,6 +4976,7 @@ export function PlatformEntryFlowShellImpl({
|
||||
|
||||
useEffect(() => {
|
||||
acknowledgingExternalGenerationDialogKeysRef.current.clear();
|
||||
locallyAcknowledgedExternalGenerationJobIdsRef.current.clear();
|
||||
setExternalGenerationTasks([]);
|
||||
setExternalGenerationTaskOverview(null);
|
||||
}, [externalGenerationQueueOwnerKey]);
|
||||
@@ -4998,7 +5002,13 @@ export function PlatformEntryFlowShellImpl({
|
||||
})
|
||||
.then((response) => {
|
||||
if (!disposed) {
|
||||
setExternalGenerationTasks(response.tasks);
|
||||
const locallyAcknowledgedJobIds =
|
||||
locallyAcknowledgedExternalGenerationJobIdsRef.current;
|
||||
setExternalGenerationTasks(
|
||||
response.tasks.filter(
|
||||
(task) => !locallyAcknowledgedJobIds.has(task.jobId),
|
||||
),
|
||||
);
|
||||
setExternalGenerationTaskOverview(response.overview);
|
||||
}
|
||||
})
|
||||
@@ -5343,6 +5353,9 @@ export function PlatformEntryFlowShellImpl({
|
||||
}
|
||||
|
||||
const acknowledgedJobIds = new Set(taskJobIds);
|
||||
const locallyAcknowledgedJobIds =
|
||||
locallyAcknowledgedExternalGenerationJobIdsRef.current;
|
||||
taskJobIds.forEach((jobId) => locallyAcknowledgedJobIds.add(jobId));
|
||||
setExternalGenerationTasks((current) =>
|
||||
current.filter((task) => !acknowledgedJobIds.has(task.jobId)),
|
||||
);
|
||||
@@ -5372,6 +5385,11 @@ export function PlatformEntryFlowShellImpl({
|
||||
if (dismissKey) {
|
||||
acknowledgingKeys.delete(dismissKey);
|
||||
}
|
||||
taskJobIds.forEach((jobId) =>
|
||||
locallyAcknowledgedExternalGenerationJobIdsRef.current.delete(
|
||||
jobId,
|
||||
),
|
||||
);
|
||||
});
|
||||
},
|
||||
[],
|
||||
|
||||
Reference in New Issue
Block a user