pub struct ViewState {Show 19 fields
pub theme: Arc<ResolvedTheme>,
pub width: u16,
pub height: u16,
pub quiet: bool,
pub header: HeaderData,
pub resources: Vec<LoadedResource>,
pub messages: Vec<MessageView>,
pub pending: PendingQueue,
pub status: Option<SessionStatus>,
pub widgets_above: Vec<WidgetSlot>,
pub editor: EditorView,
pub widgets_below: Vec<WidgetSlot>,
pub footer: FooterData,
pub extension_shortcuts: Vec<ShortcutHint>,
pub extension_overlay_slot: Option<SanitizedSlot>,
pub overlay: Option<Overlay>,
pub focus: FocusArea,
pub streaming: bool,
pub diagnostics: StartupDiagnostics,
}Expand description
Top-level interactive view-model state (the data behind one paint).
Named ViewState at the public boundary (re-exported from
super); internally aliased InteractiveMode would collide with the
reference class name, so this struct is ViewState.
Fields§
§theme: Arc<ResolvedTheme>Resolved theme used for this frame.
width: u16Terminal width the view was last composed for.
height: u16Terminal height the view was last composed for.
quiet: boolQuiet mode suppresses the logo/key-hint header.
header: HeaderDataHeader content (logo, version, hints).
resources: Vec<LoadedResource>Loaded skills/prompts/themes/context summary lines.
messages: Vec<MessageView>Settled + streaming chat messages in display order.
pending: PendingQueueSteering/follow-up queue and pending bash.
status: Option<SessionStatus>Active status indicator (working/retry/compaction/branch).
widgets_above: Vec<WidgetSlot>Extension widgets rendered above the editor.
editor: EditorViewEditor line(s) — the active input area view-model.
widgets_below: Vec<WidgetSlot>Extension widgets rendered below the editor.
Footer status-bar data.
extension_shortcuts: Vec<ShortcutHint>Extension shortcut rows shown in the hotkeys overlay.
extension_overlay_slot: Option<SanitizedSlot>Complete sanitized slot backing the current extension overlay.
overlay: Option<Overlay>Optional overlay currently shown (shortcut help, selectors, etc.).
focus: FocusAreaWhich area currently holds focus.
streaming: boolWhether the view is mid-stream (mutates only the active tail).
diagnostics: StartupDiagnosticsStartup diagnostics (errors/warnings from resource load).
Implementations§
Source§impl ViewState
impl ViewState
Sourcepub fn streaming(partial: AssistantMessage) -> Self
pub fn streaming(partial: AssistantMessage) -> Self
Build a streaming state with a single in-flight assistant tail.
Sourcepub fn resize(&mut self, width: u16, height: u16)
pub fn resize(&mut self, width: u16, height: u16)
Apply a resize, recording the new size and invalidating width caches.
Sourcepub fn editor_empty(&self) -> bool
pub fn editor_empty(&self) -> bool
Whether the editor input is currently empty.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for ViewState
impl RefUnwindSafe for ViewState
impl Send for ViewState
impl Sync for ViewState
impl Unpin for ViewState
impl UnsafeUnpin for ViewState
impl UnwindSafe for ViewState
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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