From 244f0bf535ce534daf0aedc9e628e58d882c31b5 Mon Sep 17 00:00:00 2001 From: Rafael Audibert <32079912+rafaeelaudibert@users.noreply.github.com> Date: Fri, 29 May 2026 17:57:05 -0300 Subject: [PATCH 1/2] Show skill tool calls as "Reading `` skill" Replace the raw JSON dump for Skill tool calls (e.g. `Skill {"skill":"implementing-mcp-tools"}`) with a friendlier display: `Reading skill`, with the skill name in the accent color. Generated-By: PostHog Code Task-Id: 8188a460-b85f-4aa0-b936-d65982aaba74 --- .../components/session-update/ToolCallView.tsx | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) diff --git a/apps/code/src/renderer/features/sessions/components/session-update/ToolCallView.tsx b/apps/code/src/renderer/features/sessions/components/session-update/ToolCallView.tsx index 259aa193fd..68a05e278c 100644 --- a/apps/code/src/renderer/features/sessions/components/session-update/ToolCallView.tsx +++ b/apps/code/src/renderer/features/sessions/components/session-update/ToolCallView.tsx @@ -74,13 +74,19 @@ export function ToolCallView({ Wrench; const filePath = kind === "read" && locations?.[0]?.path; - const displayText = filePath - ? `Read ${getFilename(filePath)}` - : title - ? compactHomePath(title) + const skillName = + agentToolName === "Skill" + ? (rawInput as { skill?: string } | undefined)?.skill : undefined; + const displayText = skillName + ? "Reading" + : filePath + ? `Read ${getFilename(filePath)}` + : title + ? compactHomePath(title) + : undefined; - const inputPreview = compactInput(rawInput); + const inputPreview = skillName ?? compactInput(rawInput); const fullInput = formatInput(rawInput); const output = stripCodeFences(getContentText(content) ?? ""); @@ -115,6 +121,7 @@ export function ToolCallView({ {inputPreview} )} + {skillName && skill} From da045d149fda927996af6caf812ed18092425d1c Mon Sep 17 00:00:00 2001 From: Rafael Audibert <32079912+rafaeelaudibert@users.noreply.github.com> Date: Mon, 1 Jun 2026 11:13:57 -0300 Subject: [PATCH 2/2] Show tool search calls as "Searching `` tools" Apply the same friendly display to ToolSearch calls as Skill calls, per PR review feedback. Generalize the special-casing into a small lookup table mapping tool name to prefix/suffix/highlighted input field. Generated-By: PostHog Code Task-Id: 8188a460-b85f-4aa0-b936-d65982aaba74 --- .../session-update/ToolCallView.tsx | 32 +++++++++++++++---- 1 file changed, 25 insertions(+), 7 deletions(-) diff --git a/apps/code/src/renderer/features/sessions/components/session-update/ToolCallView.tsx b/apps/code/src/renderer/features/sessions/components/session-update/ToolCallView.tsx index 68a05e278c..cdd4a929d2 100644 --- a/apps/code/src/renderer/features/sessions/components/session-update/ToolCallView.tsx +++ b/apps/code/src/renderer/features/sessions/components/session-update/ToolCallView.tsx @@ -50,6 +50,16 @@ const toolNameIcons: Record = { Skill: Command, }; +// Tools that render a friendly " `` " line instead of +// the raw JSON input preview. `inputKey` is the rawInput field to highlight. +const toolNameDisplays: Record< + string, + { prefix: string; suffix: string; inputKey: string } +> = { + Skill: { prefix: "Reading", suffix: "skill", inputKey: "skill" }, + ToolSearch: { prefix: "Searching", suffix: "tools", inputKey: "query" }, +}; + interface ToolCallViewProps extends ToolViewProps { agentToolName?: string; } @@ -74,19 +84,27 @@ export function ToolCallView({ Wrench; const filePath = kind === "read" && locations?.[0]?.path; - const skillName = - agentToolName === "Skill" - ? (rawInput as { skill?: string } | undefined)?.skill + const toolDisplay = agentToolName + ? toolNameDisplays[agentToolName] + : undefined; + const highlightValue = + toolDisplay && rawInput && typeof rawInput === "object" + ? (rawInput as Record)[toolDisplay.inputKey] : undefined; - const displayText = skillName - ? "Reading" + const specialDisplay = + toolDisplay && typeof highlightValue === "string" + ? { ...toolDisplay, value: highlightValue } + : undefined; + + const displayText = specialDisplay + ? specialDisplay.prefix : filePath ? `Read ${getFilename(filePath)}` : title ? compactHomePath(title) : undefined; - const inputPreview = skillName ?? compactInput(rawInput); + const inputPreview = specialDisplay?.value ?? compactInput(rawInput); const fullInput = formatInput(rawInput); const output = stripCodeFences(getContentText(content) ?? ""); @@ -121,7 +139,7 @@ export function ToolCallView({ {inputPreview} )} - {skillName && skill} + {specialDisplay && {specialDisplay.suffix}}