Sfoglia il codice sorgente

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

tags/1.9.1
KVOJJJin 1 mese fa
parent
commit
d2f0551170
Nessun account collegato all'indirizzo email del committer
1 ha cambiato i file con 7 aggiunte e 5 eliminazioni
  1. 7
    5
      web/app/components/tools/provider-list.tsx

+ 7
- 5
web/app/components/tools/provider-list.tsx Vedi File

@@ -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(() => {

Loading…
Annulla
Salva