fix(tools): removed check in agent block for duplicate tools, since we now allow selecting of operation we have to allow a block's tool to be added to an agent more than once

This commit is contained in:
Waleed Latif
2025-04-06 19:03:52 -07:00
parent d220115196
commit 989dbc6acf

View File

@@ -162,12 +162,6 @@ export function ToolInput({ blockId, subBlockId }: ToolInputProps) {
: []
const handleSelectTool = (toolBlock: (typeof toolBlocks)[0]) => {
// Check if tool already exists
if (selectedTools.some((tool) => tool.type === toolBlock.type)) {
setOpen(false)
return
}
const hasOperations = hasMultipleOperations(toolBlock.type)
const operationOptions = hasOperations ? getOperationOptions(toolBlock.type) : []
const defaultOperation = operationOptions.length > 0 ? operationOptions[0].id : undefined