feat(web): 节点增加入参变量

This commit is contained in:
v-zhangjc9
2025-06-27 10:04:48 +08:00
parent 635c6537ed
commit 6e667c45e1
6 changed files with 78 additions and 69 deletions

View File

@@ -1,6 +1,6 @@
import type {NodeProps} from '@xyflow/react'
import {commonInfo} from '../../../../util/amis.tsx'
import AmisNode from './AmisNode.tsx'
import AmisNode, {inputsFormColumns, outputsFormColumns} from './AmisNode.tsx'
const KnowledgeNode = (props: NodeProps) => AmisNode({
nodeProps: props,
@@ -8,6 +8,10 @@ const KnowledgeNode = (props: NodeProps) => AmisNode({
defaultNodeName: '知识库',
defaultNodeDescription: '查询知识库获取外部知识',
columnSchema: [
...inputsFormColumns(),
{
type: 'divider',
},
{
type: 'select',
name: 'knowledgeId',
@@ -51,6 +55,10 @@ const KnowledgeNode = (props: NodeProps) => AmisNode({
max: 1,
step: 0.05,
},
{
type: 'divider',
},
...outputsFormColumns(false, true, {result: {type: 'array-string'}}),
],
})