pub struct RenderState {Show 47 fields
pub input_buffer: String,
pub input_cursor: usize,
pub transcript: Vec<TranscriptLine>,
pub scroll_offset: usize,
pub header_context: InlineHeaderContext,
pub input_enabled: bool,
pub footer_left: Option<String>,
pub footer_right: Option<String>,
pub prompt_prefix: String,
pub placeholder: Option<String>,
pub shutdown_requested: bool,
pub message_buffer: String,
pub agent_hub_open: bool,
pub hub_entries: Vec<(String, HubEntry)>,
pub pending_quit: bool,
pub slash_popup: SlashPopup,
pub reasoning_stage: Option<String>,
pub overlay: Option<OverlayState>,
pub overlay_model_ids: Vec<String>,
pub overlay_catalog_models: Vec<(String, String)>,
pub overlay_providers: Vec<String>,
pub catalog: Option<Arc<dyn ModelCatalog>>,
pub queued_inputs: Vec<String>,
pub queue_panel_open: bool,
pub queue_selected: usize,
pub shell_mode: bool,
pub follow_ups: Vec<String>,
pub todo_items: Vec<(String, TodoStatus)>,
pub todo_provider: Option<Arc<dyn TodoStateProvider>>,
pub vim_state: VimState,
pub vim_clipboard: String,
pub search: Option<SearchState>,
pub block_display: HashMap<usize, BlockDisplayMode>,
pub last_esc_at: Option<Instant>,
pub multiline_mode: bool,
pub autonomy_mode: Mode,
pub prompt_history: Vec<String>,
pub history_pos: Option<usize>,
pub next_block_id: usize,
pub cancel_grace_until: Option<Instant>,
pub confirmation: Option<ModalConfirmation>,
pub tip: Option<EphemeralTip>,
pub cwd: PathBuf,
pub file_search: Option<FileSearchState>,
pub seen_tips: HashMap<&'static str, u32>,
pub file_commands: Vec<FileCommand>,
pub secure_input_target: Option<String>,
}Expand description
Mutable state the input thread edits (text buffer, scroll, footer) and the main loop reads for rendering.
Fields§
§input_buffer: StringEditable text in the composer.
input_cursor: usizeCursor position inside input_buffer (byte index).
transcript: Vec<TranscriptLine>Transcript lines, in display order.
scroll_offset: usizeIndex of the line currently pinned at the top of the viewport.
usize::MAX means “follow the tail” (auto-scroll).
header_context: InlineHeaderContextHeader context mirrored from InlineHeaderContext.
input_enabled: boolComposer enabled state — mirrored from SetInputEnabled.
Footer status (left + right) — mirrored from SetInputStatus.
prompt_prefix: StringComposer prompt prefix — mirrored from SetPrompt.
placeholder: Option<String>Composer placeholder — mirrored from SetPlaceholder.
shutdown_requested: boolShutdown signal received from the harness.
message_buffer: StringAccumulated text for markdown rendering at message end.
agent_hub_open: boolAgent Hub overlay open.
hub_entries: Vec<(String, HubEntry)>Hub entries snapshotted when the overlay was opened (/agents).
pending_quit: boolFirst Ctrl+C armed a quit; a second press exits (two-press quit).
slash_popup: SlashPopupSlash-command autocomplete popup state.
reasoning_stage: Option<String>Current reasoning/tool stage (e.g. “tool: read”), shown above the composer.
overlay: Option<OverlayState>Overlay modal/list state — Some when an overlay is open.
overlay_model_ids: Vec<String>Model IDs for the /model overlay picker (ordered same as overlay items).
overlay_catalog_models: Vec<(String, String)>(provider, model_id) pairs backing the /models catalog browser
overlay (ordered same as overlay items).
overlay_providers: Vec<String>Provider names backing the /providers overlay (ordered same as items).
catalog: Option<Arc<dyn ModelCatalog>>Model catalog port handle, captured once at TUI startup so slash
commands (/models, /providers) can browse the full catalog.
queued_inputs: Vec<String>Queued input prompts (waiting to be processed).
queue_panel_open: boolQueued input prompts — interactive panel open (Ctrl+; toggles).
queue_selected: usizeSelected index within the queue panel (when interactive).
shell_mode: boolShell mode — ! prefix for direct bash commands (grok-build parity).
follow_ups: Vec<String>Follow-up suggestion chips.
todo_items: Vec<(String, TodoStatus)>Todo checklist items (text, status) — refreshed from the live provider.
todo_provider: Option<Arc<dyn TodoStateProvider>>Live todo state provider — the same source the todo agent tool
writes to. None when todos are disabled; the pane stays hidden.
vim_state: VimStateVim editing state (enabled by /vim command).
vim_clipboard: StringVim clipboard buffer.
search: Option<SearchState>In-transcript search state — None when no search is active.
block_display: HashMap<usize, BlockDisplayMode>Per-block display override. An absent entry means the default (`BlockDisplayMode::Truncated).
last_esc_at: Option<Instant>Last Esc press timestamp (for double-Esc detection).
multiline_mode: boolMultiline input mode — Enter inserts newline, Shift+Enter sends.
autonomy_mode: ModeAutonomy mode mirror for display. The authoritative value lives in
the shared AskBridge mode atomic (toggled by Shift+Tab); this field
is kept in lock-step so the render loop can draw a badge.
prompt_history: Vec<String>Submitted prompt history (most-recent-first).
history_pos: Option<usize>Current position in history navigation (None = not navigating).
next_block_id: usizeNext block ID to assign when appending transcript lines.
cancel_grace_until: Option<Instant>Cancel grace window — Esc pressed within this window after a cancel is ignored (grok-build post-cancel grace, ~1s). Prevents mashing.
confirmation: Option<ModalConfirmation>Active y/n/x confirmation dialog — Some while a modal confirmation
is open. The input thread resolves it; the render loop paints it
centered on top of everything else.
tip: Option<EphemeralTip>Active ephemeral tip banner — Some for a bounded number of render
ticks, then auto-dismissed by expiry.
cwd: PathBufWorkspace root — used by the @ file picker to walk + fuzzy-match.
file_search: Option<FileSearchState>Active @-file-search dropdown — Some while the picker is open.
seen_tips: HashMap<&'static str, u32>Per-tip-key show counter — suppresses ambient tips after SEEN_CAP views.
file_commands: Vec<FileCommand>User-defined slash commands loaded once at startup from
.oxicode/commands/ and ~/.oxicode/commands/.
secure_input_target: Option<String>Provider name targeted by the currently open secure prompt. Set
before opening the prompt; cleared on OverlaySubmission::SecureInput
after the key is written. None outside the /providers key-entry
flow so a stray SecureInput cannot leak into a different provider.
Implementations§
Source§impl RenderState
impl RenderState
Sourcepub fn start_search(&mut self, query: &str)
pub fn start_search(&mut self, query: &str)
Start a new transcript search, collecting all matching line indices.
Sourcepub fn search_next(&mut self)
pub fn search_next(&mut self)
Advance to the next search match (wraps around).
Sourcepub fn search_prev(&mut self)
pub fn search_prev(&mut self)
Go to the previous search match (wraps around).
Sourcepub fn block_mode(&self, block_id: usize) -> BlockDisplayMode
pub fn block_mode(&self, block_id: usize) -> BlockDisplayMode
The display mode for a block — explicit override or the Truncated default.
Sourcepub fn cycle_block_at_view(&mut self)
pub fn cycle_block_at_view(&mut self)
Cycle the display mode of the block at (or nearest above) the current scroll offset: Collapsed → Truncated → Expanded → Collapsed.
Sourcepub fn expand_all(&mut self)
pub fn expand_all(&mut self)
Expand every block (show every line at full weight).
Sourcepub fn truncate_all(&mut self)
pub fn truncate_all(&mut self)
Reset every block to the default Truncated mode.
Sourcepub fn jump_next_turn(&mut self)
pub fn jump_next_turn(&mut self)
Jump the scroll to the start of the next assistant (Agent) block.
Sourcepub fn jump_prev_turn(&mut self)
pub fn jump_prev_turn(&mut self)
Jump the scroll to the start of the previous user block.
Sourcepub fn drain_queue_head(&mut self)
pub fn drain_queue_head(&mut self)
Drop the head of the queued-input list. Called when a turn ends so the queue pane stops showing the prompt that is now running.
Trait Implementations§
Source§impl Default for RenderState
impl Default for RenderState
Source§fn default() -> RenderState
fn default() -> RenderState
Auto Trait Implementations§
impl !RefUnwindSafe for RenderState
impl !UnwindSafe for RenderState
impl Freeze for RenderState
impl Send for RenderState
impl Sync for RenderState
impl Unpin for RenderState
impl UnsafeUnpin for RenderState
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
impl<T> ErasedDestructor for Twhere
T: 'static,
impl<T> ErasedDestructor for Twhere
T: 'static,
Source§impl<T> GetSetFdFlags for T
impl<T> GetSetFdFlags for T
Source§fn get_fd_flags(&self) -> Result<FdFlags, Error>where
T: AsFilelike,
fn get_fd_flags(&self) -> Result<FdFlags, Error>where
T: AsFilelike,
self file descriptor.Source§fn new_set_fd_flags(&self, fd_flags: FdFlags) -> Result<SetFdFlags<T>, Error>where
T: AsFilelike,
fn new_set_fd_flags(&self, fd_flags: FdFlags) -> Result<SetFdFlags<T>, Error>where
T: AsFilelike,
Source§fn set_fd_flags(&mut self, set_fd_flags: SetFdFlags<T>) -> Result<(), Error>where
T: Sized + AsFilelike,
fn set_fd_flags(&mut self, set_fd_flags: SetFdFlags<T>) -> Result<(), Error>where
T: Sized + AsFilelike,
self file descriptor. Read moreSource§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 moreSource§impl<T> MaybeBoxed<Box<T>> for T
impl<T> MaybeBoxed<Box<T>> for T
Source§fn maybe_boxed(self) -> Box<T>
fn maybe_boxed(self) -> Box<T>
Source§impl<T> MaybeBoxed<T> for T
impl<T> MaybeBoxed<T> for T
Source§fn maybe_boxed(self) -> T
fn maybe_boxed(self) -> T
impl<T> MaybeSendSync for T
Source§impl<T> Pipe for Twhere
T: ?Sized,
impl<T> Pipe for Twhere
T: ?Sized,
Source§fn pipe<R>(self, func: impl FnOnce(Self) -> R) -> Rwhere
Self: Sized,
fn pipe<R>(self, func: impl FnOnce(Self) -> R) -> Rwhere
Self: Sized,
Source§fn pipe_ref<'a, R>(&'a self, func: impl FnOnce(&'a Self) -> R) -> Rwhere
R: 'a,
fn pipe_ref<'a, R>(&'a self, func: impl FnOnce(&'a Self) -> R) -> Rwhere
R: 'a,
self and passes that borrow into the pipe function. Read moreSource§fn pipe_ref_mut<'a, R>(&'a mut self, func: impl FnOnce(&'a mut Self) -> R) -> Rwhere
R: 'a,
fn pipe_ref_mut<'a, R>(&'a mut self, func: impl FnOnce(&'a mut Self) -> R) -> Rwhere
R: 'a,
self and passes that borrow into the pipe function. Read moreSource§fn pipe_borrow<'a, B, R>(&'a self, func: impl FnOnce(&'a B) -> R) -> R
fn pipe_borrow<'a, B, R>(&'a self, func: impl FnOnce(&'a B) -> R) -> R
Source§fn pipe_borrow_mut<'a, B, R>(
&'a mut self,
func: impl FnOnce(&'a mut B) -> R,
) -> R
fn pipe_borrow_mut<'a, B, R>( &'a mut self, func: impl FnOnce(&'a mut B) -> R, ) -> R
Source§fn pipe_as_ref<'a, U, R>(&'a self, func: impl FnOnce(&'a U) -> R) -> R
fn pipe_as_ref<'a, U, R>(&'a self, func: impl FnOnce(&'a U) -> R) -> R
self, then passes self.as_ref() into the pipe function.Source§fn pipe_as_mut<'a, U, R>(&'a mut self, func: impl FnOnce(&'a mut U) -> R) -> R
fn pipe_as_mut<'a, U, R>(&'a mut self, func: impl FnOnce(&'a mut U) -> R) -> R
self, then passes self.as_mut() into the pipe
function.Source§fn pipe_deref<'a, T, R>(&'a self, func: impl FnOnce(&'a T) -> R) -> R
fn pipe_deref<'a, T, R>(&'a self, func: impl FnOnce(&'a T) -> R) -> R
self, then passes self.deref() into the pipe function.Source§impl<T> Pointable for T
impl<T> Pointable for T
Source§impl<T> PolicyExt for Twhere
T: ?Sized,
impl<T> PolicyExt for Twhere
T: ?Sized,
impl<T> Read<Exclusive, BecauseExclusive> for Twhere
T: ?Sized,
Source§impl<R, P> ReadPrimitive<R> for P
impl<R, P> ReadPrimitive<R> for P
Source§fn read_from_little_endian(read: &mut R) -> Result<Self, Error>
fn read_from_little_endian(read: &mut R) -> Result<Self, Error>
ReadEndian::read_from_little_endian().Source§impl<T> Tap for T
impl<T> Tap for T
Source§fn tap_borrow<B>(self, func: impl FnOnce(&B)) -> Self
fn tap_borrow<B>(self, func: impl FnOnce(&B)) -> Self
Borrow<B> of a value. Read moreSource§fn tap_borrow_mut<B>(self, func: impl FnOnce(&mut B)) -> Self
fn tap_borrow_mut<B>(self, func: impl FnOnce(&mut B)) -> Self
BorrowMut<B> of a value. Read moreSource§fn tap_ref<R>(self, func: impl FnOnce(&R)) -> Self
fn tap_ref<R>(self, func: impl FnOnce(&R)) -> Self
AsRef<R> view of a value. Read moreSource§fn tap_ref_mut<R>(self, func: impl FnOnce(&mut R)) -> Self
fn tap_ref_mut<R>(self, func: impl FnOnce(&mut R)) -> Self
AsMut<R> view of a value. Read moreSource§fn tap_deref<T>(self, func: impl FnOnce(&T)) -> Self
fn tap_deref<T>(self, func: impl FnOnce(&T)) -> Self
Deref::Target of a value. Read moreSource§fn tap_deref_mut<T>(self, func: impl FnOnce(&mut T)) -> Self
fn tap_deref_mut<T>(self, func: impl FnOnce(&mut T)) -> Self
Deref::Target of a value. Read moreSource§fn tap_dbg(self, func: impl FnOnce(&Self)) -> Self
fn tap_dbg(self, func: impl FnOnce(&Self)) -> Self
.tap() only in debug builds, and is erased in release builds.Source§fn tap_mut_dbg(self, func: impl FnOnce(&mut Self)) -> Self
fn tap_mut_dbg(self, func: impl FnOnce(&mut Self)) -> Self
.tap_mut() only in debug builds, and is erased in release
builds.Source§fn tap_borrow_dbg<B>(self, func: impl FnOnce(&B)) -> Self
fn tap_borrow_dbg<B>(self, func: impl FnOnce(&B)) -> Self
.tap_borrow() only in debug builds, and is erased in release
builds.Source§fn tap_borrow_mut_dbg<B>(self, func: impl FnOnce(&mut B)) -> Self
fn tap_borrow_mut_dbg<B>(self, func: impl FnOnce(&mut B)) -> Self
.tap_borrow_mut() only in debug builds, and is erased in release
builds.Source§fn tap_ref_dbg<R>(self, func: impl FnOnce(&R)) -> Self
fn tap_ref_dbg<R>(self, func: impl FnOnce(&R)) -> Self
.tap_ref() only in debug builds, and is erased in release
builds.Source§fn tap_ref_mut_dbg<R>(self, func: impl FnOnce(&mut R)) -> Self
fn tap_ref_mut_dbg<R>(self, func: impl FnOnce(&mut R)) -> Self
.tap_ref_mut() only in debug builds, and is erased in release
builds.Source§fn tap_deref_dbg<T>(self, func: impl FnOnce(&T)) -> Self
fn tap_deref_dbg<T>(self, func: impl FnOnce(&T)) -> Self
.tap_deref() only in debug builds, and is erased in release
builds.