Skip to content

Commit 6684d4f

Browse files
committed
Fix client sid error
1 parent 672908d commit 6684d4f

1 file changed

Lines changed: 6 additions & 2 deletions

File tree

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

Lines changed: 6 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,7 @@ import {
1817
} from './components'
1918

2019
const FILE_SUBAGENT_ID = 'file'
20+
const HIDDEN_TOOL_NAMES = new Set(['tool_search_tool_regex', 'load_agent_skill', 'load_custom_tool'])
2121

2222
interface TextSegment {
2323
type: 'text'
@@ -75,6 +75,10 @@ function isToolResultRead(params?: Record<string, unknown>): boolean {
7575
return typeof path === 'string' && path.startsWith('internal/tool-results/')
7676
}
7777

78+
function isHiddenToolCall(toolName: string | undefined): boolean {
79+
return !!toolName && HIDDEN_TOOL_NAMES.has(toolName)
80+
}
81+
7882
function formatToolName(name: string): string {
7983
return name
8084
.replace(/_v\d+$/, '')
@@ -301,7 +305,7 @@ function parseBlocks(blocks: ContentBlock[]): MessageSegment[] {
301305
if (block.type === 'tool_call') {
302306
if (!block.toolCall) continue
303307
const tc = block.toolCall
304-
if (isToolHiddenInUi(tc.name)) continue
308+
if (isHiddenToolCall(tc.name)) continue
305309
if (tc.name === ReadTool.id && isToolResultRead(tc.params)) continue
306310
const isDispatch = SUBAGENT_KEYS.has(tc.name) && !tc.calledBy
307311

0 commit comments

Comments
 (0)