feat(dify): 把本地控制台的中文与去外链改动入库

这些界面改动和专家服务草稿停在工作区,没有随上一笔主分支提交进入仓库。

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
wuzilongandCursor committed 2026-11-23 09:44:09 +08:00
1 parent 9c7c80e194
commit c2cb845a32
211 files changed
+3030 -2794

No files matched your search

@@ -1,9 +1,7 @@
import type { RefObject } from 'react'
import type { PluginDetail } from '../types'
import type { EmbeddedMarketplaceCategory } from './category-marketplace'
import type { PluginPageContentInset } from './content-inset'
import type { Collection } from '@/app/components/tools/types'
import type { MarketplaceLinks } from '@/features/marketplace/links'
import { Button } from '@langgenius/dify-ui/button'
import { cn } from '@langgenius/dify-ui/cn'
import {
@@ -17,9 +15,7 @@ import { useEffect, useRef } from 'react'
import { useTranslation } from 'react-i18next'
import { LoadingPlaceholder } from '@/app/components/base/loading-placeholder'
import IntegrationsToolProviderCard from '@/app/components/integrations/tool-provider-card'
import { BuiltinMarketplacePanel } from '@/app/components/tools/marketplace/builtin-marketplace-panel'
import CategoryEmptyState from './category-empty-state'
import CategoryMarketplacePanel from './category-marketplace-panel'
import List from './list'
type PluginsPanelResultsProps = {
@@ -27,28 +23,22 @@ type PluginsPanelResultsProps = {
canDeletePlugin: boolean
canUpdatePlugin: boolean
categoryEmptyState?: EmbeddedMarketplaceCategory
categoryMarketplace?: EmbeddedMarketplaceCategory
containerRef: RefObject<HTMLDivElement | null>
contentFrameClassName: string
contentInset: PluginPageContentInset
currentBuiltinToolID?: string
firstBuiltinToolTarget?: string
firstPluginTarget?: string
filteredBuiltinTools: Collection[]
filteredList: Array<PluginDetail & { latest_version: string }>
hasToolMarketplacePanel: boolean
marketplace: MarketplaceLinks | null
hasVisibleBuiltinTools: boolean
hasVisiblePlugins: boolean
hasEmbeddedMarketplace: boolean
isFetching: boolean
isLastPage: boolean
keywords: string
loadNextPage: () => void
onSelectBuiltinTool: (id: string) => void
scrollAreaLabel?: string
showCategoryEmptyState: boolean
tagFilterValue: string[]
}
const PluginsPanelResults = ({
@@ -56,28 +46,22 @@ const PluginsPanelResults = ({
canDeletePlugin,
canUpdatePlugin,
categoryEmptyState,
categoryMarketplace,
containerRef,
contentFrameClassName,
contentInset,
currentBuiltinToolID,
firstBuiltinToolTarget,
firstPluginTarget,
filteredBuiltinTools,
filteredList,
hasToolMarketplacePanel,
marketplace,
hasVisibleBuiltinTools,
hasVisiblePlugins,
hasEmbeddedMarketplace,
isFetching,
isLastPage,
keywords,
loadNextPage,
onSelectBuiltinTool,
scrollAreaLabel,
showCategoryEmptyState,
tagFilterValue,
}: PluginsPanelResultsProps) => {
const { t } = useTranslation(['common', 'plugin', 'workflow'])
const loadMoreAnchorRef = useRef<HTMLDivElement>(null)
@@ -144,10 +128,7 @@ const PluginsPanelResults = ({
className={cn('flex min-h-full flex-col', hasEmbeddedMarketplace && 'pt-1')}
>
{showCategoryEmptyState && categoryEmptyState && (
<CategoryEmptyState
category={categoryEmptyState}
showMarketplaceLink={!!categoryMarketplace}
/>
<CategoryEmptyState category={categoryEmptyState} showMarketplaceLink={false} />
)}
{(hasVisiblePlugins || hasVisibleBuiltinTools) && (
<List
@@ -190,23 +171,6 @@ const PluginsPanelResults = ({
)}
</div>
)}
{marketplace && hasToolMarketplacePanel && (
<BuiltinMarketplacePanel
marketplace={marketplace}
containerRef={containerRef}
contentInset={contentInset}
keywords={keywords}
tagFilterValue={tagFilterValue}
/>
)}
{marketplace && categoryMarketplace && (
<CategoryMarketplacePanel
marketplace={marketplace}
category={categoryMarketplace}
searchText={keywords}
tags={categoryMarketplace === 'trigger' ? tagFilterValue : []}
/>
)}
</ScrollAreaContent>
</ScrollAreaViewport>
<ScrollAreaScrollbar>