diff --git a/src/cli/components/ToolCallMessageRich.tsx b/src/cli/components/ToolCallMessageRich.tsx index b020073..15ab2b4 100644 --- a/src/cli/components/ToolCallMessageRich.tsx +++ b/src/cli/components/ToolCallMessageRich.tsx @@ -13,6 +13,7 @@ import { import { getDisplayToolName, isFileEditTool, + isFileReadTool, isFileWriteTool, isMemoryTool, isPatchTool, @@ -547,6 +548,28 @@ export const ToolCallMessage = memo( } } + // Check if this is a file read tool - show line count summary + if ( + isFileReadTool(rawName) && + line.resultOk !== false && + line.resultText + ) { + // Count lines in the result (the content returned by Read tool) + const lineCount = line.resultText.split("\n").length; + return ( + + + {prefix} + + + + Read {lineCount} lines + + + + ); + } + // Regular result handling const isError = line.resultOk === false;