Skip to content

Commit 09a0ddd

Browse files
committed
chore(agent): remove redundant tool exclusions
1 parent 65d07ec commit 09a0ddd

2 files changed

Lines changed: 5 additions & 6 deletions

File tree

  • apps/sim/app/workspace/[workspaceId]/w/[workflowId]/components/panel/components/editor/components/sub-block/components/tool-input

apps/sim/app/workspace/[workspaceId]/w/[workflowId]/components/panel/components/editor/components/sub-block/components/tool-input/tool-input.test.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,10 +11,13 @@ import {
1111
} from '@/app/workspace/[workspaceId]/w/[workflowId]/components/panel/components/editor/components/sub-block/components/tool-input/utils'
1212

1313
describe('isAgentToolBlock', () => {
14-
it('includes the current File block and excludes the legacy File block', () => {
14+
it('includes the current File block', () => {
1515
expect(isAgentToolBlock({ type: 'file_v5', category: 'blocks', hideFromToolbar: false })).toBe(
1616
true
1717
)
18+
})
19+
20+
it('excludes hidden blocks such as the legacy File block', () => {
1821
expect(isAgentToolBlock({ type: 'file', category: 'blocks', hideFromToolbar: true })).toBe(
1922
false
2023
)

apps/sim/app/workspace/[workspaceId]/w/[workflowId]/components/panel/components/editor/components/sub-block/components/tool-input/utils.ts

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -12,18 +12,14 @@ const CORE_AGENT_TOOL_TYPES = new Set([
1212
'file_v5',
1313
])
1414

15-
const EXCLUDED_AGENT_TOOL_TYPES = new Set(['evaluator', 'mcp', 'file'])
16-
1715
/**
1816
* Checks whether a registered block should appear in the agent tool picker.
1917
*/
2018
export function isAgentToolBlock(
2119
block: Pick<BlockConfig, 'category' | 'hideFromToolbar' | 'type'>
2220
): boolean {
2321
return (
24-
!block.hideFromToolbar &&
25-
(block.category === 'tools' || CORE_AGENT_TOOL_TYPES.has(block.type)) &&
26-
!EXCLUDED_AGENT_TOOL_TYPES.has(block.type)
22+
!block.hideFromToolbar && (block.category === 'tools' || CORE_AGENT_TOOL_TYPES.has(block.type))
2723
)
2824
}
2925

0 commit comments

Comments
 (0)