Skip to main content

AppState

Struct AppState 

Source
pub struct AppState {
Show 32 fields pub input_state: InputState, pub messages_scrolling_state: MessagesScrollingState, pub loading_state: LoadingState, pub shell_popup_state: ShellPopupState, pub tool_call_state: ToolCallState, pub dialog_approval_state: DialogApprovalState, pub sessions_state: SessionsState, pub session_tool_calls_state: SessionToolCallsState, pub profile_switcher_state: ProfileSwitcherState, pub rulebook_switcher_state: RulebookSwitcherState, pub model_switcher_state: ModelSwitcherState, pub command_palette_state: CommandPaletteState, pub shortcuts_panel_state: ShortcutsPanelState, pub file_changes_popup_state: FileChangesPopupState, pub usage_tracking_state: UsageTrackingState, pub configuration_state: ConfigurationState, pub quit_intent_state: QuitIntentState, pub terminal_ui_state: TerminalUiState, pub shell_runtime_state: ShellRuntimeState, pub shell_session_state: ShellSessionState, pub banner_state: BannerState, pub toast: Option<Toast>, pub message_interaction_state: MessageInteractionState, pub side_panel_state: SidePanelState, pub user_message_queue_state: UserMessageQueueState, pub message_revert_state: MessageRevertState, pub plan_mode_state: PlanModeState, pub plan_review_state: PlanReviewState, pub ask_user_state: AskUserState, pub tool_approval_popup_state: AutoApprovePopupState, pub approval_settings_persistence_state: ApprovalSettingsPersistenceModal, pub background_tasks_state: BackgroundTasksState,
}

Fields§

§input_state: InputState§messages_scrolling_state: MessagesScrollingState§loading_state: LoadingState§shell_popup_state: ShellPopupState§tool_call_state: ToolCallState§dialog_approval_state: DialogApprovalState§sessions_state: SessionsState§session_tool_calls_state: SessionToolCallsState§profile_switcher_state: ProfileSwitcherState§rulebook_switcher_state: RulebookSwitcherState§model_switcher_state: ModelSwitcherState§command_palette_state: CommandPaletteState§shortcuts_panel_state: ShortcutsPanelState§file_changes_popup_state: FileChangesPopupState§usage_tracking_state: UsageTrackingState§configuration_state: ConfigurationState§quit_intent_state: QuitIntentState§terminal_ui_state: TerminalUiState§shell_runtime_state: ShellRuntimeState§shell_session_state: ShellSessionState§banner_state: BannerState§toast: Option<Toast>§message_interaction_state: MessageInteractionState§side_panel_state: SidePanelState§user_message_queue_state: UserMessageQueueState§message_revert_state: MessageRevertState§plan_mode_state: PlanModeState§plan_review_state: PlanReviewState§ask_user_state: AskUserState§tool_approval_popup_state: AutoApprovePopupState§approval_settings_persistence_state: ApprovalSettingsPersistenceModal§background_tasks_state: BackgroundTasksState

Implementations§

Source§

impl AppState

Source

pub fn get_helper_commands() -> Vec<HelperCommand>

Source

pub fn new(options: AppStateOptions<'_>) -> Self

Source

pub fn update_session_empty_status(&mut self)

Source

pub fn poll_plan_file(&mut self) -> Option<(Option<PlanStatus>, PlanStatus)>

Poll .stakpak/session/plan.md for changes and update cached metadata.

Called on each spinner tick (~100 ms) while plan mode is active. Uses SHA-256 content hashing to avoid unnecessary re-parsing. Returns Some((old_status, new_status)) when a status transition is detected.

Source

pub fn input(&self) -> &str

Source

pub fn cursor_position(&self) -> usize

Source

pub fn set_input(&mut self, input: &str)

Source

pub fn set_cursor_position(&mut self, pos: usize)

Source

pub fn insert_char(&mut self, c: char)

Source

pub fn insert_str(&mut self, s: &str)

Source

pub fn clear_input(&mut self)

Source

pub fn is_input_blocked(&self) -> bool

Check if user input should be blocked (during profile switch)

Source

pub fn run_shell_command( &mut self, command: String, input_tx: &Sender<InputEvent>, )

Source

pub fn poll_file_search_results(&mut self)

Source

pub fn auto_show_side_panel(&mut self)

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> Downcast for T
where T: Any,

Source§

fn into_any(self: Box<T>) -> Box<dyn Any>

Convert Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>. Box<dyn Any> can then be further downcast into Box<ConcreteType> where ConcreteType implements Trait.
Source§

fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>

Convert Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be further downcast into Rc<ConcreteType> where ConcreteType implements Trait.
Source§

fn as_any(&self) -> &(dyn Any + 'static)

Convert &Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot generate &Any’s vtable from &Trait’s.
Source§

fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)

Convert &mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot generate &mut Any’s vtable from &mut Trait’s.
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> IntoEither for T

Source§

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 more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

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
Source§

impl<T> IntoRequest<T> for T

Source§

fn into_request(self) -> Request<T>

Wrap the input message T in a tonic::Request
Source§

impl<T> Pointable for T

Source§

const ALIGN: usize

The alignment of pointer.
Source§

type Init = T

The type for initializers.
Source§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
Source§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
Source§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
Source§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

Source§

fn vzip(self) -> V

Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more