pub struct FooterData {Show 14 fields
pub model_name: String,
pub provider_name: String,
pub thinking_level: String,
pub session_name: Option<String>,
pub git_branch: Option<String>,
pub pwd: Option<String>,
pub input_tokens: Arc<AtomicU32>,
pub output_tokens: Arc<AtomicU32>,
pub cache_read_tokens: Arc<AtomicU32>,
pub cache_write_tokens: Arc<AtomicU32>,
pub context_window_pct: f32,
pub total_cost: f64,
pub session_duration_secs: u64,
pub extension_statuses: HashMap<String, String>,
}Expand description
Footer data containing all status information for the TUI footer display
Fields§
§model_name: StringCurrent model name (e.g., “claude-sonnet-4-20250501”)
provider_name: StringProvider name (e.g., “anthropic”, “openai”)
thinking_level: StringThinking level setting (e.g., “off”, “low”, “medium”, “high”)
session_name: Option<String>Current session name (if set)
git_branch: Option<String>Current git branch (from git_utils)
pwd: Option<String>Current working directory (abbreviated)
input_tokens: Arc<AtomicU32>Input tokens used in current session
output_tokens: Arc<AtomicU32>Output tokens used in current session
cache_read_tokens: Arc<AtomicU32>Cache read tokens (from model caching)
cache_write_tokens: Arc<AtomicU32>Cache write tokens (from model caching)
context_window_pct: f32Context window usage percentage (0.0 - 100.0)
total_cost: f64Total estimated cost in USD
session_duration_secs: u64Session duration in seconds
extension_statuses: HashMap<String, String>Extension status messages (key -> text)
Implementations§
Sourcepub fn with_model(self, model_name: &str, provider_name: &str) -> Self
pub fn with_model(self, model_name: &str, provider_name: &str) -> Self
Create with model information
Sourcepub fn with_thinking_level(self, level: &str) -> Self
pub fn with_thinking_level(self, level: &str) -> Self
Set the thinking level
Sourcepub fn with_session_name(self, name: Option<String>) -> Self
pub fn with_session_name(self, name: Option<String>) -> Self
Set the session name
Sourcepub fn with_git_branch(self, cwd: &PathBuf) -> Self
pub fn with_git_branch(self, cwd: &PathBuf) -> Self
Set git branch from git_utils
Sourcepub fn get_input_tokens(&self) -> u32
pub fn get_input_tokens(&self) -> u32
Get current input tokens
Sourcepub fn get_output_tokens(&self) -> u32
pub fn get_output_tokens(&self) -> u32
Get current output tokens
Sourcepub fn get_cache_read_tokens(&self) -> u32
pub fn get_cache_read_tokens(&self) -> u32
Get cache read tokens
Sourcepub fn get_cache_write_tokens(&self) -> u32
pub fn get_cache_write_tokens(&self) -> u32
Get cache write tokens
Sourcepub fn update_tokens(&self, input: u32, output: u32)
pub fn update_tokens(&self, input: u32, output: u32)
Update token counts during streaming
Sourcepub fn update_cache_tokens(&self, read: u32, write: u32)
pub fn update_cache_tokens(&self, read: u32, write: u32)
Update cache tokens during streaming
Sourcepub fn update_all_tokens(
&self,
input: u32,
output: u32,
cache_read: u32,
cache_write: u32,
)
pub fn update_all_tokens( &self, input: u32, output: u32, cache_read: u32, cache_write: u32, )
Update all token counts at once
Sourcepub fn set_context_window_pct(&mut self, pct: f32)
pub fn set_context_window_pct(&mut self, pct: f32)
Set context window percentage
Sourcepub fn set_total_cost(&mut self, cost: f64)
pub fn set_total_cost(&mut self, cost: f64)
Set total cost
Sourcepub fn set_session_duration(&mut self, secs: u64)
pub fn set_session_duration(&mut self, secs: u64)
Set session duration in seconds
Sourcepub fn set_extension_status(&mut self, key: &str, value: Option<&str>)
pub fn set_extension_status(&mut self, key: &str, value: Option<&str>)
Add an extension status message
Sourcepub fn clear_extension_statuses(&mut self)
pub fn clear_extension_statuses(&mut self)
Clear all extension statuses
Sourcepub fn format_tokens(&self) -> String
pub fn format_tokens(&self) -> String
Format tokens for display (e.g., “1.2k”, “500”)
Sourcepub fn format_context_window(&self) -> String
pub fn format_context_window(&self) -> String
Format context window percentage for display
Sourcepub fn total_tokens(&self) -> u32
pub fn total_tokens(&self) -> u32
Get total tokens
Sourcepub fn render_lines(&self, width: usize) -> Vec<String>
pub fn render_lines(&self, width: usize) -> Vec<String>
Render the footer as display strings for the TUI Returns up to 2 lines: [pwd_line, stats_line]
Trait Implementations§
Source§fn clone(&self) -> FooterData
fn clone(&self) -> FooterData
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreAuto Trait Implementations§
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§impl<T> Pointable for T
impl<T> Pointable for T
Source§impl<T> PolicyExt for Twhere
T: ?Sized,
impl<T> PolicyExt for Twhere
T: ?Sized,
Source§impl<R, P> ReadPrimitive<R> for P
impl<R, P> ReadPrimitive<R> for P
Source§fn read_from_little_endian(read: &mut R) -> Result<Self, Error>
fn read_from_little_endian(read: &mut R) -> Result<Self, Error>
ReadEndian::read_from_little_endian().