Show full details for a specific attestation.
(&self, repo: &Repository, hash_prefix: &str)
| 505 | |
| 506 | /// Show full details for a specific attestation. |
| 507 | fn show_detail(&self, repo: &Repository, hash_prefix: &str) -> CliResult<()> { |
| 508 | // Find the attestation by hash or prefix |
| 509 | let (hash, attest) = self.find_by_prefix(repo, hash_prefix)?; |
| 510 | |
| 511 | println!("Attestation {}", format_hash(&hash, false)); |
| 512 | println!(); |
| 513 | |
| 514 | // Agent info |
| 515 | println!("Agent: {}", attest.agent); |
| 516 | println!("Session: {}", attest.session_id); |
| 517 | println!( |
| 518 | "Changes: {}", |
| 519 | format_count(attest.change_count(), "change") |
| 520 | ); |
| 521 | |
| 522 | if attest.duration_wall_ms > 0 { |
| 523 | println!("Wall time: {}", attest.wall_duration_display()); |
| 524 | } |
| 525 | if attest.duration_api_ms > 0 { |
| 526 | println!("API time: {}", attest.api_duration_display()); |
| 527 | } |
| 528 | if attest.cost_usd > 0.0 { |
| 529 | println!("Cost: {}", format_cost(attest.cost_usd)); |
| 530 | } |
| 531 | if attest.total_tokens() > 0 { |
| 532 | println!("Tokens: {}", format_tokens(attest.total_tokens())); |
| 533 | } |
| 534 | if !attest.code_changes.is_empty() { |
| 535 | println!( |
| 536 | "Code: +{} -{}", |
| 537 | attest.code_changes.lines_added, attest.code_changes.lines_removed, |
| 538 | ); |
| 539 | } |
| 540 | |
| 541 | if attest.cost_usd == 0.0 && attest.total_tokens() == 0 { |
| 542 | println!(); |
| 543 | println!("Note: Cost and token data pending."); |
| 544 | println!(" Claude Code does not expose this in the SessionEnd hook."); |
| 545 | println!(" Use 'atomic agent attest --enrich' when available."); |
| 546 | } |
| 547 | |
| 548 | if let Some(ref prev) = attest.previous_attestation { |
| 549 | println!("Previous: {}", format_hash(prev, false)); |
| 550 | } |
| 551 | |
| 552 | if let Some(ref notes) = attest.notes { |
| 553 | println!("Notes: {}", notes); |
| 554 | } |
| 555 | |
| 556 | println!(); |
| 557 | |
| 558 | // Model breakdown (only if there's data) |
| 559 | if !attest.models.is_empty() { |
| 560 | println!("Model Breakdown:"); |
| 561 | for model in &attest.models { |
| 562 | println!(" {}", model); |
| 563 | } |
| 564 | println!(); |
no test coverage detected