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.

1.2 KB
Raw Blame
import { describe, expect, it } from 'vite-plus/test'
import { createAgentV2SeedTasks } from '../features/agent-v2/support/seed.ts'

const baseTaskIds = [
  'marketplace-plugins',
  'stable-model',
  'agent-decision-model',
  'tool:JSON Process / JSON Replace',
  'tool:Tavily / Tavily Search',
  'ready-knowledge',
]

const preparedFixtureTaskIds = [
  'full-config-agent',
  'tool-states-agent',
  'dual-retrieval-agent',
  'workflow-reference',
]

const taskIds = (profile: string) => createAgentV2SeedTasks(profile).map((task) => task.id)

describe('Agent v2 seed profiles', () => {
  it('prepares every fixture required by prepared behavior', () => {
    expect(taskIds('prepared')).toEqual([
      ...baseTaskIds,
      'workspace-default-models',
      ...preparedFixtureTaskIds,
    ])
  })

  it('prepares external runtime and prepared behavior in post-merge', () => {
    expect(taskIds('post-merge')).toEqual([
      ...baseTaskIds,
      'speech-to-text-model',
      'workspace-default-models',
      ...preparedFixtureTaskIds,
    ])
  })

  it('rejects unknown profiles', () => {
    expect(() => createAgentV2SeedTasks('unknown')).toThrow(
      'Unknown Agent V2 seed profile "unknown".',
    )
  })
})