Files
dify/web/app/components/plugins/utils.ts
Stephen Zhou 6890f7d09c calls
2026-01-12 15:51:44 +08:00

17 lines
326 B
TypeScript

import type {
TagKey,
} from './constants'
import {
categoryKeys,
tagKeys,
} from './constants'
export const getValidTagKeys = (tags: TagKey[]) => {
return tags.filter(tag => tagKeys.includes(tag))
}
export const getValidCategoryKeys = (category?: string) => {
return categoryKeys.find(key => key === category)
}