diff --git a/components/agents/AgentGenerationWorkspaceDarkV2.tsx b/components/agents/AgentGenerationWorkspaceDarkV2.tsx index 052819aad..d541dc34f 100644 --- a/components/agents/AgentGenerationWorkspaceDarkV2.tsx +++ b/components/agents/AgentGenerationWorkspaceDarkV2.tsx @@ -886,97 +886,6 @@ export function AgentGenerationWorkspaceDarkV2({ (image) => image.source === "primary" || image.source === "secondary" ); const hasSatisfiedSlotRequirement = !hasAgentUploadSlots || attachmentCount >= requiredUploadCount; - const workflowSelectionCount = workflowContext?.selections?.length || 0; - const replacementReferenceSummary = isDetailReplacementPreset - ? `${detailReplacementReferenceCards.length} 张详情图` - : isSkuReplacementPreset - ? `${skuReplacementReferenceCards.length} 张 SKU 图` - : "当前模式不需要"; - const taskStatus = !selectedAgentPresetId - ? { - label: "待选模式", - className: "border-white/10 bg-white/[0.06] text-white/72", - } - : hasAgentUploadSlots && !hasSatisfiedSlotRequirement - ? { - label: "待补图", - className: "border-amber-400/20 bg-amber-500/[0.08] text-amber-100", - } - : isDetailReplacementPreset && detailReplacementReferenceCards.length === 0 - ? { - label: "待载入详情图", - className: "border-amber-400/20 bg-amber-500/[0.08] text-amber-100", - } - : isSkuReplacementPreset && skuReplacementReferenceCards.length === 0 - ? { - label: "待载入SKU图", - className: "border-amber-400/20 bg-amber-500/[0.08] text-amber-100", - } - : { - label: "可开始生成", - className: "border-emerald-400/20 bg-emerald-500/[0.08] text-emerald-100", - }; - const taskSummaryItems = [ - { - label: "当前模式", - value: selectedAgentPreset?.name || "未选择", - }, - { - label: "品牌 / 店铺", - value: - workflowContext?.brand || workflowContext?.store - ? `${workflowContext?.brand || "未选品牌"} / ${workflowContext?.store || "未选店铺"}` - : "未选择", - }, - { - label: "产品图", - value: - hasAgentUploadSlots && selectedAgentPreset?.type === "image" - ? `${selectedProductAttachments.length}/${productSlotCount} 张` - : "当前模式无需", - }, - { - label: "模特图", - value: modelSlotEnabled ? (selectedModelAttachment ? "已带入" : "待补充") : "当前模式无需", - }, - { - label: "风格卡片", - value: workflowSelectionCount > 0 ? `${workflowSelectionCount} 项已选` : "待选择", - }, - { - label: "参考图", - value: replacementReferenceSummary, - }, - ]; - const taskDirective = !selectedAgentPresetId - ? { - title: "先选择一个生图模式", - description: "模式会决定后续的输入槽位、参考图区和结果执行方式。", - } - : hasMaterialStep && hasAgentUploadSlots && !hasSatisfiedSlotRequirement - ? { - title: `先补齐剩余 ${missingAttachmentCount} 张输入图`, - description: "输入图没有准备完成前,系统不会开放生成入口,避免用户走到后面才返工。", - } - : hasWorkflowStyleStep && workflowSelectionCount === 0 - ? { - title: "继续选择风格步骤卡片", - description: "把风格卡片补齐后,组合 Prompt 会更完整,结果风格也会更稳定。", - } - : isDetailReplacementPreset && detailReplacementReferenceCards.length === 0 - ? { - title: "先载入详情参考图", - description: "详情替换需要一整套详情参考图,右侧结果会按相同顺序逐屏生成。", - } - : isSkuReplacementPreset && skuReplacementReferenceCards.length === 0 - ? { - title: "先载入 SKU 参考图", - description: "SKU 替换需要先确定一组参考图,系统才会执行一对一替换。", - } - : { - title: "当前已经可以开始生成", - description: "现在只需要检查补充要求和生成参数,就可以直接开始执行。", - }; const slotRequirementMessage = hasAgentUploadSlots && !hasSatisfiedSlotRequirement ? `当前还缺少 ${missingAttachmentCount} 张输入图,请先在“选择 SPU / SKU”步骤补齐后再继续。` @@ -992,51 +901,6 @@ export function AgentGenerationWorkspaceDarkV2({ : hasMaterialStep || hasWorkflowStyleStep ? "03" : "02"; - const unifiedAnchorSteps = useMemo( - () => { - const steps = [ - { - id: "agent-anchor-mode", - badge: "01", - label: "选择生图模式", - description: "先确定本次要执行的生图模式", - }, - ]; - - if (hasMaterialStep) { - steps.push({ - id: "agent-anchor-materials", - badge: "02", - label: "选择 SPU / SKU", - description: "查询商品图并确定本次输入素材", - }); - } - - if (hasWorkflowStyleStep) { - steps.push({ - id: "agent-anchor-style", - badge: hasMaterialStep ? "03" : "02", - label: "风格步骤卡片", - description: "补齐风格、品牌和模特等工作流配置", - }); - } - - steps.push({ - id: "agent-anchor-generate", - badge: - hasMaterialStep && hasWorkflowStyleStep - ? "04" - : hasMaterialStep || hasWorkflowStyleStep - ? "03" - : "02", - label: "生图与结果预览", - description: "确认参数后直接生成,并在底部查看结果", - }); - - return steps; - }, - [hasMaterialStep, hasWorkflowStyleStep] - ); const toolSteps = useMemo( () => [ @@ -1546,53 +1410,6 @@ export function AgentGenerationWorkspaceDarkV2({ } target.scrollIntoView({ behavior: "smooth", block: "start" }); }, [hasAgentUploadSlots, hasMaterialStep, hasSatisfiedSlotRequirement, slotRequirementMessage]); - const taskSummaryAction = useMemo(() => { - if (!selectedAgentPresetId) { - return { - label: "去选模式", - sectionId: "agent-anchor-mode", - }; - } - if (hasMaterialStep && hasAgentUploadSlots && !hasSatisfiedSlotRequirement) { - return { - label: "去补图", - sectionId: "agent-anchor-materials", - }; - } - if (hasWorkflowStyleStep && workflowSelectionCount === 0) { - return { - label: "去选风格", - sectionId: "agent-anchor-style", - }; - } - if (isDetailReplacementPreset && detailReplacementReferenceCards.length === 0) { - return { - label: "去查详情图", - sectionId: "agent-anchor-results", - }; - } - if (isSkuReplacementPreset && skuReplacementReferenceCards.length === 0) { - return { - label: "去查SKU参考图", - sectionId: "agent-anchor-results", - }; - } - return { - label: "前往生成区", - sectionId: "agent-anchor-generate", - }; - }, [ - detailReplacementReferenceCards.length, - hasAgentUploadSlots, - hasMaterialStep, - hasSatisfiedSlotRequirement, - hasWorkflowStyleStep, - isDetailReplacementPreset, - isSkuReplacementPreset, - selectedAgentPresetId, - skuReplacementReferenceCards.length, - workflowSelectionCount, - ]); const updateDetailReplacementState = useCallback( ( updater: @@ -1994,100 +1811,6 @@ 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)]" > -