Skip to content

armgit / dify

Public Imported from GitHub
0

Build Agentic workflows, RAG pipelines, with rich AI model and tool support on one collaborative workspace. Deploy on cloud, VPC, or self-hosted, so teams move from prototype to production without rebuilding the stack.

719 B
Raw Blame
import type { CollectionProviderType } from '../types'
import { consoleQuery } from '@/service/console'
import { CollectionType } from '../types'

// Each provider type is listed by its own console operation; other provider types have no list.
export const getToolListQueryKey = (type?: CollectionProviderType) => {
  const tools = consoleQuery.workspaces.current.tools
  switch (type) {
    case CollectionType.builtIn:
      return tools.builtin.get.queryKey()
    case CollectionType.custom:
      return tools.api.get.queryKey()
    case CollectionType.workflow:
      return tools.workflow.get.queryKey()
    case CollectionType.mcp:
      return tools.mcp.get.queryKey()
    default:
      return undefined
  }
}