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.

643 B
Raw Blame
import type { TFunction } from 'i18next'
import type { HumanInputInsertionBlocker } from './policy'
import { toast } from '@/app/notifications'

const reasonKeys = {
  disabled: 'nodes.humanInputV2.disabled',
  'unsupported-version': 'nodes.humanInputMigration.blocker.unsupportedVersion',
  'migration-required': 'nodes.humanInputMigration.disabledReason',
  'incompatible-versions': 'nodes.humanInputMigration.incompatibleVersions',
} as const

export const notifyHumanInputInsertionBlocked = (
  reason: HumanInputInsertionBlocker,
  t: TFunction<['workflow']>,
) => {
  toast.warning(t(($) => $[reasonKeys[reason]], { ns: 'workflow' }))
}