From cb4cf5033723570ef07357f85fda257792c17439 Mon Sep 17 00:00:00 2001 From: Your Name Date: Mon, 23 Mar 2026 10:15:15 +0800 Subject: [PATCH] feat: refine agent workflow step timeline --- .../agents/AgentGenerationWorkspaceDarkV2.tsx | 20 ++--- .../agents/AgentWorkflowPanelDarkV2.tsx | 89 +++++++++++-------- 2 files changed, 63 insertions(+), 46 deletions(-) diff --git a/components/agents/AgentGenerationWorkspaceDarkV2.tsx b/components/agents/AgentGenerationWorkspaceDarkV2.tsx index ba722d3a9..7250580c7 100644 --- a/components/agents/AgentGenerationWorkspaceDarkV2.tsx +++ b/components/agents/AgentGenerationWorkspaceDarkV2.tsx @@ -2337,7 +2337,7 @@ export function AgentGenerationWorkspaceDarkV2({ 默认载入最新一套,可随时切换 -
+
{detailReplacementCandidates.map((candidate) => { const isSelected = detailReplacementSelectedCandidateId === candidate.id; const previewUrls = getCandidatePreviewUrls( @@ -2369,14 +2369,14 @@ export function AgentGenerationWorkspaceDarkV2({ type="button" onClick={() => handleSelectDetailReplacementCandidate(candidate.id)} className={cn( - "group relative min-w-0 overflow-hidden rounded-2xl border p-2.5 text-left transition-all duration-300", + "group relative min-w-0 overflow-hidden rounded-2xl border p-2 text-left transition-all duration-300", isSelected ? "border-emerald-400/40 bg-emerald-500/[0.08] shadow-[0_0_24px_rgba(16,185,129,0.14)]" : "border-white/10 bg-white/[0.03] hover:border-white/20 hover:bg-white/[0.06]" )} >
-
+
{primaryPreviewUrl ? (
-
-
+
+
{candidate.sceneName || candidate.taskNo || candidate.productModel || "候选整套"}
-
+
{summaryBadges.map((badge, badgeIndex) => ( ))}
-
+
场景名称:{candidate.sceneName || candidate.productModel || "未命名整套"}
@@ -2420,13 +2420,13 @@ export function AgentGenerationWorkspaceDarkV2({ 任务编号:{candidate.taskNo || "未记录"}
-
+
店铺:{candidate.shopName || "未记录"}
更新时间:{uploadedAtText}
{isSelected ? ( -
+
) : null}
diff --git a/components/agents/AgentWorkflowPanelDarkV2.tsx b/components/agents/AgentWorkflowPanelDarkV2.tsx index bf2274aa5..3207d58a9 100644 --- a/components/agents/AgentWorkflowPanelDarkV2.tsx +++ b/components/agents/AgentWorkflowPanelDarkV2.tsx @@ -1,6 +1,6 @@ "use client"; -import { useEffect, useMemo, useState, type ReactNode } from "react"; +import { Fragment, useEffect, useMemo, useState, type ReactNode } from "react"; import { motion } from "framer-motion"; import { ArrowRight, Check, Copy, Sparkles, ChevronRight } from "lucide-react"; import { toast } from "sonner"; @@ -516,7 +516,8 @@ export function AgentWorkflowPanelDarkV2({ animate={{ opacity: 1, y: 0 }} >
-
+
+
{flattenedResolvedSteps.map(({ step }, stepIndex) => { const completed = isAgentWorkflowStepSelectionComplete({ step, @@ -526,52 +527,68 @@ export function AgentWorkflowPanelDarkV2({ const stepSummary = stepSelectionSummaryMap[step.key] || ""; return ( - + + {stepIndex < flattenedResolvedSteps.length - 1 ? ( +
+ ) : null} + ); })} +