feat: can choose all in agent node

This commit is contained in:
Joel
2025-05-09 18:21:59 +08:00
parent aaa5309ba0
commit 4ee5156afb
9 changed files with 81 additions and 13 deletions

View File

@ -5,10 +5,11 @@ import {
useState,
} from 'react'
import type {
BlockEnum,
OnSelectBlock,
ToolWithProvider,
} from '../types'
import type { ToolValue } from './types'
import type { ToolDefaultValue, ToolValue } from './types'
import { ToolTypeEnum } from './types'
import Tools from './tools'
import { useToolTabs } from './hooks'
@ -31,6 +32,7 @@ type AllToolsProps = {
workflowTools: ToolWithProvider[]
mcpTools: ToolWithProvider[]
onSelect: OnSelectBlock
onSelectMultiple: (type: BlockEnum, tools: ToolDefaultValue[]) => void
selectedTools?: ToolValue[]
}
@ -42,6 +44,7 @@ const AllTools = ({
searchText,
tags = DEFAULT_TAGS,
onSelect,
onSelectMultiple,
buildInTools,
workflowTools,
customTools,
@ -136,6 +139,7 @@ const AllTools = ({
showWorkflowEmpty={activeTab === ToolTypeEnum.Workflow}
tools={tools}
onSelect={onSelect}
onSelectMultiple={onSelectMultiple}
viewType={isSupportGroupView ? activeView : ViewType.flat}
hasSearchText={!!searchText}
selectedTools={selectedTools}