diff --git a/components/pages/work-flow.tsx b/components/pages/work-flow.tsx
index 88b3e6a..5ca4c15 100644
--- a/components/pages/work-flow.tsx
+++ b/components/pages/work-flow.tsx
@@ -445,7 +445,7 @@ Please process this video editing request.`;
{/* 左侧最终视频缩略图栏(仅桌面) */}
{taskObject?.final?.url && (
diff --git a/components/pages/work-flow/H5MediaViewer.tsx b/components/pages/work-flow/H5MediaViewer.tsx
index 02f6c2e..b9ffd7d 100644
--- a/components/pages/work-flow/H5MediaViewer.tsx
+++ b/components/pages/work-flow/H5MediaViewer.tsx
@@ -80,7 +80,7 @@ export function H5MediaViewer({
// 计算当前阶段类型
const stage = (selectedView === 'final' && taskObject.final?.url)
? 'final_video'
- : (selectedView === 'video' ? 'video' : taskObject.currentStage);
+ : (!['script', 'character', 'scene'].includes(taskObject.currentStage) ? 'video' : taskObject.currentStage);
// 生成各阶段对应的 slides 数据
const videoUrls = useMemo(() => {
diff --git a/components/pages/work-flow/media-viewer.tsx b/components/pages/work-flow/media-viewer.tsx
index 4620d27..9736e5b 100644
--- a/components/pages/work-flow/media-viewer.tsx
+++ b/components/pages/work-flow/media-viewer.tsx
@@ -739,7 +739,7 @@ export const MediaViewer = React.memo(function MediaViewer({
// 计算生效阶段:selectedView 优先于 taskObject.currentStage
const effectiveStage = (selectedView === 'final' && taskObject.final?.url)
? 'final_video'
- : (selectedView === 'video' ? 'video' : taskObject.currentStage);
+ : (!['script', 'character', 'scene'].includes(taskObject.currentStage) ? 'video' : taskObject.currentStage);
// 根据当前步骤渲染对应内容
if (effectiveStage === 'final_video') {
@@ -755,7 +755,9 @@ export const MediaViewer = React.memo(function MediaViewer({
}
if (effectiveStage === 'scene' || effectiveStage === 'character') {
- return renderSketchContent([...taskObject.roles.data, ...taskObject.scenes.data][currentSketchIndex]);
+ const allSketches = [...(taskObject.roles?.data || []), ...(taskObject.scenes?.data || [])];
+ const currentSketch = allSketches[currentSketchIndex];
+ return renderSketchContent(currentSketch);
}
diff --git a/components/pages/work-flow/use-workflow-data.tsx b/components/pages/work-flow/use-workflow-data.tsx
index 1b12bf6..686799f 100644
--- a/components/pages/work-flow/use-workflow-data.tsx
+++ b/components/pages/work-flow/use-workflow-data.tsx
@@ -691,7 +691,8 @@ export function useWorkflowData({ onEditPlanGenerated, editingStatus, onExportFa
});
// 设置是否需要获取流式数据
- setNeedStreamData(taskCurrent.status !== 'COMPLETED');
+ // setNeedStreamData(taskCurrent.status !== 'COMPLETED');
+ setNeedStreamData(true);
} catch (error) {
console.error('初始化失败:', error);
@@ -704,7 +705,7 @@ export function useWorkflowData({ onEditPlanGenerated, editingStatus, onExportFa
isLoading: false
});
}
- }, [episodeId, initializeFromProject]);
+ }, [episodeId]);
// 重试生成视频
const handleRetryVideo = async (video_id: string) => {