From 9558cb63d47ecf231b55ecf8ce09481bcd63e3cd Mon Sep 17 00:00:00 2001
From: hit-cxf <2024111082@stu.hit.edu.cn>
Date: Thu, 09 Apr 2026 12:01:51 +0800
Subject: [PATCH] 添加了续写功能
---
aigc-director/aigc-claw/frontend/components/stages/StageActions.tsx | 12 +++++++-----
1 files changed, 7 insertions(+), 5 deletions(-)
diff --git a/aigc-director/aigc-claw/frontend/components/stages/StageActions.tsx b/aigc-director/aigc-claw/frontend/components/stages/StageActions.tsx
index 7617576..828dd38 100644
--- a/aigc-director/aigc-claw/frontend/components/stages/StageActions.tsx
+++ b/aigc-director/aigc-claw/frontend/components/stages/StageActions.tsx
@@ -47,14 +47,16 @@
// 是否是"重新生成"阶段(1)
const isRegenStage = STAGES_WITH_NEXT_CHECK.includes(stageId);
- // 重新生成/继续生成按钮:在 waiting / completed / error / stopped 状态下显示
- const showRegen = !!onRegenerate && (status === 'waiting' || status === 'completed' || status === 'error' || status === 'stopped');
+ // 重新生成/继续生成按钮:在 != 'running' 状态下显示 (pending时也不会到这个组件)
+ const showRegen = !!onRegenerate && status !== 'running';
// 按钮是否禁用逻辑
let isButtonDisabled = isRunning;
- if (!isRunning) {
- if (isContinueStage && !hasPendingItems && status !== 'error') isButtonDisabled = true;
- if (isRegenStage && hasNextStageStarted) isButtonDisabled = true;
+ if (!isRunning && stageId) {
+ // 除了第一阶段和第六阶段外,completed 状态下禁用继续生成
+ if (stageId !== 'script_generation' && stageId !== 'post_production' && status === 'completed') {
+ isButtonDisabled = true;
+ }
}
// 其余按钮在 waiting、running、completed、stopped 状态显示
--
Gitblit v1.8.0