pub struct App {Show 23 fields
pub input: String,
pub cursor_pos: usize,
pub awaiting_approval: bool,
pub spinner_frame: usize,
pub current_task: Option<String>,
pub task_start_time: Option<Instant>,
pub job_start_time: Option<Instant>,
pub cwd: String,
pub model: String,
pub history: Vec<String>,
pub history_index: Option<usize>,
pub footer_height: u16,
pub token_usage: TokenUsage,
pub aborted: bool,
pub queued_commands: Vec<String>,
pub log_x: u16,
pub log_y: u16,
pub reasoning_started: bool,
pub content_started: bool,
pub is_path_traversal_warning: bool,
pub terminal_size: Arc<RwLock<TerminalSize>>,
pub output_buffer: String,
pub last_key_time: Option<Instant>,
}Fields§
§input: String§cursor_pos: usizeByte position of cursor within input (0 = start)
awaiting_approval: bool§spinner_frame: usize§current_task: Option<String>§task_start_time: Option<Instant>When the current task label last changed (for display only)
job_start_time: Option<Instant>When the entire agent job started (never reset until finish_task)
cwd: String§model: String§history: Vec<String>§history_index: Option<usize>Footer is always 4 lines: status, folder+token, input, queue
token_usage: TokenUsage§aborted: boolWhen true, ignore incoming AgentEvents (after abort)
queued_commands: Vec<String>Pending commands that were sent but not yet completed. Index 0 is the currently-running command; the rest are queued.
log_x: u16§log_y: u16§reasoning_started: bool§content_started: bool§is_path_traversal_warning: bool§terminal_size: Arc<RwLock<TerminalSize>>§output_buffer: String§last_key_time: Option<Instant>Implementations§
Source§impl App
impl App
pub fn new() -> Self
pub fn next_history(&mut self)
pub fn prev_history(&mut self)
pub fn start_task(&mut self, task: String)
pub fn finish_task(&mut self)
pub fn tick(&mut self)
Sourcepub fn total_tokens(&self) -> u64
pub fn total_tokens(&self) -> u64
Total tokens used so far
Trait Implementations§
Auto Trait Implementations§
impl Freeze for App
impl RefUnwindSafe for App
impl Send for App
impl Sync for App
impl Unpin for App
impl UnsafeUnpin for App
impl UnwindSafe for App
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
Mutably borrows from an owned value. Read more
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>
Converts
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>
Converts
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 more