pub struct Tui { /* private fields */ }Expand description
Main TUI application state
Implementations§
Source§impl Tui
impl Tui
pub async fn handle_confirm_exit_mode(&mut self, key: KeyEvent) -> Result<bool>
Source§impl Tui
impl Tui
pub async fn handle_edit_selection_mode( &mut self, key: KeyEvent, ) -> Result<bool>
Source§impl Tui
impl Tui
pub async fn handle_fuzzy_finder_mode(&mut self, key: KeyEvent) -> Result<bool>
Source§impl Tui
impl Tui
Sourcepub fn handle_text_manipulation(&mut self, key: KeyEvent) -> Result<bool>
pub fn handle_text_manipulation(&mut self, key: KeyEvent) -> Result<bool>
Common text manipulation handler used by both Simple mode and Vim insert mode
Source§impl Tui
impl Tui
Sourcepub fn switch_mode(&mut self, new_mode: InputMode)
pub fn switch_mode(&mut self, new_mode: InputMode)
Switch to a new mode, automatically managing the mode stack
Sourcepub fn set_mode(&mut self, new_mode: InputMode)
pub fn set_mode(&mut self, new_mode: InputMode)
Switch mode without pushing to stack (for direct transitions like vim normal->insert)
Sourcepub fn restore_previous_mode(&mut self)
pub fn restore_previous_mode(&mut self)
Restore previous mode from stack (or default if empty)
Sourcepub async fn new(
client: AgentClient,
current_model: Model,
session_id: String,
theme: Option<Theme>,
) -> Result<Self>
pub async fn new( client: AgentClient, current_model: Model, session_id: String, theme: Option<Theme>, ) -> Result<Self>
Create a new TUI instance
pub fn cleanup_terminal(&mut self) -> Result<()>
pub async fn run(&mut self, event_rx: Receiver<AppEvent>) -> Result<()>
Auto Trait Implementations§
impl !Freeze for Tui
impl !RefUnwindSafe for Tui
impl Send for Tui
impl Sync for Tui
impl Unpin for Tui
impl !UnwindSafe for Tui
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 moreSource§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
Wrap the input message
T in a tonic::Request