patina-ai 0.23.0

Context orchestration for AI development - captures and evolves patterns over time
Documentation
//! Utility functions for assay command

/// Truncate string for display
pub fn truncate(s: &str, max_len: usize) -> String {
    if s.len() <= max_len {
        s.to_string()
    } else {
        format!("{}...", &s[..max_len - 3])
    }
}

#[cfg(test)]
mod tests {
    use super::*;

    #[test]
    fn test_truncate() {
        assert_eq!(truncate("short", 10), "short");
        assert_eq!(truncate("a very long string", 10), "a very ..."); // 7 chars + "..."
    }
}