top + report + log --follow (issues #37 #38) - top 10 par lancements, digest markdown hebdo/mensuel, suivi du journal en direct

This commit is contained in:
2026-08-17 09:03:44 -04:00
parent f14b59e63b
commit 16926ffb00
7 changed files with 331 additions and 2 deletions
+14 -1
View File
@@ -62,6 +62,8 @@ const COMMAND_DESCRIPTIONS: &[(&str, &str)] = &[
("status", "show agent state"),
("sessions", "list agent sessions"),
("stats", "usage statistics"),
("top", "most used agents"),
("report", "activity report"),
("projects", "project activity"),
("timeline", "unified activity view"),
("log", "read the event journal"),
@@ -147,7 +149,7 @@ impl AmCompleter {
Self {
theme: std::cell::Cell::new(crate::theme::default_theme()),
commands: vec![
"list", "status", "sessions", "stats", "projects", "timeline", "log", "logs", "history", "init", "alias", "open", "watch", "search", "info", "install", "uninstall", "update",
"list", "status", "sessions", "stats", "top", "report", "projects", "timeline", "log", "logs", "history", "init", "alias", "open", "watch", "search", "info", "install", "uninstall", "update",
"start", "stop", "restart", "run", "doctor", "config", "completion",
"self-update", "self-uninstall", "export", "import", "shell", "theme",
"ls", "dir", "cd", "ps", "where", "get", "help", "version", "exit",
@@ -1265,6 +1267,14 @@ fn handle_line(
agent: rest.first().cloned(),
period: opt_value("--period"),
},
"top" => Command::Top {
period: opt_value("--period"),
},
"report" => Command::Report {
last_week: flag("--last-week"),
last_month: flag("--last-month"),
output: opt_value("--output").map(PathBuf::from),
},
"projects" => Command::Projects {
name: rest.first().cloned(),
},
@@ -1279,6 +1289,7 @@ fn handle_line(
kind: opt_value("--kind"),
since: opt_value("--since"),
limit: opt_value("--limit").and_then(|v| v.parse().ok()).unwrap_or(50),
follow: flag("--follow"),
},
"history" => Command::History {
kind: opt_value("--kind"),
@@ -1397,6 +1408,8 @@ fn is_am_command(word: &str) -> bool {
| "status"
| "sessions"
| "stats"
| "top"
| "report"
| "projects"
| "timeline"
| "log"