diff --git a/web/app/components/workflow/nodes/_base/hooks/use-available-var-list.ts b/web/app/components/workflow/nodes/_base/hooks/use-available-var-list.ts index ef3d6659102b4..b81feab805370 100644 --- a/web/app/components/workflow/nodes/_base/hooks/use-available-var-list.ts +++ b/web/app/components/workflow/nodes/_base/hooks/use-available-var-list.ts @@ -7,12 +7,16 @@ import { import type { ValueSelector, Var } from '@/app/components/workflow/types' type Params = { onlyLeafNodeVar?: boolean + hideEnv?: boolean + hideChatVar?: boolean filterVar: (payload: Var, selector: ValueSelector) => boolean } const useAvailableVarList = (nodeId: string, { onlyLeafNodeVar, filterVar, + hideEnv, + hideChatVar, }: Params = { onlyLeafNodeVar: false, filterVar: () => true, @@ -32,6 +36,8 @@ const useAvailableVarList = (nodeId: string, { beforeNodes: availableNodes, isChatMode, filterVar, + hideEnv, + hideChatVar, }) return { diff --git a/web/app/components/workflow/nodes/answer/panel.tsx b/web/app/components/workflow/nodes/answer/panel.tsx index feb07c36c9aa6..daa5be4e666d1 100644 --- a/web/app/components/workflow/nodes/answer/panel.tsx +++ b/web/app/components/workflow/nodes/answer/panel.tsx @@ -23,6 +23,8 @@ const Panel: FC> = ({ const { availableVars, availableNodesWithParent } = useAvailableVarList(id, { onlyLeafNodeVar: false, + hideChatVar: true, + hideEnv: true, filterVar, })