mirror of
https://github.com/langgenius/dify.git
synced 2026-02-27 11:55:12 +00:00
Some checks failed
autofix.ci / autofix (push) Has been cancelled
Build and Push API & Web / build (api, DIFY_API_IMAGE_NAME, linux/amd64, build-api-amd64) (push) Has been cancelled
Build and Push API & Web / build (api, DIFY_API_IMAGE_NAME, linux/arm64, build-api-arm64) (push) Has been cancelled
Build and Push API & Web / build (web, DIFY_WEB_IMAGE_NAME, linux/amd64, build-web-amd64) (push) Has been cancelled
Build and Push API & Web / build (web, DIFY_WEB_IMAGE_NAME, linux/arm64, build-web-arm64) (push) Has been cancelled
Build and Push API & Web / create-manifest (api, DIFY_API_IMAGE_NAME, merge-api-images) (push) Has been cancelled
Build and Push API & Web / create-manifest (web, DIFY_WEB_IMAGE_NAME, merge-web-images) (push) Has been cancelled
Main CI Pipeline / Check Changed Files (push) Has been cancelled
Main CI Pipeline / API Tests (push) Has been cancelled
Main CI Pipeline / Web Tests (push) Has been cancelled
Main CI Pipeline / Style Check (push) Has been cancelled
Main CI Pipeline / VDB Tests (push) Has been cancelled
Main CI Pipeline / DB Migration Test (push) Has been cancelled
Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
31 lines
740 B
TypeScript
31 lines
740 B
TypeScript
import { PluginCategoryEnum } from '../types'
|
|
|
|
export const DEFAULT_SORT = {
|
|
sortBy: 'install_count',
|
|
sortOrder: 'DESC',
|
|
}
|
|
|
|
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,
|
|
],
|
|
)
|