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.

763 B
Raw Blame
import type { TFunction } from 'i18next'
import type { CommonNodeType, NodeDefault } from '../../types'
import { BlockEnum } from '@/app/components/workflow/types'
import { genNodeMetaData } from '@/app/components/workflow/utils'

const metaData = genNodeMetaData({
  sort: 0.05,
  type: BlockEnum.StartPlaceholder,
  isRequired: false,
  isSingleton: true,
  isTypeFixed: true,
  helpLinkUri: 'start',
})

const nodeDefault: NodeDefault<CommonNodeType> = {
  metaData,
  defaultValue: {
    title: 'Workflow start',
    desc: '',
  },
  checkValid(_payload, t: TFunction<['workflow']>) {
    return {
      isValid: false,
      errorMessage: t(($) => $['nodes.startPlaceholder.validationRequired'], { ns: 'workflow' }),
    }
  },
}

export default nodeDefault