Skip to content

Commit e975bc6

Browse files
committed
Dont show internal tool result reads
1 parent 646f453 commit e975bc6

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

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

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,11 @@ const SUBAGENT_DISPATCH_TOOLS: Record<string, string> = {
5151
[FileWrite.id]: WorkspaceFile.id,
5252
}
5353

54+
function isToolResultRead(params?: Record<string, unknown>): boolean {
55+
const path = params?.path
56+
return typeof path === 'string' && path.startsWith('internal/tool-results/')
57+
}
58+
5459
function formatToolName(name: string): string {
5560
return name
5661
.replace(/_v\d+$/, '')
@@ -206,6 +211,7 @@ function parseBlocks(blocks: ContentBlock[]): MessageSegment[] {
206211
if (!block.toolCall) continue
207212
const tc = block.toolCall
208213
if (tc.name === ToolSearchToolRegex.id) continue
214+
if (tc.name === ReadTool.id && isToolResultRead(tc.params)) continue
209215
const isDispatch = SUBAGENT_KEYS.has(tc.name) && !tc.calledBy
210216

211217
if (isDispatch) {

0 commit comments

Comments
 (0)