mirror of
https://github.com/YFGaia/dify-plus.git
synced 2026-06-12 18:11:42 +08:00
d4432ed80f
Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
10 lines
586 B
TypeScript
10 lines
586 B
TypeScript
import type { ActivePluginType } from './constants'
|
|
import { parseAsArrayOf, parseAsString, parseAsStringEnum } from 'nuqs/server'
|
|
import { PLUGIN_TYPE_SEARCH_MAP } from './constants'
|
|
|
|
export const marketplaceSearchParamsParsers = {
|
|
category: parseAsStringEnum<ActivePluginType>(Object.values(PLUGIN_TYPE_SEARCH_MAP) as ActivePluginType[]).withDefault('all').withOptions({ history: 'replace', clearOnDefault: false }),
|
|
q: parseAsString.withDefault('').withOptions({ history: 'replace' }),
|
|
tags: parseAsArrayOf(parseAsString).withDefault([]).withOptions({ history: 'replace' }),
|
|
}
|