From 02cb2da917a62621484203f988d1b0905776b238 Mon Sep 17 00:00:00 2001 From: Jeffrey Phillips Freeman Date: Thu, 2 Apr 2026 21:32:41 +0000 Subject: [PATCH] fix(cli): add Summary panel and success message to actor list rich output MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Implements issue #1525. The agents actor list command now displays: - Summary panel showing Total, Built-in, Custom, Unsafe, and Providers Used counts - Success message: ✓ OK N actors listed This aligns the rich output with the specification requirements. --- src/cleveragents/cli/commands/actor.py | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/src/cleveragents/cli/commands/actor.py b/src/cleveragents/cli/commands/actor.py index db90aab92..48e8c6326 100644 --- a/src/cleveragents/cli/commands/actor.py +++ b/src/cleveragents/cli/commands/actor.py @@ -662,6 +662,27 @@ def list_actors( console.print(table) + # Calculate summary statistics + total_actors = len(actors) + builtin_count = sum(1 for a in actors if a.is_built_in) + custom_count = total_actors - builtin_count + unsafe_count = sum(1 for a in actors if a.unsafe) + providers_used = len(set(a.provider for a in actors)) + + # Create Summary panel + summary_text = ( + f"[yellow bold]Total:[/yellow bold] {total_actors}\n" + f"[green bold]Built-in:[/green bold] {builtin_count}\n" + f"[blue bold]Custom:[/blue bold] {custom_count}\n" + f"[red bold]Unsafe:[/red bold] {unsafe_count}\n" + f"[blue bold]Providers Used:[/blue bold] {providers_used}" + ) + summary_panel = Panel(summary_text, title="Summary", border_style="dim") + console.print(summary_panel) + + # Print success message + console.print(f"[green bold]✓ OK[/green bold] {total_actors} actors listed") + @app.command() def show( -- 2.52.0