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

Method fmt

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

Source from the content-addressed store, hash-verified

398
399impl fmt::Display for AgentSession {
400 fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
401 write!(
402 f,
403 "Session {} ({}, {}, {} turn{}, {})",
404 self.session_id,
405 self.agent_display_name,
406 self.phase,
407 self.turn_count,
408 if self.turn_count == 1 { "" } else { "s" },
409 self.duration_display(),
410 )?;
411 if let Some(ref prompt) = self.first_prompt {
412 let display = if prompt.len() > 50 {
413 let truncated: String = prompt.chars().take(47).collect();
414 format!("{}...", truncated)
415 } else {
416 prompt.clone()
417 };
418 write!(f, " — \"{}\"", display)?;
419 }
420 Ok(())
421 }
422}
423
424// SessionState trait implementation

Callers

nothing calls this directly

Calls 3

lenMethod · 0.45
cloneMethod · 0.45
finishMethod · 0.45

Tested by

no test coverage detected