From 2f48fc1d4c80a4c25a04d5f4e1e6c19fbb3528db Mon Sep 17 00:00:00 2001
From: hit-cxf <2024111082@stu.hit.edu.cn>
Date: Thu, 23 Apr 2026 11:53:33 +0800
Subject: [PATCH] fix: add kimi to models.ts

---
 aigc-director/aigc-claw/frontend/components/stages/StageActions.tsx |   30 ++++++++++++++++--------------
 1 files changed, 16 insertions(+), 14 deletions(-)

diff --git a/aigc-director/aigc-claw/frontend/components/stages/StageActions.tsx b/aigc-director/aigc-claw/frontend/components/stages/StageActions.tsx
index d7c92d5..828dd38 100644
--- a/aigc-director/aigc-claw/frontend/components/stages/StageActions.tsx
+++ b/aigc-director/aigc-claw/frontend/components/stages/StageActions.tsx
@@ -4,10 +4,10 @@
 import { CheckCircle, Edit3, Save, RefreshCw, Check, Loader2, Play } from 'lucide-react';
 import type { StageStatus } from './types';
 
-// 需要"继续生成"的阶段(2、4、5)
-const STAGES_WITH_CONTINUE = ['character_design', 'reference_generation', 'video_generation'];
-// 需要检查后续阶段的阶段(1、3)
-const STAGES_WITH_NEXT_CHECK = ['script_generation', 'storyboard'];
+// 需要"继续生成"的阶段(2、3、4、5)
+const STAGES_WITH_CONTINUE = ['character_design', 'storyboard', 'reference_generation', 'video_generation'];
+// 需要检查后续阶段的阶段(1)
+const STAGES_WITH_NEXT_CHECK = ['script_generation'];
 
 interface StageActionsProps {
   status: StageStatus;
@@ -18,9 +18,9 @@
   onRegenerate?: () => void;
   /** 阶段ID */
   stageId?: string;
-  /** 是否有待生成的项(用于阶段2、4、5) */
+  /** 是否有待生成的项(用于阶段2、3、4、5) */
   hasPendingItems?: boolean;
-  /** 后续阶段是否已开始(用于阶段1、3) */
+  /** 后续阶段是否已开始(用于阶段1) */
   hasNextStageStarted?: boolean;
   /** 是否显示"确认并继续"按钮(后续阶段已执行过时隐藏) */
   showConfirm?: boolean;
@@ -42,19 +42,21 @@
 }: StageActionsProps) {
   const [saveState, setSaveState] = useState<'idle' | 'saving' | 'saved'>('idle');
 
-  // 是否是"继续生成"阶段(2、4、5)
+  // 是否是"继续生成"阶段(2、3、4、5)
   const isContinueStage = STAGES_WITH_CONTINUE.includes(stageId);
-  // 是否是"重新生成"阶段(1、3)
+  // 是否是"重新生成"阶段(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 状态显示
@@ -80,7 +82,7 @@
 
   return (
     <div className="border-t border-gray-200 bg-white px-6 py-4 flex items-center justify-between gap-3 flex-shrink-0">
-      {/* 左侧:重新生成按钮 */}
+      {/* 左侧:重新生成/继续生成按钮 */}
       <div>
         {showRegen && (
           <button

--
Gitblit v1.8.0