| | |
| | | v-model:title="data.title" |
| | | :type="NodeType.Agent" |
| | | :description="VueFlowHelper.getConfigValue(data, 'description', '')" |
| | | :isViewMode="isViewMode" |
| | | > |
| | | <Handle :id="targetHandleId" type="target" :position="Position.Left" /> |
| | | |
| | |
| | | <el-select |
| | | class="w-[340px]" |
| | | filterable |
| | | :disabled="isViewMode" |
| | | :placeholder="VueFlowHelper.getConfigValue(agentParams, 'placeholder', '代理名称')" |
| | | v-model="agentParams.value" |
| | | @change="agentParamsValueChange" |
| | |
| | | </template> |
| | | |
| | | <script lang="ts" setup> |
| | | import { Handle, Position, useNode, useVueFlow } from '@vue-flow/core'; |
| | | import { Handle, Position, useNode } from '@vue-flow/core'; |
| | | import { ref } from 'vue'; |
| | | import { VueFlowHelper } from '../../VueFlowHelper'; |
| | | |
| | | import { NodeType } from '../../vueFlowEnum'; |
| | | import FieldLayout from './components/FieldLayout.vue'; |
| | | import NodeBasicLayout from './components/NodeBasicLayout.vue'; |
| | | import { NodeType } from '../../vueFlowEnum'; |
| | | // defineProps<NodeProps<LLMNodeData, LLMNodeEvents>>(); |
| | | |
| | | const props = defineProps(['agentNames']); |
| | | const props = defineProps({ |
| | | agentNames: Array, |
| | | isViewMode: { |
| | | type: Boolean, |
| | | default: false, |
| | | }, |
| | | }); |
| | | const agentParamsValueChange = () => { |
| | | // const foundNames = props.agentNames.find(item=>item.id == agentParams.value); |
| | | // agentParams.value.value_label = foundNames?.title ??''; |
| | |
| | | |
| | | const agentParams = ref(VueFlowHelper.getParams(VueFlowHelper.getGroupParam(data.value), 'agent')); |
| | | VueFlowHelper.getConfigValue(agentParams.value, 'label', ''); |
| | | |
| | | |
| | | </script> |