pub struct App { /* private fields */ }Expand description
Root UI state: reduces terminal input and ACP events into the canonical conversation, feature state, and composer that the renderer draws each frame.
Implementations§
Source§impl App
impl App
pub fn on_terminal_event(&mut self, event: Event)
pub fn render_route( &mut self, area: Rect, buf: &mut Buffer, cx: &mut DrawContext<'_>, ) -> Option<Position>
pub fn render_overlay( &mut self, area: Rect, buf: &mut Buffer, cx: &mut DrawContext<'_>, ) -> Option<Position>
Sourcepub fn needs_mouse_capture(&self) -> bool
pub fn needs_mouse_capture(&self) -> bool
Only the bare composer works without mouse reporting; every other route or overlay has scrollable or clickable content.
Source§impl App
impl App
pub fn new(config: AppConfig) -> Self
Sourcepub fn update(&mut self, message: Message) -> Vec<Command>
pub fn update(&mut self, message: Message) -> Vec<Command>
Reduce one external input and return its commands.
This is the synchronous model boundary used by the runtime dispatcher.
pub fn take_commands(&mut self) -> Vec<Command>
pub fn on_command_result(&mut self, result: CommandResult)
pub fn on_tick(&mut self, now: Instant)
pub fn wants_tick(&self) -> bool
pub fn has_session_picker(&self) -> bool
pub fn has_modal(&self) -> bool
pub fn full_screen_active(&self) -> bool
pub fn workspace_move_state(&self) -> WorkspaceMoveState
pub fn exit_requested(&self) -> bool
pub fn conversation_items(&self) -> &[ConversationItem]
pub fn conversation_id(&self) -> ConversationId
pub fn composer(&self) -> &Composer
pub fn config_options(&self) -> &[LocalConfigOption]
pub fn auth_methods(&self) -> &[AuthMethod]
Sourcepub fn status_line_model(&self) -> StatusLineModel<'_>
pub fn status_line_model(&self) -> StatusLineModel<'_>
Everything the status line reads, gathered for one frame.
pub fn ui_settings(&self) -> &UiSettings
Sourcepub fn theme(&self) -> &Theme
pub fn theme(&self) -> &Theme
The active theme; the renderer resyncs when theme_generation moves.
Sourcepub fn waiting_for_response(&self) -> bool
pub fn waiting_for_response(&self) -> bool
A prompt is outstanding, so the agent owes us a reply.
Sourcepub fn is_agent_busy(&self) -> bool
pub fn is_agent_busy(&self) -> bool
Either the prompt or one of its tool calls is still running.
pub fn progress_indicator(&self) -> &ProgressIndicator
Sourcepub fn exit_confirmation_active(&self) -> bool
pub fn exit_confirmation_active(&self) -> bool
Test seam: the status line reads this through
App::status_line_model rather than calling it.
pub fn plan_entries(&self) -> Vec<PlanEntry>
Auto Trait Implementations§
impl !RefUnwindSafe for App
impl !Send for App
impl !Sync for App
impl !UnwindSafe for App
impl Freeze for App
impl Unpin for App
impl UnsafeUnpin 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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
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 moreSource§impl<T> IntoMaybeUndefined<T> for T
impl<T> IntoMaybeUndefined<T> for T
Source§fn into_maybe_undefined(self) -> MaybeUndefined<T>
fn into_maybe_undefined(self) -> MaybeUndefined<T>
Converts this value into a three-state builder argument.
Source§impl<T> IntoOption<T> for T
impl<T> IntoOption<T> for T
Source§fn into_option(self) -> Option<T>
fn into_option(self) -> Option<T>
Converts this value into an optional builder argument.