Skip to content

Commit 6aabe4a

Browse files
committed
🤖 fix: count only running processes in background list header
1 parent f463c75 commit 6aabe4a

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/browser/components/tools/BashBackgroundListToolCall.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ export const BashBackgroundListToolCall: React.FC<BashBackgroundListToolCallProp
5050
const { expanded, toggleExpanded } = useToolExpansion(false);
5151

5252
const processes = result?.success ? result.processes : [];
53-
const processCount = processes.length;
53+
const runningCount = processes.filter((p) => p.status === "running").length;
5454

5555
return (
5656
<ToolContainer expanded={expanded}>
@@ -59,9 +59,9 @@ export const BashBackgroundListToolCall: React.FC<BashBackgroundListToolCallProp
5959
<ToolIcon emoji="📋" toolName="bash_background_list" />
6060
<span className="text-text-secondary">
6161
{result?.success
62-
? processCount === 0
62+
? runningCount === 0
6363
? "No background processes"
64-
: `${processCount} background process${processCount !== 1 ? "es" : ""}`
64+
: `${runningCount} background process${runningCount !== 1 ? "es" : ""}`
6565
: "Listing background processes"}
6666
</span>
6767
<StatusIndicator status={status}>{getStatusDisplay(status)}</StatusIndicator>

0 commit comments

Comments
 (0)