Skip to content

armgit / dify

Public Imported from GitHub
0

Build Agentic workflows, RAG pipelines, with rich AI model and tool support on one collaborative workspace. Deploy on cloud, VPC, or self-hosted, so teams move from prototype to production without rebuilding the stack.

566 B
Raw Blame
import type { DeliveryMethod, HumanInputNodeType } from '../types'
import useHumanInputSharedConfig from '../shared/use-config'

const useConfig = (id: string, payload: HumanInputNodeType) => {
  const sharedConfig = useHumanInputSharedConfig(id, payload)
  const { setInputs, ...config } = sharedConfig

  const handleDeliveryMethodChange = (deliveryMethods: DeliveryMethod[]) => {
    setInputs({
      ...config.inputs,
      delivery_methods: deliveryMethods,
    })
  }

  return {
    ...config,
    handleDeliveryMethodChange,
  }
}

export default useConfig