mirror of https://github.com/langgenius/dify.git
fix: http var inputs
This commit is contained in:
parent
8c55ff392d
commit
41cce464ca
|
|
@ -6,6 +6,7 @@ import { Variable02 } from '@/app/components/base/icons/src/vender/solid/develop
|
|||
import { VarBlockIcon } from '@/app/components/workflow/block-icon'
|
||||
import { BlockEnum } from '@/app/components/workflow/types'
|
||||
import { Line3 } from '@/app/components/base/icons/src/public/common'
|
||||
import { isSystemVar } from '@/app/components/workflow/nodes/_base/components/variable/utils'
|
||||
|
||||
type WorkflowVariableBlockComponentProps = {
|
||||
nodeKey: string
|
||||
|
|
@ -22,7 +23,7 @@ const WorkflowVariableBlockComponent: FC<WorkflowVariableBlockComponentProps> =
|
|||
const node = getWorkflowNode(variables[0])
|
||||
const outputVarNode = node?.data
|
||||
const variablesLength = variables.length
|
||||
const lastVariable = variables[variablesLength - 1]
|
||||
const lastVariable = isSystemVar(variables) ? variables.join('.') : variables[variablesLength - 1]
|
||||
|
||||
return (
|
||||
<div
|
||||
|
|
|
|||
|
|
@ -6,14 +6,13 @@ import {
|
|||
useNodeDataUpdate,
|
||||
useWorkflow,
|
||||
} from '@/app/components/workflow/hooks'
|
||||
import { getNodeInfoById, toNodeOutputVars } from '@/app/components/workflow/nodes/_base/components/variable/utils'
|
||||
import { getNodeInfoById, isSystemVar, toNodeOutputVars } from '@/app/components/workflow/nodes/_base/components/variable/utils'
|
||||
|
||||
import type { CommonNodeType, InputVar, ValueSelector, Var, Variable } from '@/app/components/workflow/types'
|
||||
import { BlockEnum, InputVarType, NodeRunningStatus, VarType } from '@/app/components/workflow/types'
|
||||
import { useStore as useAppStore } from '@/app/components/app/store'
|
||||
import { singleNodeRun } from '@/service/workflow'
|
||||
import Toast from '@/app/components/base/toast'
|
||||
|
||||
import LLMDefault from '@/app/components/workflow/nodes/llm/default'
|
||||
import KnowledgeRetrievalDefault from '@/app/components/workflow/nodes/knowledge-retrieval/default'
|
||||
import IfElseDefault from '@/app/components/workflow/nodes/if-else/default'
|
||||
|
|
@ -247,7 +246,7 @@ const useOneStepRun = <T>({
|
|||
label: {
|
||||
nodeType: varInfo?.type,
|
||||
nodeName: varInfo?.title || availableNodes[0]?.data.title, // default start node title
|
||||
variable: item[item.length - 1],
|
||||
variable: isSystemVar(item) ? item.join('.') : item[item.length - 1],
|
||||
},
|
||||
variable: `#${item.join('.')}#`,
|
||||
value_selector: item,
|
||||
|
|
|
|||
Loading…
Reference in New Issue