Skip to content

Commit 56580e7

Browse files
committed
Fix
1 parent 22b5a1e commit 56580e7

1 file changed

Lines changed: 10 additions & 2 deletions

File tree

apps/sim/app/workspace/[workspaceId]/home/components/message-content/message-content.tsx

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22

33
import { memo, useMemo } from 'react'
44
import { Read as ReadTool, WorkspaceFile } from '@/lib/copilot/generated/tool-catalog-v1'
5-
import { isToolHiddenInUi } from '@/lib/copilot/tools/client/hidden-tools'
65
import { resolveToolDisplay } from '@/lib/copilot/tools/client/store-utils'
76
import { ClientToolCallState } from '@/lib/copilot/tools/client/tool-call-state'
87
import type { ContentBlock, MothershipResource, OptionItem, ToolCallData } from '../../types'
@@ -18,6 +17,11 @@ import {
1817
} from './components'
1918

2019
const FILE_SUBAGENT_ID = 'file'
20+
const HIDDEN_TOOL_NAMES = new Set([
21+
'tool_search_tool_regex',
22+
'load_agent_skill',
23+
'load_custom_tool',
24+
])
2125

2226
interface TextSegment {
2327
type: 'text'
@@ -75,6 +79,10 @@ function isToolResultRead(params?: Record<string, unknown>): boolean {
7579
return typeof path === 'string' && path.startsWith('internal/tool-results/')
7680
}
7781

82+
function isHiddenToolCall(toolName: string | undefined): boolean {
83+
return !!toolName && HIDDEN_TOOL_NAMES.has(toolName)
84+
}
85+
7886
function formatToolName(name: string): string {
7987
return name
8088
.replace(/_v\d+$/, '')
@@ -301,7 +309,7 @@ function parseBlocks(blocks: ContentBlock[]): MessageSegment[] {
301309
if (block.type === 'tool_call') {
302310
if (!block.toolCall) continue
303311
const tc = block.toolCall
304-
if (isToolHiddenInUi(tc.name)) continue
312+
if (isHiddenToolCall(tc.name)) continue
305313
if (tc.name === ReadTool.id && isToolResultRead(tc.params)) continue
306314
const isDispatch = SUBAGENT_KEYS.has(tc.name) && !tc.calledBy
307315

0 commit comments

Comments
 (0)