+ {#if currentStage?.error || (currentStage?.last_run?.status === "failed" && currentStage?.last_run?.error)}
+ {currentStage.last_run?.error ?? currentStage.error}
+
{/if}
+ {#if stageStatus === "awaiting_confirm"}
+ {currentAgent?.name ?? STAGE_LABEL[stageKey] + "助手"}交回了本阶段草稿。确认后才会交给下一阶段使用。
+
{/if}
+ {#if stageStatus === "running"}
+ {t("workbench.runningHint", {
+ agent: agentName(stageKey),
+ })}
+
{/if}
+
+ {#if panelProps}
+
+ {#if currentStage?.assistant_note || noteOpen}
+ 助手建议 · 待整理到阶段内容
+ {#if noteOpen}
+
+
+
+ {:else}{currentStage?.assistant_note}
+ {/if}
+ {/if}
+ {#if stageKey === "script"}
+
+ $saveMutation.mutate({ key: "script", content })}
+ onImport={(text) => $importMutation.mutate(text)}
+ onRun={() => handleRun("script")}
+ />
+ {:else if stageKey === "style"}
+
+ $saveMutation.mutate({ key: "style", content })}
+ onRun={() => handleRun("style")}
+ />
+ {:else if stageKey === "storyboard"}
+
+ $saveMutation.mutate({ key: "storyboard", content })}
+ onRun={() => handleRun("storyboard")}
+ />
+ {:else if stageKey === "assets"}
+
+ $saveMutation.mutate({ key: "assets", content })}
+ onRun={() => handleRun("assets")}
+ {onGenerate}
+ onRetryJob={(jobId) => $retryMutation.mutate(jobId)}
+ />
+ {:else}
+
+ $saveMutation.mutate({ key: "shot", content })}
+ onRun={() => handleRun("shot")}
+ {onGenerate}
+ onRetryJob={(jobId) => $retryMutation.mutate(jobId)}
+ />
+ {/if}
+
+ {/if}
+
+