Skip to content

Commit e223c1d

Browse files
authored
🤖 fix: bash tool elapsed time always shows seconds (#979)
The shared `formatDuration` function introduced in e954200 can display minutes/hours for long-running processes, but the elapsed time counter shown next to the timeout should always use seconds for consistency. The timeout is always in seconds (e.g., `timeout: 3s`), so the live elapsed counter should match (e.g., `3s`, not `3m` after 180 seconds). The completed "took" result still uses `formatDuration` since human-readable durations make sense for finished tasks. cc @ethanndickson _Generated with `mux`_
1 parent 92010b0 commit e223c1d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/browser/components/tools/BashToolCall.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ export const BashToolCall: React.FC<BashToolCallProps> = ({
8383
>
8484
timeout: {args.timeout_secs ?? BASH_DEFAULT_TIMEOUT_SECS}s
8585
{result && ` • took ${formatDuration(result.wall_duration_ms)}`}
86-
{!result && isPending && elapsedTime > 0 && ` • ${formatDuration(elapsedTime)}`}
86+
{!result && isPending && elapsedTime > 0 && ` • ${Math.round(elapsedTime / 1000)}s`}
8787
</span>
8888
{result && (
8989
<span

0 commit comments

Comments
 (0)