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.

757 B
Raw Blame
import type { FC } from 'react'
import type { NodeProps } from '@/app/components/workflow/types'
import * as React from 'react'
import { useTranslation } from 'react-i18next'

const i18nPrefix = 'nodes.startPlaceholder'

const Node: FC<NodeProps> = ({ data }) => {
  const { t } = useTranslation(['workflow'])
  const descriptionKey = data.selected ? 'nodeDescription' : 'nodeCollapsedDescription'

  return (
    <div className="px-2.5 py-1">
      <div className="rounded-md bg-workflow-block-parma-bg px-1.5 py-1.25">
        <div className="system-xs-regular wrap-break-word text-text-tertiary">
          {t(($) => $[`${i18nPrefix}.${descriptionKey}`], { ns: 'workflow' })}
        </div>
      </div>
    </div>
  )
}

export default React.memo(Node)