fix: http var inputs

This commit is contained in:
Joel 2024-04-01 19:34:04 +08:00
parent 8c55ff392d
commit 41cce464ca
2 changed files with 4 additions and 4 deletions

View File

@ -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

View File

@ -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,