codetether-agent 4.7.0-a-002.4

A2A-native AI coding agent for the CodeTether ecosystem
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
use crate::session::Session;

pub fn fork_if_truncated(session: &mut Session, dropped: usize) -> Option<String> {
    if dropped == 0 {
        return None;
    }
    let original = session.id.clone();
    let title = session
        .title
        .clone()
        .unwrap_or_else(|| "large session".to_string());
    session.id = uuid::Uuid::new_v4().to_string();
    session.title = Some(format!("{title} (continued)"));
    Some(original)
}