diff --git a/components/agents/AgentWorkflowPanelDarkV2.tsx b/components/agents/AgentWorkflowPanelDarkV2.tsx index 6766003ad..0082df0b4 100644 --- a/components/agents/AgentWorkflowPanelDarkV2.tsx +++ b/components/agents/AgentWorkflowPanelDarkV2.tsx @@ -634,6 +634,24 @@ export function AgentWorkflowPanelDarkV2({ }); const active = step.key === activeEmbeddedStepEntry.step.key; const stepSummary = stepSelectionSummaryMap[step.key] || ""; + const stepOptionLevels = getWorkflowStepOptionLevels({ + step, + selectionValue: selections[step.key], + }); + const deepestSelectedLevel = Math.max( + 0, + ...stepOptionLevels.map((level) => (level.selectedKey ? level.depth : 0)) + ); + const activeStepChildLabel = + active && stepOptionLevels.length > 1 + ? `${ + activeEmbeddedOptionLevel?.depth === 1 + ? "主卡片" + : `${activeEmbeddedOptionLevel?.depth || 1}级子卡片` + }` + : deepestSelectedLevel > 1 + ? `已到 ${deepestSelectedLevel} 级` + : ""; return ( @@ -683,6 +701,16 @@ export function AgentWorkflowPanelDarkV2({ > {stepSummary || "待选择"} + {activeStepChildLabel ? ( + + {activeStepChildLabel} + + ) : null} {stepIndex < flattenedResolvedSteps.length - 1 ? (
- {activeEmbeddedOptionLevels.length > 1 ? ( -
-
-
-
子节点流程
-
- 当前步骤的子节点会在这里逐级展开,减少单屏内容堆积。 -
-
-
- 共 {activeEmbeddedOptionLevels.length} 级 -
-
-
- {activeEmbeddedOptionLevels.map((level, levelIndex) => { - const isActive = level.depth === activeEmbeddedOptionDepth; - const summaryText = - level.selectedOption?.buttonName || "待选择"; - return ( - - - {levelIndex < activeEmbeddedOptionLevels.length - 1 ? ( -
- ) : null} - - ); - })} -
-
- ) : null}
{activeEmbeddedOptionLevel ? (