diff --git a/components/agents/AgentGenerationWorkspaceDarkV2.tsx b/components/agents/AgentGenerationWorkspaceDarkV2.tsx index f48b9f60d..b66e05e7a 100644 --- a/components/agents/AgentGenerationWorkspaceDarkV2.tsx +++ b/components/agents/AgentGenerationWorkspaceDarkV2.tsx @@ -1750,14 +1750,7 @@ export function AgentGenerationWorkspaceDarkV2({ transition={{ delay: 0.06 }} className="rounded-[28px] border border-white/12 bg-white/[0.04] p-5 shadow-[inset_0_1px_0_rgba(255,255,255,0.03)]" > -
-
-
Workflow Anchors
-

单页生图流程

-

- 在同一页面完成生图模式选择、SPU / SKU 选图、风格步骤配置、生成和结果预览。 -

-
+
{unifiedAnchorSteps.map((step) => ( + )}
); } diff --git a/components/agents/AgentWorkflowPanelDarkV2.tsx b/components/agents/AgentWorkflowPanelDarkV2.tsx index 2c3dcfb4f..a6c97f892 100644 --- a/components/agents/AgentWorkflowPanelDarkV2.tsx +++ b/components/agents/AgentWorkflowPanelDarkV2.tsx @@ -235,6 +235,7 @@ export function AgentWorkflowPanelDarkV2({ [resolvedConfig, selections] ); const [activeEmbeddedStepKey, setActiveEmbeddedStepKey] = useState(""); + const [pendingAutoAdvanceStepKey, setPendingAutoAdvanceStepKey] = useState(null); const activeEmbeddedStepIndex = Math.max( flattenedResolvedSteps.findIndex(({ step }) => step.key === activeEmbeddedStepKey), 0 @@ -269,6 +270,10 @@ export function AgentWorkflowPanelDarkV2({ return; } + if (pendingAutoAdvanceStepKey !== activeEmbeddedStepEntry.step.key) { + return; + } + const currentStepComplete = isAgentWorkflowStepSelectionComplete({ step: activeEmbeddedStepEntry.step, selectionValue: selections[activeEmbeddedStepEntry.step.key], @@ -290,12 +295,15 @@ export function AgentWorkflowPanelDarkV2({ if (nextStep && nextStep.step.key !== activeEmbeddedStepKey) { setActiveEmbeddedStepKey(nextStep.step.key); } + + setPendingAutoAdvanceStepKey(null); }, [ activeEmbeddedStepEntry, activeEmbeddedStepIndex, activeEmbeddedStepKey, embedded, flattenedResolvedSteps, + pendingAutoAdvanceStepKey, selections, ]); @@ -341,6 +349,7 @@ export function AgentWorkflowPanelDarkV2({ const prefix = parentPath.slice(0, depth - 1); const nextKeys = currentSelectedKey === option.key ? prefix : [...prefix, option.key]; + setPendingAutoAdvanceStepKey(step.key); onSelectionsChange({ ...selections, [step.key]: nextKeys.length > 0 ? serializeAgentWorkflowSelectionPath(nextKeys) : undefined, @@ -451,7 +460,10 @@ export function AgentWorkflowPanelDarkV2({