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.

638 B
Raw Blame
import type { SourceDisplayStatus } from './source-models'
import { debounce, parseAsString, parseAsStringLiteral } from 'nuqs'

export type SourceFilter = SourceDisplayStatus | 'all'

export const sourceFilterParser = parseAsStringLiteral([
  'all',
  'active',
  'initializing',
  'syncing',
  'disabled',
  'error',
] as const)
  .withDefault('all')
  .withOptions({ history: 'push' })

export const sourceSearchParser = parseAsString.withDefault('').withOptions({
  limitUrlUpdates: debounce(300),
})

export const sourceSortParser = parseAsStringLiteral([
  'name-asc',
  'name-desc',
] as const).withOptions({
  history: 'push',
})