(args: AgentCommandArgs)
| 12 | pub(crate) use report::{report_from_rows, summarize_entries}; |
| 13 | |
| 14 | pub(crate) fn run(args: AgentCommandArgs) -> Result<()> { |
| 15 | let shared = args.shared; |
| 16 | let pricing = PricingMap::load_with_overrides( |
| 17 | shared.offline, |
| 18 | crate::log_level() != Some(0), |
| 19 | shared.pricing_overrides.iter(), |
| 20 | ); |
| 21 | let mut entries = load_entries(&shared, &pricing)?; |
| 22 | filter_loaded_entries_by_date(&mut entries, &shared); |
| 23 | let mut rows = summarize_entries(&entries, args.kind)?; |
| 24 | sort_summaries(&mut rows, &shared.order, report::summary_period); |
| 25 | if wants_json(&shared) { |
| 26 | return print_json_or_jq( |
| 27 | report_from_rows(&rows, args.kind), |
| 28 | shared.jq.as_deref(), |
| 29 | shared.no_cost, |
| 30 | ); |
| 31 | } |
| 32 | crate::adapter::amp::print_table_for_agent("Codebuff", args.kind, &rows, &shared)?; |
| 33 | Ok(()) |
| 34 | } |
nothing calls this directly
no test coverage detected