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.

709 B
Raw Blame
import type { AgentAppDetailWithSite } from '@dify/contracts/api/console/agent/types.gen'
import { zAgentAppDetailWithSite } from '@dify/contracts/api/console/agent/zod.gen'
import { AgentPermission } from '@/features/agent-v2/acl'
import { createAppDetailFixture } from './app'

export function createAgentFixture(overrides: Partial<AgentAppDetailWithSite> = {}) {
  return zAgentAppDetailWithSite.parse({
    ...createAppDetailFixture(),
    id: 'agent-1',
    app_id: 'app-1',
    name: 'Agent',
    mode: 'agent',
    icon_url: null,
    enable_api: true,
    enable_site: true,
    permission_keys: Object.values(AgentPermission).filter((key) => key !== AgentPermission.Create),
    ...overrides,
  })
}