dify/web/app/components/plugins/utils.ts
Stephen Zhou 061feebd87
fix: check and update doc links (#30849)
Co-authored-by: Riskey <36894937+RiskeyL@users.noreply.github.com>
2026-01-21 16:31:48 +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)
}