use crate::SessionState;
pub(crate) fn status_line(state: &SessionState) -> String {
let profile = state.profile.as_deref().unwrap_or("(no profile)");
let included = if state.included_profiles.is_empty() {
String::new()
} else {
format!(
" {}",
state
.included_profiles
.iter()
.map(|profile| format!("+{profile}"))
.collect::<Vec<_>>()
.join(" ")
)
};
let privacy = if state.allow_data_sharing {
"privacy:on"
} else {
"privacy:off"
};
format!(
"[{profile}{included}] {}/{} approval:{} {privacy}",
state.provider, state.model, state.approval_mode
)
}