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

Method fmt

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

Source from the content-addressed store, hash-verified

370
371impl fmt::Display for AgentSession {
372 fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
373 write!(
374 f,
375 "Session {} ({}, {}, {} turn{}, {})",
376 self.session_id,
377 self.agent_display_name,
378 self.phase,
379 self.turn_count,
380 if self.turn_count == 1 { "" } else { "s" },
381 self.duration_display(),
382 )?;
383 if let Some(ref prompt) = self.first_prompt {
384 let display = if prompt.len() > 50 {
385 let truncated: String = prompt.chars().take(47).collect();
386 format!("{}...", truncated)
387 } else {
388 prompt.clone()
389 };
390 write!(f, " — \"{}\"", display)?;
391 }
392 Ok(())
393 }
394}
395
396// 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