mirror of
https://github.com/langgenius/dify.git
synced 2026-05-22 09:58:42 +08:00
8 lines
254 B
TypeScript
8 lines
254 B
TypeScript
import { AppModeEnum } from '@/types/app'
|
|
|
|
const appModeValues = new Set<string>(Object.values(AppModeEnum))
|
|
|
|
export function toAppMode(mode?: string): AppModeEnum {
|
|
return appModeValues.has(mode ?? '') ? (mode as AppModeEnum) : AppModeEnum.WORKFLOW
|
|
}
|