Files
dify/web/app/components/workflow-app/search-params.ts
2026-03-26 18:46:09 +08:00

14 lines
359 B
TypeScript

import { parseAsStringLiteral } from 'nuqs'
import { ViewType } from '@/app/components/workflow/types'
const VIEW_TYPES = Object.values(ViewType)
export const parseAsViewType = parseAsStringLiteral(VIEW_TYPES)
.withDefault(ViewType.graph)
.withOptions({
history: 'push',
clearOnDefault: true,
})
export const WORKFLOW_VIEW_PARAM_KEY = 'view'