mirror of https://github.com/langgenius/dify.git
fix: agent strategy selector show workflow
This commit is contained in:
parent
add6dff789
commit
0ed4ec5cd0
|
|
@ -6,6 +6,7 @@ import classNames from '@/utils/classnames'
|
|||
|
||||
export const CUSTOM_GROUP_NAME = '@@@custom@@@'
|
||||
export const WORKFLOW_GROUP_NAME = '@@@workflow@@@'
|
||||
export const AGENT_GROUP_NAME = '@@@agent@@@'
|
||||
/*
|
||||
{
|
||||
A: {
|
||||
|
|
@ -46,8 +47,10 @@ export const groupItems = (items: ToolWithProvider[], getFirstChar: (item: ToolW
|
|||
groupName = item.author
|
||||
else if (item.type === CollectionType.custom)
|
||||
groupName = CUSTOM_GROUP_NAME
|
||||
else
|
||||
else if (item.type === CollectionType.workflow)
|
||||
groupName = WORKFLOW_GROUP_NAME
|
||||
else
|
||||
groupName = AGENT_GROUP_NAME
|
||||
|
||||
if (!acc[letter][groupName])
|
||||
acc[letter][groupName] = []
|
||||
|
|
|
|||
|
|
@ -6,7 +6,7 @@ import type { BlockEnum } from '../../../types'
|
|||
import type { ToolDefaultValue } from '../../types'
|
||||
import Item from './item'
|
||||
import { useTranslation } from 'react-i18next'
|
||||
import { CUSTOM_GROUP_NAME, WORKFLOW_GROUP_NAME } from '../../index-bar'
|
||||
import { AGENT_GROUP_NAME, CUSTOM_GROUP_NAME, WORKFLOW_GROUP_NAME } from '../../index-bar'
|
||||
|
||||
type Props = {
|
||||
payload: Record<string, ToolWithProvider[]>
|
||||
|
|
@ -27,6 +27,9 @@ const ToolListTreeView: FC<Props> = ({
|
|||
if (name === WORKFLOW_GROUP_NAME)
|
||||
return t('workflow.tabs.workflowTool')
|
||||
|
||||
if (name === AGENT_GROUP_NAME)
|
||||
return t('workflow.tabs.agent')
|
||||
|
||||
return name
|
||||
}, [t])
|
||||
|
||||
|
|
|
|||
|
|
@ -60,7 +60,6 @@ const Blocks = ({
|
|||
Object.keys(withLetterAndGroupViewToolsData[letter]).forEach((groupName) => {
|
||||
if (!result[groupName])
|
||||
result[groupName] = []
|
||||
|
||||
result[groupName].push(...withLetterAndGroupViewToolsData[letter][groupName])
|
||||
})
|
||||
})
|
||||
|
|
|
|||
|
|
@ -218,6 +218,7 @@ const translation = {
|
|||
'transform': 'Transform',
|
||||
'utilities': 'Utilities',
|
||||
'noResult': 'No match found',
|
||||
'agent': 'Agent Strategy',
|
||||
},
|
||||
blocks: {
|
||||
'start': 'Start',
|
||||
|
|
|
|||
|
|
@ -218,6 +218,7 @@ const translation = {
|
|||
'transform': '转换',
|
||||
'utilities': '工具',
|
||||
'noResult': '未找到匹配项',
|
||||
'agent': 'Agent 策略',
|
||||
},
|
||||
blocks: {
|
||||
'start': '开始',
|
||||
|
|
|
|||
Loading…
Reference in New Issue