From d915e9d9807f957f751060f23d24e2e138c47fae Mon Sep 17 00:00:00 2001 From: jZonG Date: Wed, 21 May 2025 10:04:46 +0800 Subject: [PATCH] display visible var in var tree --- web/app/components/workflow/variable-inspect/group.tsx | 6 ++++-- web/types/workflow.ts | 1 + 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/web/app/components/workflow/variable-inspect/group.tsx b/web/app/components/workflow/variable-inspect/group.tsx index 26d24e8202..e7d779ddf7 100644 --- a/web/app/components/workflow/variable-inspect/group.tsx +++ b/web/app/components/workflow/variable-inspect/group.tsx @@ -47,6 +47,8 @@ const Group = ({ const isChatVar = varType === VarInInspectType.conversation const isSystem = varType === VarInInspectType.system + const visibleVarList = varList.filter(v => v.visible) + const handleSelectVar = (varItem: any, type?: string) => { if (type === VarInInspectType.environment) { handleSelect({ @@ -101,7 +103,7 @@ const Group = ({ {nodeData?.isSingRunRunning && ( )} - {(!nodeData || !nodeData.isSingRunRunning) && ( + {(!nodeData || !nodeData.isSingRunRunning || visibleVarList.length > 0) && ( setIsCollapsed(!isCollapsed)} /> )}
setIsCollapsed(!isCollapsed)}> @@ -141,7 +143,7 @@ const Group = ({ {/* var item list */} {!isCollapsed && !nodeData?.isSingRunRunning && (
- {varList.length > 0 && varList.map(varItem => ( + {visibleVarList.length > 0 && visibleVarList.map(varItem => (