mirror of https://github.com/langgenius/dify.git
17 lines
326 B
TypeScript
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)
|
|
}
|