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: GitStatusCached git status
git_status_loading: boolWhether git status is currently loading
config: ConfigApplication configuration
active_mode: ModeCurrent active mode
focused_panel: PanelIdFocused panel
modes: ModeStatesMode-specific states
modal: Option<Modal>Active modal
chat_state: ChatStatePersistent chat state (survives modal close, universal across modes)
notifications: VecDeque<Notification>Notification queue
iris_status: IrisStatusIris agent status
companion: Option<CompanionService>Companion service for ambient awareness (optional - may fail to init)
companion_display: CompanionSessionDisplayCompanion session display data (updated periodically)
dirty: boolWhether the UI needs redraw
last_render: InstantLast render timestamp for animations
Implementations§
Source§impl StudioState
impl StudioState
Sourcepub fn new(config: Config, repo: Option<Arc<GitRepo>>) -> Self
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
Sourcepub fn suggest_initial_mode(&self) -> Mode
pub fn suggest_initial_mode(&self) -> Mode
Suggest the best initial mode based on repo state
Sourcepub fn switch_mode(&mut self, new_mode: Mode)
pub fn switch_mode(&mut self, new_mode: Mode)
Switch to a new mode with context preservation
Sourcepub fn current_notification(&self) -> Option<&Notification>
pub fn current_notification(&self) -> Option<&Notification>
Get the current notification (most recent non-expired)
Sourcepub fn cleanup_notifications(&mut self)
pub fn cleanup_notifications(&mut self)
Clean up expired notifications
Sourcepub fn mark_dirty(&mut self)
pub fn mark_dirty(&mut self)
Mark state as dirty (needs redraw)
Sourcepub fn check_dirty(&mut self) -> bool
pub fn check_dirty(&mut self) -> bool
Check and clear dirty flag
Sourcepub fn focus_next_panel(&mut self)
pub fn focus_next_panel(&mut self)
Focus the next panel
Sourcepub fn focus_prev_panel(&mut self)
pub fn focus_prev_panel(&mut self)
Focus the previous panel
Sourcepub fn close_modal(&mut self)
pub fn close_modal(&mut self)
Close any open modal
Sourcepub fn set_iris_thinking(&mut self, task: impl Into<String>)
pub fn set_iris_thinking(&mut self, task: impl Into<String>)
Update Iris status
Sourcepub fn add_status_message(&mut self, message: StatusMessage)
pub fn add_status_message(&mut self, message: StatusMessage)
Add a dynamic status message (received from fast model)
Sourcepub fn set_iris_idle(&mut self)
pub fn set_iris_idle(&mut self)
Set Iris idle
Sourcepub fn set_iris_complete(&mut self, message: impl Into<String>)
pub fn set_iris_complete(&mut self, message: impl Into<String>)
Set Iris complete with a message (stays until next task)
Sourcepub fn set_iris_error(&mut self, error: impl Into<String>)
pub fn set_iris_error(&mut self, error: impl Into<String>)
Set Iris error
Sourcepub fn get_branch_refs(&self) -> Vec<String>
pub fn get_branch_refs(&self) -> Vec<String>
Get list of branch refs for selection
Sourcepub fn get_commit_presets(&self) -> Vec<PresetInfo>
pub fn get_commit_presets(&self) -> Vec<PresetInfo>
Get list of commit-related presets for selection
Sourcepub fn get_emoji_list(&self) -> Vec<EmojiInfo>
pub fn get_emoji_list(&self) -> Vec<EmojiInfo>
Get list of emojis for selection (None, Auto, then all gitmojis)
Sourcepub fn update_companion_display(&mut self)
pub fn update_companion_display(&mut self)
Update companion display from session data and git info
Sourcepub fn clear_companion_welcome(&mut self)
pub fn clear_companion_welcome(&mut self)
Clear welcome message (after user has seen it)
Sourcepub fn companion_touch_file(&mut self, path: PathBuf)
pub fn companion_touch_file(&mut self, path: PathBuf)
Record a file touch in companion (for manual tracking when watcher isn’t active)
Sourcepub fn companion_record_commit(&mut self, hash: String)
pub fn companion_record_commit(&mut self, hash: String)
Record a commit in companion
Auto Trait Implementations§
impl !Freeze for StudioState
impl !RefUnwindSafe for StudioState
impl Send for StudioState
impl Sync for StudioState
impl Unpin for StudioState
impl !UnwindSafe for StudioState
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
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> 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>
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>
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