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.

Fix plugin detail panel not show when installed plugins more than 100 (#26405)

KVOJJJind2f05511708d
diff --git a/web/app/components/tools/provider-list.tsx b/web/app/components/tools/provider-list.tsx
index d267b49c798..08a4aa0b5df 100644
--- a/web/app/components/tools/provider-list.tsx
+++ b/web/app/components/tools/provider-list.tsx
@@ -17,7 +17,7 @@ import CardMoreInfo from '@/app/components/plugins/card/card-more-info'
import PluginDetailPanel from '@/app/components/plugins/plugin-detail-panel'
import MCPList from './mcp'
import { useAllToolProviders } from '@/service/use-tools'
-import { useInstalledPluginList, useInvalidateInstalledPluginList } from '@/service/use-plugins'
+import { useCheckInstalled, useInvalidateInstalledPluginList } from '@/service/use-plugins'
import { useGlobalPublicStore } from '@/context/global-public-context'
import { ToolTypeEnum } from '../workflow/block-selector/types'
import { useMarketplace } from './marketplace/hooks'
@@ -77,12 +77,14 @@ const ProviderList = () => {
const currentProvider = useMemo<Collection | undefined>(() => {
return filteredCollectionList.find(collection => collection.id === currentProviderId)
}, [currentProviderId, filteredCollectionList])
- const { data: pluginList } = useInstalledPluginList()
+ const { data: checkedInstalledData } = useCheckInstalled({
+ pluginIds: currentProvider?.plugin_id ? [currentProvider.plugin_id] : [],
+ enabled: !!currentProvider?.plugin_id,
+ })
const invalidateInstalledPluginList = useInvalidateInstalledPluginList()
const currentPluginDetail = useMemo(() => {
- const detail = pluginList?.plugins.find(plugin => plugin.plugin_id === currentProvider?.plugin_id)
- return detail
- }, [currentProvider?.plugin_id, pluginList?.plugins])
+ return checkedInstalledData?.plugins?.[0]
+ }, [checkedInstalledData])
const toolListTailRef = useRef<HTMLDivElement>(null)
const showMarketplacePanel = useCallback(() => {