diff --git a/frontend-web/src/roundtable-planning/pages/BusinessChainEditorPage.tsx b/frontend-web/src/roundtable-planning/pages/BusinessChainEditorPage.tsx index e28c07e5..5587e1fa 100644 --- a/frontend-web/src/roundtable-planning/pages/BusinessChainEditorPage.tsx +++ b/frontend-web/src/roundtable-planning/pages/BusinessChainEditorPage.tsx @@ -63,12 +63,6 @@ import { import { CSS } from "@dnd-kit/utilities"; import { cn } from "@/lib/utils"; -import { - Dialog, - DialogContent, - DialogHeader, - DialogTitle, -} from "@/components/ui/dialog"; import { TagSearchBar } from "@/components/workspace/tags/tag-search-bar"; import { listAgents } from "@/core/agents"; @@ -112,7 +106,6 @@ import { type StageGroups, } from "@/roundtable-planning/lib/chain-stages"; import { getAvatarTypeFor } from "@/roundtable-planning/lib/roundtable-constants"; -import { DagFlowChart } from "@/roundtable-planning/components/DagFlowChart"; import { ChainFlowDiagram } from "@/roundtable-planning/components/ChainFlowDiagram"; import { AgentDetailSheet } from "@/roundtable-planning/components/AgentDetailSheet"; @@ -166,8 +159,7 @@ export default function BusinessChainEditorPage() { const [activeDrag, setActiveDrag] = useState(null); const [dropdownOpen, setDropdownOpen] = useState(false); - const [flowOpen, setFlowOpen] = useState(false); - // 两步向导:1=基本信息(标题/描述/总控提示词),2=链条编排(双栏拖拽编辑器)。 + // 两步向导:1=链条编排(双栏拖拽编辑器),2=基本信息(标题/描述/总控提示词 + 流程图预览)。 const [step, setStep] = useState<1 | 2>(1); // 详情抽屉:左栏点卡片本体、右栏点「查看详情」都打开它,展示该智能体详情。 const [detailAgent, setDetailAgent] = useState<{ id: string; name?: string } | null>(null); @@ -207,29 +199,7 @@ export default function BusinessChainEditorPage() { ); // ─── Phase 7 只读流程图预览(§2.2 底部 / §7)────────────────────────────── - // 把当前分层(去掉空 stage)映射成 DagFlowChart 的 stages,并提供席位名/配色解析。 - const previewStages = useMemo( - () => - stageGroups - .filter((g) => g.seats.length > 0) - .map((g, i) => ({ id: `stage-${i}`, agentIds: g.seats.map((s) => s.agent_id) })), - [stageGroups], - ); - const seatNameById = useMemo(() => { - const m = new Map(); - for (const g of displayStageGroups) - for (const s of g.seats) m.set(s.agent_id.toLowerCase(), s.name || s.agent_id); - return m; - }, [displayStageGroups]); - const resolvePreviewSeat = useCallback( - (agentId: string, order: number) => ({ - name: seatNameById.get(agentId.toLowerCase()) ?? agentId, - avatarType: getAvatarTypeFor(agentId, order), - }), - [seatNameById], - ); - - // 步骤一右侧「精美流程图」的数据源:过滤空 stage,带上各阶段目标作为依赖标签。 + // 步骤二右侧「精美流程图」的数据源:过滤空 stage,带上各阶段目标作为依赖标签。 const flowStages = useMemo( () => displayStageGroups @@ -1129,8 +1099,8 @@ export default function BusinessChainEditorPage() { )} {/* Phase 7:分层 DAG 只读流程图预览(§2.2 底部)。空编排时不渲染。 - 改为弹窗查看:底栏一个入口按钮,点击后在 Dialog 内展示完整流程图。 */} - {step === 1 && previewStages.length > 0 && ( + 底栏入口按钮直接进入第二步「基本信息」,右侧展示完整流程图。 */} + {step === 1 && hasFlowContent && (
编排预览 @@ -1140,7 +1110,7 @@ export default function BusinessChainEditorPage() {
)} - {/* 编排流程图弹窗 */} - {previewStages.length > 0 && ( - - - - - - 编排流程图 - - -
- -
-
-
- )} - {/* 智能体详情抽屉(左栏卡片 / 右栏席位共用) */}