MCPcopy Create free account
hub / github.com/MoonshotAI/kimi-code / ToolRow

Function ToolRow

apps/vis/web/src/components/analysis/TimelineTab.tsx:336–355  ·  view source on GitHub ↗
({ tc, stepDurationMs }: { tc: ToolCallNode; stepDurationMs?: number })

Source from the content-addressed store, hash-verified

334}
335
336function ToolRow({ tc, stepDurationMs }: { tc: ToolCallNode; stepDurationMs?: number }) {
337 const widthPct = stepDurationMs && tc.durationMs ? Math.max(2, (tc.durationMs / stepDurationMs) * 100) : 0;
338 return (
339 <div className="flex flex-wrap items-center gap-2 pl-3 font-mono text-[11px]">
340 <span className="text-[var(--color-cat-tools)]">{tc.name}</span>
341 <span className="text-fg-3 tabular" title="call → result elapsed">{formatDuration(tc.durationMs)}</span>
342 {tc.outputBytes !== undefined ? (
343 <span className="text-fg-3 tabular" title="result output size">{formatBytes(tc.outputBytes)}</span>
344 ) : null}
345 {tc.isError ? <Pill tone="error" variant="outline">error</Pill> : null}
346 {tc.truncated ? <Pill tone="warning" variant="outline">truncated</Pill> : null}
347 {tc.resultLineNo === undefined ? <Pill tone="warning" variant="outline">no result</Pill> : null}
348 {widthPct > 0 ? (
349 <div className="ml-auto h-1 w-24 bg-surface-2">
350 <div className="h-1" style={{ width: `${widthPct}%`, backgroundColor: tc.isError ? 'var(--color-sev-error)' : 'var(--color-cat-tools)' }} />
351 </div>
352 ) : null}
353 </div>
354 );
355}

Callers

nothing calls this directly

Calls 2

formatDurationFunction · 0.90
formatBytesFunction · 0.90

Tested by

no test coverage detected