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.

768 B
Raw Blame
'use client'
import dynamic from 'next/dynamic'
import * as React from 'react'
import { useWorkflowGeneratorStore } from './store'

// Lazy-load the modal so the bundle of the common layout stays light;
// the modal is only mounted on demand when cmd+k `/create` fires.
const WorkflowGeneratorModal = dynamic(() => import('./index'), { ssr: false })

/**
 * Global mount point for the workflow generator modal. Place once in the
 * common layout next to ``<GotoAnything />`` — the modal opens whenever the
 * zustand store flips ``isOpen`` to true.
 */
const WorkflowGeneratorMount: React.FC = () => {
  const isOpen = useWorkflowGeneratorStore((s) => s.isOpen)
  if (!isOpen) return null
  return <WorkflowGeneratorModal />
}

export default WorkflowGeneratorMount