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.

832 B
Raw Blame
'use client'

import { ReadmeDialog } from './dialog'
import { ReadmeDrawer } from './drawer'
import { useReadmePanelStore } from './store'

export default function ReadmePanel() {
  const currentPanel = useReadmePanelStore((s) => s.currentPanel)
  const closeReadmePanel = useReadmePanelStore((s) => s.closeReadmePanel)

  if (!currentPanel) return null

  const onOpenChange = (open: boolean) => {
    if (!open) closeReadmePanel()
  }

  if (currentPanel.presentation === 'dialog') {
    return (
      <ReadmeDialog
        detail={currentPanel.detail}
        open
        onOpenChange={onOpenChange}
        triggerId={currentPanel.triggerId}
      />
    )
  }

  return (
    <ReadmeDrawer
      detail={currentPanel.detail}
      open
      onOpenChange={onOpenChange}
      triggerId={currentPanel.triggerId}
    />
  )
}