diff --git a/packages/cli/src/ui/components/subagents/runtime/AgentExecutionDisplay.tsx b/packages/cli/src/ui/components/subagents/runtime/AgentExecutionDisplay.tsx index b94a1c54..7d63320a 100644 --- a/packages/cli/src/ui/components/subagents/runtime/AgentExecutionDisplay.tsx +++ b/packages/cli/src/ui/components/subagents/runtime/AgentExecutionDisplay.tsx @@ -80,7 +80,7 @@ export const AgentExecutionDisplay: React.FC = ({ childWidth, config, }) => { - const [displayMode, setDisplayMode] = React.useState('default'); + const [displayMode, setDisplayMode] = React.useState('compact'); const agentColor = useMemo(() => { const colorOption = COLOR_OPTIONS.find( @@ -133,35 +133,72 @@ export const AgentExecutionDisplay: React.FC = ({ if (displayMode === 'compact') { return ( - {data.toolCalls && data.toolCalls.length > 0 && ( - - - {/* Show count of additional tool calls if there are more than 1 */} - {data.toolCalls.length > 1 && !data.pendingConfirmation && ( - - - +{data.toolCalls.length - 1} more tool calls{' '} - {data.status === 'running' ? '(ctrl+r to expand)' : ''} - - - )} + {/* Header: Agent name and status */} + {!data.pendingConfirmation && ( + + + {data.subagentName} + + + )} - {/* Inline approval prompt when awaiting confirmation */} - {data.pendingConfirmation && ( - - + {/* Running state: Show current tool call and progress */} + {data.status === 'running' && ( + <> + {/* Current tool call */} + {data.toolCalls && data.toolCalls.length > 0 && ( + + + {/* Show count of additional tool calls if there are more than 1 */} + {data.toolCalls.length > 1 && !data.pendingConfirmation && ( + + + +{data.toolCalls.length - 1} more tool calls (ctrl+r to + expand) + + + )} + + )} + + {/* Inline approval prompt when awaiting confirmation */} + {data.pendingConfirmation && ( + + + + )} + + )} + + {/* Completed state: Show summary line */} + {data.status === 'completed' && data.executionSummary && ( + + + Execution Summary: {data.executionSummary.totalToolCalls} tool + uses · {data.executionSummary.totalTokens.toLocaleString()} tokens + · {fmtDuration(data.executionSummary.totalDurationMs)} + + + )} + + {/* Failed/Cancelled state: Show error reason */} + {data.status === 'failed' && ( + + + Failed: {data.terminateReason} + )}