Skip to content
This repository was archived by the owner on Aug 6, 2026. It is now read-only.

Commit c00847c

Browse files
committed
feat: add file path to read tool
1 parent adf1f25 commit c00847c

1 file changed

Lines changed: 6 additions & 2 deletions

File tree

  • apps/array/src/renderer/features/sessions/components/session-update

‎apps/array/src/renderer/features/sessions/components/session-update/ToolCallView.tsx‎

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,13 +36,17 @@ interface ToolCallViewProps {
3636
}
3737

3838
export function ToolCallView({ toolCall, turnCancelled }: ToolCallViewProps) {
39-
const { title, kind, status } = toolCall;
39+
const { title, kind, status, locations } = toolCall;
4040
const isIncomplete = status === "pending" || status === "in_progress";
4141
const isLoading = isIncomplete && !turnCancelled;
4242
const isFailed = status === "failed";
4343
const wasCancelled = isIncomplete && turnCancelled;
4444
const KindIcon = kind ? kindIcons[kind] : Wrench;
4545

46+
// For read tool, show file path from locations if available
47+
const filePath = kind === "read" && locations?.[0]?.path;
48+
const displayText = filePath ? `Read ${filePath}` : title;
49+
4650
return (
4751
<Flex align="center" gap="2" className="py-0.5 pl-3">
4852
{isLoading ? (
@@ -51,7 +55,7 @@ export function ToolCallView({ toolCall, turnCancelled }: ToolCallViewProps) {
5155
<KindIcon size={12} className="text-gray-9" />
5256
)}
5357
<Code size="1" color="gray">
54-
{title}
58+
{displayText}
5559
</Code>
5660
{isFailed && (
5761
<Text size="1" color="gray">

0 commit comments

Comments
 (0)