MCPcopy Create free account
hub / github.com/atomicdotdev/atomic / fmt

Method fmt

atomic-agent/src/turn/session.rs:657–678  ·  view source on GitHub ↗
(&self, f: &mut fmt::Formatter<'_>)

Source from the content-addressed store, hash-verified

655
656impl fmt::Display for AgentSession {
657 fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
658 write!(
659 f,
660 "Session {} ({}, {}, {} turn{}, {})",
661 self.session_id,
662 self.agent_display_name,
663 self.phase,
664 self.turn_count,
665 if self.turn_count == 1 { "" } else { "s" },
666 self.duration_display(),
667 )?;
668 if let Some(ref prompt) = self.first_prompt {
669 let display = if prompt.len() > 50 {
670 let truncated: String = prompt.chars().take(47).collect();
671 format!("{}...", truncated)
672 } else {
673 prompt.clone()
674 };
675 write!(f, " — \"{}\"", display)?;
676 }
677 Ok(())
678 }
679}
680
681// SessionState trait implementation

Callers

nothing calls this directly

Calls 5

fieldMethod · 0.80
lenMethod · 0.45
collectMethod · 0.45
cloneMethod · 0.45
finishMethod · 0.45

Tested by

no test coverage detected