- {call.inputSummary && (
-
- Input:
- {call.inputSummary}
-
- )}
- {call.outputSummary && (
-
- Output:
- {call.outputSummary}
+
+
+
+ {call.inputSummary && (
+
+ Input:
+ {call.inputSummary}
+
+ )}
+ {call.outputSummary && (
+
+ Output:
+ {call.outputSummary}
+
+ )}
+
+ {call.quickRef && (
+
+
+
+ QuickRef
+
- )}
-
- {call.quickRef && (
-
-
-
-
QuickRef
-
+
+ {call.quickRef.nextAction}
+
+ {call.quickRef.nextTools.length > 0 && (
+
+
+ {call.quickRef.nextTools.map((tool) => (
+
+ {tool}
+
+ ))}
-
- {call.quickRef.nextAction}
-
- {call.quickRef.nextTools.length > 0 && (
-
-
- {call.quickRef.nextTools.map((tool) => (
-
- {tool}
-
- ))}
-
- )}
- {call.quickRef.relatedGotchas.length > 0 && (
-
-
- {call.quickRef.relatedGotchas.slice(0, 3).map((g) => (
-
- {g}
-
- ))}
-
- )}
-
- )}
-
- )}
-
+ )}
+ {call.quickRef.relatedGotchas.length > 0 && (
+
+
+ {call.quickRef.relatedGotchas.slice(0, 3).map((gotcha) => (
+
+ {gotcha}
+
+ ))}
+
+ )}
+
+ )}
+
+
);
}
-export function ToolCallTransparency({ toolCalls, isStreaming, compact }: ToolCallTransparencyProps) {
+export function ToolCallTransparency({ toolCalls, compact }: ToolCallTransparencyProps) {
const stats = useMemo(() => {
const total = toolCalls.length;
- const success = toolCalls.filter((t) => t.status === 'success').length;
- const errors = toolCalls.filter((t) => t.status === 'error').length;
- const running = toolCalls.filter((t) => t.status === 'running').length;
- const totalDuration = toolCalls.reduce((sum, t) => sum + (t.durationMs || 0), 0);
- return { total, success, errors, running, totalDuration };
+ const errors = toolCalls.filter((toolCall) => toolCall.status === 'error').length;
+ const running = toolCalls.filter((toolCall) => toolCall.status === 'running').length;
+ const totalDuration = toolCalls.reduce((sum, toolCall) => sum + (toolCall.durationMs || 0), 0);
+ return { total, errors, running, totalDuration };
}, [toolCalls]);
if (toolCalls.length === 0) return null;
if (compact) {
return (
-
- {toolCalls.map((call, idx) => (
-
+
+ {toolCalls.map((call, index) => (
+
))}
);
@@ -220,7 +209,7 @@ export function ToolCallTransparency({ toolCalls, isStreaming, compact }: ToolCa
return (
-
+
{stats.total} tool call{stats.total !== 1 ? 's' : ''}
@@ -228,8 +217,8 @@ export function ToolCallTransparency({ toolCalls, isStreaming, compact }: ToolCa
({formatDuration(stats.totalDuration)})
)}
{stats.running > 0 && (
-
-
+
+
{stats.running} running
)}
@@ -239,8 +228,8 @@ export function ToolCallTransparency({ toolCalls, isStreaming, compact }: ToolCa
- {toolCalls.map((call, idx) => (
-
+ {toolCalls.map((call, index) => (
+
))}