hit-cxf
2026-04-06 286b5100ae3d2fe4339f56fe6d4b5e272210daa2
aigc-director/aigc-claw/frontend/components/WorkflowPanel.tsx
@@ -378,6 +378,11 @@
            artifact = artResult.artifact;
          } catch { /* ignore */ }
          // 如果是后处理阶段,即使 artifact 为空也尝试从事件中读取预览数据
          if (stageId === 'post_production' && !artifact && event.data?.assets_preview) {
            artifact = event.data.assets_preview;
          }
          updateStageState(stageId, {
            status: newStatus,
            progress: 100,
@@ -452,6 +457,7 @@
        enable_concurrency: params.enable_concurrency,
        web_search: params.web_search,
        expand_idea: params.expand_idea,
        episodes: params.episodes,
      });
      setSessionId(result.session_id);
@@ -1180,6 +1186,11 @@
      ? stageStates['reference_generation']?.artifact
      : undefined;
    // 传递第1阶段的 artifact 到第4、5、6阶段用于获取剧集标题
    const scriptArtifact = (activeStage === 'reference_generation' || activeStage === 'video_generation' || activeStage === 'post_production')
      ? stageStates['script_generation']?.artifact
      : undefined;
    return (
      <Component
        state={state}
@@ -1200,6 +1211,11 @@
          if (params.videoShotType !== undefined) setVideoShotType(params.videoShotType);
        }}
        referenceArtifact={referenceArtifact}
        scriptArtifact={scriptArtifact}
        artifacts={Object.keys(stageStates).reduce((acc: any, key) => {
          acc[key] = stageStates[key].artifact;
          return acc;
        }, {})}
      />
    );
  };