feat: add config for max-tree-depth (#21291)

This commit is contained in:
Good Wood
2025-06-23 13:55:57 +08:00
committed by GitHub
parent e56d7547f7
commit 43f5b21852
13 changed files with 105 additions and 124 deletions

View File

@@ -1,11 +1,11 @@
import { useCallback } from 'react'
import { apiPrefix } from '@/config'
import { API_PREFIX } from '@/config'
import { useSelector } from '@/context/app-context'
const useGetIcon = () => {
const currentWorkspace = useSelector(s => s.currentWorkspace)
const getIconUrl = useCallback((fileName: string) => {
return `${apiPrefix}/workspaces/current/plugin/icon?tenant_id=${currentWorkspace.id}&filename=${fileName}`
return `${API_PREFIX}/workspaces/current/plugin/icon?tenant_id=${currentWorkspace.id}&filename=${fileName}`
}, [currentWorkspace.id])
return {

View File

@@ -35,7 +35,7 @@ import type { PluginDeclaration, PluginManifestInMarket } from '../types'
import { sleep } from '@/utils'
import { getDocsUrl } from '@/app/components/plugins/utils'
import { fetchBundleInfoFromMarketPlace, fetchManifestFromMarketPlace } from '@/service/plugins'
import { marketplaceApiPrefix } from '@/config'
import { MARKETPLACE_API_PREFIX } from '@/config'
import { SUPPORT_INSTALL_LOCAL_FILE_EXTENSIONS } from '@/config'
import I18n from '@/context/i18n'
import { noop } from 'lodash-es'
@@ -106,7 +106,7 @@ const PluginPage = ({
setManifest({
...plugin,
version: version.version,
icon: `${marketplaceApiPrefix}/plugins/${plugin.org}/${plugin.name}/icon`,
icon: `${MARKETPLACE_API_PREFIX}/plugins/${plugin.org}/${plugin.name}/icon`,
})
showInstallFromMarketplace()
return