mirror of
https://github.com/langgenius/dify.git
synced 2026-05-06 10:28:10 +08:00
Merge remote-tracking branch 'origin/main' into feat/support-agent-sandbox
This commit is contained in:
@ -153,7 +153,7 @@ const AllStartBlocks = ({
|
||||
)}
|
||||
{shouldShowTriggerListTitle && (
|
||||
<div className="px-3 pb-1 pt-2">
|
||||
<span className="system-xs-medium text-text-primary">{t('tabs.allTriggers', { ns: 'workflow' })}</span>
|
||||
<span className="text-text-primary system-xs-medium">{t('tabs.allTriggers', { ns: 'workflow' })}</span>
|
||||
</div>
|
||||
)}
|
||||
<StartBlocks
|
||||
|
||||
@ -341,7 +341,7 @@ const AllTools = ({
|
||||
<>
|
||||
{!hideFeaturedTool && (
|
||||
<div className="px-3 pb-1 pt-2">
|
||||
<span className="system-xs-medium text-text-primary">{t('allTools', { ns: 'tools' })}</span>
|
||||
<span className="text-text-primary system-xs-medium">{t('allTools', { ns: 'tools' })}</span>
|
||||
</div>
|
||||
)}
|
||||
<Tools
|
||||
|
||||
@ -105,8 +105,8 @@ const Blocks = ({
|
||||
className="mb-2"
|
||||
type={block.metaData.iconType || block.metaData.type}
|
||||
/>
|
||||
<div className="system-md-medium mb-1 text-text-primary">{block.metaData.title}</div>
|
||||
<div className="system-xs-regular text-text-tertiary">{block.metaData.description}</div>
|
||||
<div className="mb-1 text-text-primary system-md-medium">{block.metaData.title}</div>
|
||||
<div className="text-text-tertiary system-xs-regular">{block.metaData.description}</div>
|
||||
</div>
|
||||
)}
|
||||
>
|
||||
|
||||
@ -132,7 +132,7 @@ const FeaturedTools = ({
|
||||
className="flex w-full items-center rounded-md px-0 py-1 text-left text-text-primary"
|
||||
onClick={() => setIsCollapsed(prev => !prev)}
|
||||
>
|
||||
<span className="system-xs-medium text-text-primary">{t('tabs.featuredTools', { ns: 'workflow' })}</span>
|
||||
<span className="text-text-primary system-xs-medium">{t('tabs.featuredTools', { ns: 'workflow' })}</span>
|
||||
<ArrowDownRoundFill className={`ml-0.5 h-4 w-4 text-text-tertiary transition-transform ${isCollapsed ? '-rotate-90' : 'rotate-0'}`} />
|
||||
</button>
|
||||
|
||||
@ -145,7 +145,7 @@ const FeaturedTools = ({
|
||||
)}
|
||||
|
||||
{showEmptyState && (
|
||||
<p className="system-xs-regular py-2 text-text-tertiary">
|
||||
<p className="py-2 text-text-tertiary system-xs-regular">
|
||||
<Link className="text-text-accent" href={getMarketplaceUrl('', { category: 'tool' })} target="_blank" rel="noopener noreferrer">
|
||||
{t('tabs.noFeaturedPlugins', { ns: 'workflow' })}
|
||||
</Link>
|
||||
@ -275,13 +275,13 @@ function FeaturedToolUninstalledItem({
|
||||
<div className="flex h-full min-w-0 items-center">
|
||||
<BlockIcon type={BlockEnum.Tool} toolIcon={plugin.icon} />
|
||||
<div className="ml-2 min-w-0">
|
||||
<div className="system-sm-medium truncate text-text-secondary">{label}</div>
|
||||
<div className="truncate text-text-secondary system-sm-medium">{label}</div>
|
||||
</div>
|
||||
</div>
|
||||
<div className="ml-auto flex h-full items-center gap-1 pl-1">
|
||||
<span className={`system-xs-regular text-text-tertiary ${actionOpen ? 'hidden' : 'group-hover:hidden'}`}>{installCountLabel}</span>
|
||||
<span className={`text-text-tertiary system-xs-regular ${actionOpen ? 'hidden' : 'group-hover:hidden'}`}>{installCountLabel}</span>
|
||||
<div
|
||||
className={`system-xs-medium flex h-full items-center gap-1 text-components-button-secondary-accent-text [&_.action-btn]:h-6 [&_.action-btn]:min-h-0 [&_.action-btn]:w-6 [&_.action-btn]:rounded-lg [&_.action-btn]:p-0 ${actionOpen ? '' : 'hidden group-hover:flex'}`}
|
||||
className={`flex h-full items-center gap-1 text-components-button-secondary-accent-text system-xs-medium [&_.action-btn]:h-6 [&_.action-btn]:min-h-0 [&_.action-btn]:w-6 [&_.action-btn]:rounded-lg [&_.action-btn]:p-0 ${actionOpen ? '' : 'hidden group-hover:flex'}`}
|
||||
onMouseEnter={() => setIsActionHovered(true)}
|
||||
onMouseLeave={() => {
|
||||
if (!actionOpen)
|
||||
|
||||
@ -127,7 +127,7 @@ const FeaturedTriggers = ({
|
||||
className="flex w-full items-center rounded-md px-0 py-1 text-left text-text-primary"
|
||||
onClick={() => setIsCollapsed(prev => !prev)}
|
||||
>
|
||||
<span className="system-xs-medium text-text-primary">{t('tabs.featuredTools', { ns: 'workflow' })}</span>
|
||||
<span className="text-text-primary system-xs-medium">{t('tabs.featuredTools', { ns: 'workflow' })}</span>
|
||||
<ArrowDownRoundFill className={`ml-0.5 h-4 w-4 text-text-tertiary transition-transform ${isCollapsed ? '-rotate-90' : 'rotate-0'}`} />
|
||||
</button>
|
||||
|
||||
@ -140,7 +140,7 @@ const FeaturedTriggers = ({
|
||||
)}
|
||||
|
||||
{showEmptyState && (
|
||||
<p className="system-xs-regular py-2 text-text-tertiary">
|
||||
<p className="py-2 text-text-tertiary system-xs-regular">
|
||||
<Link className="text-text-accent" href={getMarketplaceUrl('', { category: 'trigger' })} target="_blank" rel="noopener noreferrer">
|
||||
{t('tabs.noFeaturedTriggers', { ns: 'workflow' })}
|
||||
</Link>
|
||||
@ -270,13 +270,13 @@ function FeaturedTriggerUninstalledItem({
|
||||
<div className="flex h-full min-w-0 items-center">
|
||||
<BlockIcon type={BlockEnum.TriggerPlugin} toolIcon={plugin.icon} />
|
||||
<div className="ml-2 min-w-0">
|
||||
<div className="system-sm-medium truncate text-text-secondary">{label}</div>
|
||||
<div className="truncate text-text-secondary system-sm-medium">{label}</div>
|
||||
</div>
|
||||
</div>
|
||||
<div className="ml-auto flex h-full items-center gap-1 pl-1">
|
||||
<span className={`system-xs-regular text-text-tertiary ${actionOpen ? 'hidden' : 'group-hover:hidden'}`}>{installCountLabel}</span>
|
||||
<span className={`text-text-tertiary system-xs-regular ${actionOpen ? 'hidden' : 'group-hover:hidden'}`}>{installCountLabel}</span>
|
||||
<div
|
||||
className={`system-xs-medium flex h-full items-center gap-1 text-components-button-secondary-accent-text [&_.action-btn]:h-6 [&_.action-btn]:min-h-0 [&_.action-btn]:w-6 [&_.action-btn]:rounded-lg [&_.action-btn]:p-0 ${actionOpen ? '' : 'hidden group-hover:flex'}`}
|
||||
className={`flex h-full items-center gap-1 text-components-button-secondary-accent-text system-xs-medium [&_.action-btn]:h-6 [&_.action-btn]:min-h-0 [&_.action-btn]:w-6 [&_.action-btn]:rounded-lg [&_.action-btn]:p-0 ${actionOpen ? '' : 'hidden group-hover:flex'}`}
|
||||
onMouseEnter={() => setIsActionHovered(true)}
|
||||
onMouseLeave={() => {
|
||||
if (!actionOpen)
|
||||
|
||||
@ -91,8 +91,8 @@ const OperationDropdown: FC<Props> = ({
|
||||
</PortalToFollowElemTrigger>
|
||||
<PortalToFollowElemContent className="z-[9999]">
|
||||
<div className="min-w-[176px] rounded-xl border-[0.5px] border-components-panel-border bg-components-panel-bg-blur p-1 shadow-lg">
|
||||
<div onClick={handleDownload} className="system-md-regular cursor-pointer rounded-lg px-3 py-1.5 text-text-secondary hover:bg-state-base-hover">{t('operation.download', { ns: 'common' })}</div>
|
||||
<a href={getMarketplaceUrl(`/plugins/${author}/${name}`, { theme })} target="_blank" className="system-md-regular block cursor-pointer rounded-lg px-3 py-1.5 text-text-secondary hover:bg-state-base-hover">{t('operation.viewDetails', { ns: 'common' })}</a>
|
||||
<div onClick={handleDownload} className="cursor-pointer rounded-lg px-3 py-1.5 text-text-secondary system-md-regular hover:bg-state-base-hover">{t('operation.download', { ns: 'common' })}</div>
|
||||
<a href={getMarketplaceUrl(`/plugins/${author}/${name}`, { theme })} target="_blank" className="block cursor-pointer rounded-lg px-3 py-1.5 text-text-secondary system-md-regular hover:bg-state-base-hover">{t('operation.viewDetails', { ns: 'common' })}</a>
|
||||
</div>
|
||||
</PortalToFollowElemContent>
|
||||
</PortalToFollowElem>
|
||||
|
||||
@ -42,16 +42,16 @@ const Item: FC<Props> = ({
|
||||
/>
|
||||
<div className="ml-2 flex w-0 grow">
|
||||
<div className="w-0 grow">
|
||||
<div className="system-sm-medium h-4 truncate leading-4 text-text-primary">{getLocalizedText(payload.label)}</div>
|
||||
<div className="system-xs-regular h-5 truncate leading-5 text-text-tertiary">{getLocalizedText(payload.brief)}</div>
|
||||
<div className="system-xs-regular flex space-x-1 text-text-tertiary">
|
||||
<div className="h-4 truncate leading-4 text-text-primary system-sm-medium">{getLocalizedText(payload.label)}</div>
|
||||
<div className="h-5 truncate leading-5 text-text-tertiary system-xs-regular">{getLocalizedText(payload.brief)}</div>
|
||||
<div className="flex space-x-1 text-text-tertiary system-xs-regular">
|
||||
<div>{payload.org}</div>
|
||||
<div>·</div>
|
||||
<div>{t('install', { ns: 'plugin', num: formatNumber(payload.install_count || 0) })}</div>
|
||||
</div>
|
||||
</div>
|
||||
{/* Action */}
|
||||
<div className={cn(!open ? 'hidden' : 'flex', 'system-xs-medium h-4 items-center space-x-1 text-components-button-secondary-accent-text group-hover/plugin:flex')}>
|
||||
<div className={cn(!open ? 'hidden' : 'flex', 'h-4 items-center space-x-1 text-components-button-secondary-accent-text system-xs-medium group-hover/plugin:flex')}>
|
||||
<div
|
||||
className="cursor-pointer rounded-md px-1.5 py-0.5 hover:bg-state-base-hover"
|
||||
onClick={showInstallModal}
|
||||
|
||||
@ -79,7 +79,7 @@ const List = ({
|
||||
|
||||
return (
|
||||
<Link
|
||||
className="system-sm-medium sticky bottom-0 z-10 flex h-8 cursor-pointer items-center rounded-b-lg border-[0.5px] border-t border-components-panel-border bg-components-panel-bg-blur px-4 py-1 text-text-accent-light-mode-only shadow-lg"
|
||||
className="sticky bottom-0 z-10 flex h-8 cursor-pointer items-center rounded-b-lg border-[0.5px] border-t border-components-panel-border bg-components-panel-bg-blur px-4 py-1 text-text-accent-light-mode-only shadow-lg system-sm-medium"
|
||||
href={getMarketplaceUrl('', { category })}
|
||||
target="_blank"
|
||||
>
|
||||
@ -95,7 +95,7 @@ const List = ({
|
||||
<>
|
||||
{hasRes && (
|
||||
<div
|
||||
className={cn('system-sm-medium sticky z-10 flex h-8 cursor-pointer justify-between px-4 py-1 text-text-primary', stickyClassName, !disableMaxWidth && maxWidthClassName)}
|
||||
className={cn('sticky z-10 flex h-8 cursor-pointer justify-between px-4 py-1 text-text-primary system-sm-medium', stickyClassName, !disableMaxWidth && maxWidthClassName)}
|
||||
onClick={handleHeadClick}
|
||||
>
|
||||
<span>{t('fromMarketplace', { ns: 'plugin' })}</span>
|
||||
@ -124,7 +124,7 @@ const List = ({
|
||||
<Link
|
||||
href={urlWithSearchText}
|
||||
target="_blank"
|
||||
className="system-sm-medium flex h-4 shrink-0 items-center text-text-accent-light-mode-only"
|
||||
className="flex h-4 shrink-0 items-center text-text-accent-light-mode-only system-sm-medium"
|
||||
>
|
||||
<RiSearchLine className="mr-0.5 h-3 w-3" />
|
||||
<span>{t('searchInMarketplace', { ns: 'plugin' })}</span>
|
||||
|
||||
@ -83,7 +83,7 @@ const RAGToolRecommendations = ({
|
||||
className="flex w-full items-center rounded-md px-3 pb-0.5 pt-1 text-left text-text-tertiary"
|
||||
onClick={() => setIsCollapsed(prev => !prev)}
|
||||
>
|
||||
<span className="system-xs-medium text-text-tertiary">{t('ragToolSuggestions.title', { ns: 'pipeline' })}</span>
|
||||
<span className="text-text-tertiary system-xs-medium">{t('ragToolSuggestions.title', { ns: 'pipeline' })}</span>
|
||||
<ArrowDownRoundFill className={`ml-1 h-4 w-4 text-text-tertiary transition-transform ${isCollapsed ? '-rotate-90' : 'rotate-0'}`} />
|
||||
</button>
|
||||
{!isCollapsed && (
|
||||
@ -95,7 +95,7 @@ const RAGToolRecommendations = ({
|
||||
</div>
|
||||
)}
|
||||
{!isFetchingRAGRecommendedPlugins && recommendedPlugins.length === 0 && unInstalledPlugins.length === 0 && (
|
||||
<p className="system-xs-regular px-3 py-1 text-text-tertiary">
|
||||
<p className="px-3 py-1 text-text-tertiary system-xs-regular">
|
||||
<Trans
|
||||
i18nKey="ragToolSuggestions.noRecommendationPlugins"
|
||||
ns="pipeline"
|
||||
@ -127,7 +127,7 @@ const RAGToolRecommendations = ({
|
||||
<div className="px-1">
|
||||
<RiMoreLine className="size-4 text-text-tertiary" />
|
||||
</div>
|
||||
<div className="system-xs-regular text-text-tertiary">
|
||||
<div className="text-text-tertiary system-xs-regular">
|
||||
{t('operation.more', { ns: 'common' })}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@ -34,15 +34,15 @@ const UninstalledItem = ({
|
||||
/>
|
||||
<div className="ml-2 flex w-0 grow items-center">
|
||||
<div className="flex w-0 grow items-center gap-x-2">
|
||||
<span className="system-sm-regular truncate text-text-primary">
|
||||
<span className="truncate text-text-primary system-sm-regular">
|
||||
{getLocalizedText(payload.label)}
|
||||
</span>
|
||||
<span className="system-xs-regular text-text-quaternary">
|
||||
<span className="text-text-quaternary system-xs-regular">
|
||||
{payload.org}
|
||||
</span>
|
||||
</div>
|
||||
<div
|
||||
className="system-xs-medium cursor-pointer pl-1.5 text-components-button-secondary-accent-text"
|
||||
className="cursor-pointer pl-1.5 text-components-button-secondary-accent-text system-xs-medium"
|
||||
onClick={showInstallModal}
|
||||
>
|
||||
{t('installAction', { ns: 'plugin' })}
|
||||
|
||||
@ -80,16 +80,16 @@ const StartBlocks = ({
|
||||
className="mb-2"
|
||||
type={block.type}
|
||||
/>
|
||||
<div className="system-md-medium mb-1 text-text-primary">
|
||||
<div className="mb-1 text-text-primary system-md-medium">
|
||||
{block.type === BlockEnumValues.TriggerWebhook
|
||||
? t('customWebhook', { ns: 'workflow' })
|
||||
: t(`blocks.${block.type}`, { ns: 'workflow' })}
|
||||
</div>
|
||||
<div className="system-xs-regular text-text-secondary">
|
||||
<div className="text-text-secondary system-xs-regular">
|
||||
{t(`blocksAbout.${block.type}`, { ns: 'workflow' })}
|
||||
</div>
|
||||
{(block.type === BlockEnumValues.TriggerWebhook || block.type === BlockEnumValues.TriggerSchedule) && (
|
||||
<div className="system-xs-regular mb-1 mt-1 text-text-tertiary">
|
||||
<div className="mb-1 mt-1 text-text-tertiary system-xs-regular">
|
||||
{t('author', { ns: 'tools' })}
|
||||
{' '}
|
||||
{t('difyTeam', { ns: 'workflow' })}
|
||||
@ -109,7 +109,7 @@ const StartBlocks = ({
|
||||
<div className="flex w-0 grow items-center justify-between text-sm text-text-secondary">
|
||||
<span className="truncate">{t(`blocks.${block.type}`, { ns: 'workflow' })}</span>
|
||||
{block.type === BlockEnumValues.Start && (
|
||||
<span className="system-xs-regular ml-2 shrink-0 text-text-quaternary">{t('blocks.originalStartNode', { ns: 'workflow' })}</span>
|
||||
<span className="ml-2 shrink-0 text-text-quaternary system-xs-regular">{t('blocks.originalStartNode', { ns: 'workflow' })}</span>
|
||||
)}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@ -134,7 +134,7 @@ const Tabs: FC<TabsProps> = ({
|
||||
tabs.map((tab) => {
|
||||
const commonProps = {
|
||||
'className': cn(
|
||||
'system-sm-medium relative mr-0.5 flex h-8 items-center rounded-t-lg px-3',
|
||||
'relative mr-0.5 flex h-8 items-center rounded-t-lg px-3 system-sm-medium',
|
||||
tab.disabled
|
||||
? 'cursor-not-allowed text-text-disabled opacity-60'
|
||||
: activeTab === tab.key
|
||||
|
||||
@ -112,11 +112,11 @@ const ToolItem: FC<Props> = ({
|
||||
})
|
||||
}}
|
||||
>
|
||||
<div className={cn('system-sm-medium h-8 truncate border-l-2 border-divider-subtle pl-4 leading-8 text-text-secondary')}>
|
||||
<div className={cn('h-8 truncate border-l-2 border-divider-subtle pl-4 leading-8 text-text-secondary system-sm-medium')}>
|
||||
<span className={cn(disabled && 'opacity-30')}>{payload.label[language]}</span>
|
||||
</div>
|
||||
{isAdded && (
|
||||
<div className="system-xs-regular mr-4 text-text-tertiary">{t('addToolModal.added', { ns: 'tools' })}</div>
|
||||
<div className="mr-4 text-text-tertiary system-xs-regular">{t('addToolModal.added', { ns: 'tools' })}</div>
|
||||
)}
|
||||
</div>
|
||||
</Tooltip>
|
||||
|
||||
@ -93,7 +93,7 @@ const Tool: FC<Props> = ({
|
||||
const notShowProviderSelectInfo = useMemo(() => {
|
||||
if (isAllSelected) {
|
||||
return (
|
||||
<span className="system-xs-regular text-text-tertiary">
|
||||
<span className="text-text-tertiary system-xs-regular">
|
||||
{t('addToolModal.added', { ns: 'tools' })}
|
||||
</span>
|
||||
)
|
||||
@ -103,7 +103,7 @@ const Tool: FC<Props> = ({
|
||||
if (isHovering && !isAllSelected) {
|
||||
return (
|
||||
<span
|
||||
className="system-xs-regular text-components-button-secondary-accent-text"
|
||||
className="text-components-button-secondary-accent-text system-xs-regular"
|
||||
onClick={() => {
|
||||
onSelectMultiple?.(BlockEnum.Tool, actions.filter(action => !getIsDisabled(action)).map((tool) => {
|
||||
const params: Record<string, string> = {}
|
||||
@ -140,7 +140,7 @@ const Tool: FC<Props> = ({
|
||||
return <></>
|
||||
|
||||
return (
|
||||
<span className="system-xs-regular text-text-tertiary">
|
||||
<span className="text-text-tertiary system-xs-regular">
|
||||
{isAllSelected
|
||||
? t('tabs.allAdded', { ns: 'workflow' })
|
||||
: `${selectedToolsNum} / ${totalToolsNum}`}
|
||||
@ -222,7 +222,7 @@ const Tool: FC<Props> = ({
|
||||
<div className="ml-2 flex w-0 grow items-center text-sm text-text-primary">
|
||||
<span className="max-w-[250px] truncate">{notShowProvider ? actions[0]?.label[language] : payload.label[language]}</span>
|
||||
{isFlatView && groupName && (
|
||||
<span className="system-xs-regular ml-2 shrink-0 text-text-quaternary">{groupName}</span>
|
||||
<span className="ml-2 shrink-0 text-text-quaternary system-xs-regular">{groupName}</span>
|
||||
)}
|
||||
{isMCPTool && <Mcp className="ml-2 size-3.5 shrink-0 text-text-quaternary" />}
|
||||
</div>
|
||||
|
||||
@ -77,11 +77,11 @@ const TriggerPluginActionItem: FC<Props> = ({
|
||||
})
|
||||
}}
|
||||
>
|
||||
<div className={cn('system-sm-medium h-8 truncate border-l-2 border-divider-subtle pl-4 leading-8 text-text-secondary')}>
|
||||
<div className={cn('h-8 truncate border-l-2 border-divider-subtle pl-4 leading-8 text-text-secondary system-sm-medium')}>
|
||||
<span className={cn(disabled && 'opacity-30')}>{payload.label[language]}</span>
|
||||
</div>
|
||||
{isAdded && (
|
||||
<div className="system-xs-regular mr-4 text-text-tertiary">{t('addToolModal.added', { ns: 'tools' })}</div>
|
||||
<div className="mr-4 text-text-tertiary system-xs-regular">{t('addToolModal.added', { ns: 'tools' })}</div>
|
||||
)}
|
||||
</div>
|
||||
</Tooltip>
|
||||
|
||||
@ -133,7 +133,7 @@ const TriggerPluginItem: FC<Props> = ({
|
||||
/>
|
||||
<div className="ml-2 flex min-w-0 flex-1 items-center text-sm text-text-primary">
|
||||
<span className="max-w-[200px] truncate">{notShowProvider ? actions[0]?.label[language] : payload.label[language]}</span>
|
||||
<span className="system-xs-regular ml-2 truncate text-text-quaternary">{groupName}</span>
|
||||
<span className="ml-2 truncate text-text-quaternary system-xs-regular">{groupName}</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user