import type { FC } from 'react' import React from 'react' import { useTranslation } from 'react-i18next' import RemoveEffectVarConfirm from '../_base/components/remove-effect-var-confirm' import VarList from './components/var-list' import VarItem from './components/var-item' import useConfig from './use-config' import type { StartNodeType } from './types' import Split from '@/app/components/workflow/nodes/_base/components/split' import Field from '@/app/components/workflow/nodes/_base/components/field' import AddButton from '@/app/components/base/button/add-button' import ConfigVarModal from '@/app/components/app/configuration/config-var/config-modal' import type { InputVar, NodePanelProps } from '@/app/components/workflow/types' const i18nPrefix = 'workflow.nodes.start' const Panel: FC> = ({ id, data, }) => { const { t } = useTranslation() const { readOnly, isChatMode, inputs, isShowAddVarModal, showAddVarModal, handleAddVariable, hideAddVarModal, handleVarListChange, isShowRemoveVarConfirm, hideRemoveVarConfirm, onRemoveVarConfirm, } = useConfig(id, data) const handleAddVarConfirm = (payload: InputVar) => { handleAddVariable(payload) hideAddVarModal() } return (
: undefined } > <>
{ isChatMode && ( String
} />) } Array[File]
} /> { isChatMode && ( <> Number
} /> String } /> ) } String } /> String } /> String } /> String } /> {isShowAddVarModal && ( v.variable)} /> )} ) } export default React.memo(Panel)