Skip to main content

ShellChrome

Struct ShellChrome 

Source
pub struct ShellChrome {
Show 20 fields pub mode: ShellMode, pub windows: Vec<WindowSummary>, pub active_win: usize, pub model_list: SelectList<ModelEntry>, pub bg: BackgroundState, pub preview_bg: BackgroundState, pub settings_list: SelectList<BackgroundStyle>, pub private_panes: HashSet<u32>, pub cols: u16, pub pane_rows: u16, pub session_id: u32, pub viewer_id: u32, pub toasts: VecDeque<Toast>, pub console_log: VecDeque<String>, pub console_scroll: usize, pub service_list: Vec<ServiceEntry>, pub worker_list: Vec<WorkerEntry>, pub worker_pool_summary: String, pub image_list: Vec<ImageEntry>, pub pending_picker_model: Option<String>, /* private fields */
}

Fields§

§mode: ShellMode§windows: Vec<WindowSummary>§active_win: usize§model_list: SelectList<ModelEntry>§bg: BackgroundState

Background animation (full terminal area).

§preview_bg: BackgroundState

Background animation for the settings preview box.

§settings_list: SelectList<BackgroundStyle>

Settings drop-down.

§private_panes: HashSet<u32>

pane IDs that are private (client-owned ChatApp); used for 🔒 indicator.

§cols: u16§pane_rows: u16§session_id: u32§viewer_id: u32§toasts: VecDeque<Toast>

Active toast notifications.

§console_log: VecDeque<String>

Console log history (capped at 500 lines).

§console_scroll: usize

Scroll offset for console modal.

§service_list: Vec<ServiceEntry>

Service entries for the Service Manager modal.

§worker_list: Vec<WorkerEntry>

Worker/sandbox entries for the Worker Manager modal.

§worker_pool_summary: String

Pool summary line for the Worker Manager modal.

§image_list: Vec<ImageEntry>

Image list for the Images tab.

§pending_picker_model: Option<String>

Model ref waiting for load to complete before opening conversation picker.

Implementations§

Source§

impl ShellChrome

Source

pub fn new( cols: u16, pane_rows: u16, session_id: u32, viewer_id: u32, windows: Vec<WindowSummary>, models: Vec<ModelEntry>, ) -> Self

Source

pub fn update_model_status( &mut self, model_ref: &str, loaded: bool, ) -> Option<RpcRequest>

Update model loaded status (called from background polling results). Returns a follow-up RPC if a conversation picker was pending for this model.

Source

pub fn update_windows(&mut self, server_wins: Vec<WindowSummary>) -> bool

Update window list (called when TuiService reports window changes). Merges server windows with existing client-local windows (bit-31 set).

Source

pub fn active_pane_id(&self) -> u32

Active pane ID in the currently focused window. Prefers a locally-owned private pane over the server-managed active pane, since the server intentionally keeps the non-private pane as active_pane_id to avoid publishing private content to viewers.

Source

pub fn tick_bg(&mut self) -> bool

Tick background animations. Returns true if animated (needs redraw).

Source

pub fn push_toast(&mut self, msg: impl Into<String>, level: ToastLevel)

Push a toast notification. Also persists the message to console_log.

Source

pub fn tick_toasts(&mut self) -> bool

Expire stale toasts. Returns true if any expired (caller should redraw).

Source

pub fn log_line(&mut self, line: impl Into<String>)

Append a line to the console log (capped at 500 entries).

Source

pub fn update_service_list(&mut self, entries: Vec<ServiceEntry>)

Source

pub fn update_worker_list( &mut self, sandboxes: Vec<WorkerEntry>, pool_summary: String, )

Source

pub fn handle_key(&mut self, key: KeyPress) -> Vec<ChromeOutput>

Source

pub fn update_git_op_progress(&mut self, msg: &str)

Update git operation progress from the service layer.

Source

pub fn update_clone_progress(&mut self, stage: &str, pct: u8)

Update clone progress from the service layer.

Source

pub fn finish_clone(&mut self, success: bool, msg: String)

Transition clone flow to done/failed.

Source

pub fn open_conversation_picker( &mut self, model_ref: String, conversations: Vec<ConversationPickerEntry>, )

Open the conversation picker with the given entries. Called by the shell handler after loading the manifest.

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> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

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, 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.