pub enum InputMode {
Prompt,
Bash,
Note,
Command,
AtFile,
HistorySearch,
}Expand description
Which input mode the PromptInput is currently in.
Goal-145: the input box is mode-aware, with auto-detection from the
first character (!/#//) and explicit cycling via Shift+Tab.
Goal-158: added AtFile mode — triggered by typing @ in Prompt
mode, showing a file-completion popup. The query and suggestion
list are stored separately in [App] (atfile_query,
atfile_suggestions, atfile_selected) so this enum stays Copy.
Goal-160: added HistorySearch mode — triggered by Ctrl+R in
Prompt mode, showing a fuzzy-search popup over submission history.
Search state lives in App (hsearch_query, hsearch_matches,
hsearch_selected) so this enum stays Copy.
Variants§
Prompt
Default mode — submit goes to the LLM as a user message.
Bash
!-prefixed; submit dispatches run_shell directly,
bypassing the LLM and the runtime transcript.
Note
#-prefixed; submit appends a System block locally only,
nothing is sent to the backend.
Command
/-prefixed; submit will eventually invoke a slash-command
(Goal 146). For Step 3 we render a placeholder System block.
AtFile
@-triggered (Goal 158): shows a file-path completion popup.
The completion query and candidates live in the parent [App].
HistorySearch
Ctrl+R-triggered (Goal 160): shows a fuzzy history-search
popup. Search state lives in the parent [App].
Implementations§
Source§impl InputMode
impl InputMode
Sourcepub fn history_prefix(self) -> &'static str
pub fn history_prefix(self) -> &'static str
Mode prefix used when storing entries in the history ring so that recalling them later restores the originating mode.
Sourcepub fn cycle_next(self) -> InputMode
pub fn cycle_next(self) -> InputMode
Cycle Prompt → Bash → Note → Prompt. Skips Command, AtFile,
and HistorySearch because those can only be reached by typing
their trigger — matches fake-cc’s behaviour.
Trait Implementations§
impl Copy for InputMode
impl Eq for InputMode
impl StructuralPartialEq for InputMode
Auto Trait Implementations§
impl Freeze for InputMode
impl RefUnwindSafe for InputMode
impl Send for InputMode
impl Sync for InputMode
impl Unpin for InputMode
impl UnsafeUnpin for InputMode
impl UnwindSafe for InputMode
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
impl<A, B, T> HttpServerConnExec<A, B> for Twhere
B: Body,
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