Show full details for a specific attestation.
(&self, repo: &Repository, hash_prefix: &str)
| 376 | |
| 377 | /// Show full details for a specific attestation. |
| 378 | fn show_detail(&self, repo: &Repository, hash_prefix: &str) -> CliResult<()> { |
| 379 | // Find the attestation by hash or prefix |
| 380 | let (hash, attest) = self.find_by_prefix(repo, hash_prefix)?; |
| 381 | |
| 382 | println!("Attestation {}", format_hash(&hash, false)); |
| 383 | println!(); |
| 384 | |
| 385 | // Agent info |
| 386 | println!("Agent: {}", attest.agent); |
| 387 | println!("Session: {}", attest.session_id); |
| 388 | println!( |
| 389 | "Changes: {}", |
| 390 | format_count(attest.change_count(), "change") |
| 391 | ); |
| 392 | |
| 393 | if attest.duration_wall_ms > 0 { |
| 394 | println!("Wall time: {}", attest.wall_duration_display()); |
| 395 | } |
| 396 | if attest.duration_api_ms > 0 { |
| 397 | println!("API time: {}", attest.api_duration_display()); |
| 398 | } |
| 399 | if attest.cost_usd > 0.0 { |
| 400 | println!("Cost: {}", format_cost(attest.cost_usd)); |
| 401 | } |
| 402 | if attest.total_tokens() > 0 { |
| 403 | println!("Tokens: {}", format_tokens(attest.total_tokens())); |
| 404 | } |
| 405 | if !attest.code_changes.is_empty() { |
| 406 | println!( |
| 407 | "Code: +{} -{}", |
| 408 | attest.code_changes.lines_added, attest.code_changes.lines_removed, |
| 409 | ); |
| 410 | } |
| 411 | |
| 412 | if attest.cost_usd == 0.0 && attest.total_tokens() == 0 { |
| 413 | println!(); |
| 414 | println!("Note: Cost and token data pending."); |
| 415 | println!(" Claude Code does not expose this in the SessionEnd hook."); |
| 416 | println!(" Use 'atomic agent attest --enrich' when available."); |
| 417 | } |
| 418 | |
| 419 | if let Some(ref prev) = attest.previous_attestation { |
| 420 | println!("Previous: {}", format_hash(prev, false)); |
| 421 | } |
| 422 | |
| 423 | if let Some(ref notes) = attest.notes { |
| 424 | println!("Notes: {}", notes); |
| 425 | } |
| 426 | |
| 427 | println!(); |
| 428 | |
| 429 | // Model breakdown (only if there's data) |
| 430 | if !attest.models.is_empty() { |
| 431 | println!("Model Breakdown:"); |
| 432 | for model in &attest.models { |
| 433 | println!(" {}", model); |
| 434 | } |
| 435 | println!(); |
no test coverage detected