mirror of
https://github.com/langgenius/dify.git
synced 2026-09-07 01:43:41 +08:00
Co-authored-by: zxhlyh <jasonapring2015@outlook.com> Co-authored-by: fatelei <fatelei@gmail.com> Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com> Co-authored-by: CodingOnStar <hanxujiang@dify.com> Co-authored-by: Cursor <cursoragent@cursor.com> Co-authored-by: 姜涵煦 <hanxujiang@jianghanxudeMacBook-Pro-2.local> Co-authored-by: L1nSn0w <l1nsn0w@qq.com> Co-authored-by: yyh <92089059+lyzno1@users.noreply.github.com>
35 lines
956 B
TypeScript
35 lines
956 B
TypeScript
import { PluginCategoryEnum } from '../types'
|
|
|
|
export const DEFAULT_SORT = {
|
|
sortBy: 'install_count',
|
|
sortOrder: 'DESC',
|
|
}
|
|
|
|
/**
|
|
* DOM id of the marketplace scroll container. The route components render it
|
|
* and the scroll/viewport observers below the marketplace tree look it up.
|
|
*/
|
|
export const MARKETPLACE_CONTAINER_ID = 'marketplace-container'
|
|
|
|
export const SCROLL_BOTTOM_THRESHOLD = 100
|
|
|
|
export const PLUGIN_TYPE_SEARCH_MAP = {
|
|
all: 'all',
|
|
model: PluginCategoryEnum.model,
|
|
tool: PluginCategoryEnum.tool,
|
|
agent: PluginCategoryEnum.agent,
|
|
extension: PluginCategoryEnum.extension,
|
|
datasource: PluginCategoryEnum.datasource,
|
|
trigger: PluginCategoryEnum.trigger,
|
|
bundle: 'bundle',
|
|
} as const
|
|
|
|
type ValueOf<T> = T[keyof T]
|
|
|
|
export type ActivePluginType = ValueOf<typeof PLUGIN_TYPE_SEARCH_MAP>
|
|
|
|
export const PLUGIN_CATEGORY_WITH_COLLECTIONS = new Set<ActivePluginType>([
|
|
PLUGIN_TYPE_SEARCH_MAP.all,
|
|
PLUGIN_TYPE_SEARCH_MAP.tool,
|
|
])
|