StudioState

Struct StudioState 

Source
pub struct StudioState {
Show 15 fields pub repo: Option<Arc<GitRepo>>, pub git_status: GitStatus, pub git_status_loading: bool, pub config: Config, pub active_mode: Mode, pub focused_panel: PanelId, pub modes: ModeStates, pub modal: Option<Modal>, pub chat_state: ChatState, pub notifications: VecDeque<Notification>, pub iris_status: IrisStatus, pub companion: Option<CompanionService>, pub companion_display: CompanionSessionDisplay, pub dirty: bool, pub last_render: Instant,
}
Expand description

Main application state for Iris Studio

Fields§

§repo: Option<Arc<GitRepo>>

Git repository reference

§git_status: GitStatus

Cached git status

§git_status_loading: bool

Whether git status is currently loading

§config: Config

Application configuration

§active_mode: Mode

Current active mode

§focused_panel: PanelId

Focused panel

§modes: ModeStates

Mode-specific states

§modal: Option<Modal>

Active modal

§chat_state: ChatState

Persistent chat state (survives modal close, universal across modes)

§notifications: VecDeque<Notification>

Notification queue

§iris_status: IrisStatus

Iris agent status

§companion: Option<CompanionService>

Companion service for ambient awareness (optional - may fail to init)

§companion_display: CompanionSessionDisplay

Companion session display data (updated periodically)

§dirty: bool

Whether the UI needs redraw

§last_render: Instant

Last render timestamp for animations

Implementations§

Source§

impl StudioState

Source

pub fn new(config: Config, repo: Option<Arc<GitRepo>>) -> Self

Create new studio state Note: Companion service is initialized asynchronously via load_companion_async() in app for fast startup

Source

pub fn suggest_initial_mode(&self) -> Mode

Suggest the best initial mode based on repo state

Source

pub fn switch_mode(&mut self, new_mode: Mode)

Switch to a new mode with context preservation

Source

pub fn notify(&mut self, notification: Notification)

Add a notification

Source

pub fn current_notification(&self) -> Option<&Notification>

Get the current notification (most recent non-expired)

Source

pub fn cleanup_notifications(&mut self)

Clean up expired notifications

Source

pub fn mark_dirty(&mut self)

Mark state as dirty (needs redraw)

Source

pub fn check_dirty(&mut self) -> bool

Check and clear dirty flag

Source

pub fn focus_next_panel(&mut self)

Focus the next panel

Source

pub fn focus_prev_panel(&mut self)

Focus the previous panel

Source

pub fn show_help(&mut self)

Open help modal

Source

pub fn show_chat(&mut self)

Open chat modal (universal, persists across modes)

Source

pub fn close_modal(&mut self)

Close any open modal

Source

pub fn set_iris_thinking(&mut self, task: impl Into<String>)

Update Iris status

Source

pub fn add_status_message(&mut self, message: StatusMessage)

Add a dynamic status message (received from fast model)

Source

pub fn set_iris_idle(&mut self)

Set Iris idle

Source

pub fn set_iris_complete(&mut self, message: impl Into<String>)

Set Iris complete with a message (stays until next task)

Source

pub fn set_iris_error(&mut self, error: impl Into<String>)

Set Iris error

Source

pub fn tick(&mut self)

Tick animations (spinner, etc.)

Source

pub fn get_branch_refs(&self) -> Vec<String>

Get list of branch refs for selection

Source

pub fn get_commit_presets(&self) -> Vec<PresetInfo>

Get list of commit-related presets for selection

Source

pub fn get_emoji_list(&self) -> Vec<EmojiInfo>

Get list of emojis for selection (None, Auto, then all gitmojis)

Source

pub fn update_companion_display(&mut self)

Update companion display from session data and git info

Source

pub fn clear_companion_welcome(&mut self)

Clear welcome message (after user has seen it)

Source

pub fn companion_touch_file(&mut self, path: PathBuf)

Record a file touch in companion (for manual tracking when watcher isn’t active)

Source

pub fn companion_record_commit(&mut self, hash: String)

Record a commit in companion

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> 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> 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> 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> PolicyExt for T
where T: ?Sized,

Source§

fn and<P, B, E>(self, other: P) -> And<T, P>
where T: Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns Action::Follow only if self and other return Action::Follow. Read more
Source§

fn or<P, B, E>(self, other: P) -> Or<T, P>
where T: Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns Action::Follow if either self or other returns Action::Follow. 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.
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
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
Source§

impl<T> WasmCompatSend for T
where T: Send,

Source§

impl<T> WasmCompatSync for T
where T: Sync,