codetether_agent/tui/ui/chat_view/attachment.rs
1//! Attachment badge suffix for the input area title.
2//!
3//! [`attachment_suffix`] produces a short string like `| 📷 2 attached`
4//! reflecting pending image attachments only. Mid-stream steering is
5//! no longer a concept; see [`crate::tui::app::commands`] for `/ask`.
6
7use crate::tui::app::state::App;
8
9/// Build a short suffix like `| 📷 2 attached` or empty.
10///
11/// Returns an empty `String` when there are no pending images, so the
12/// input title stays clean.
13pub fn attachment_suffix(app: &App) -> String {
14 let pending_images = app.state.pending_images.len();
15 if pending_images == 0 {
16 return String::new();
17 }
18 format!(" | 📷 {pending_images} attached ")
19}