App

Struct App 

Source
pub struct App {
Show 37 fields pub should_quit: bool, pub active_panel: PanelId, pub session: Session, pub context: Context, pub analyzer: CommandAnalyzer, pub educator: Educator, pub theme: Theme, pub show_help: bool, pub command_buffer: String, pub last_explanation: Option<Explanation>, pub last_output: String, pub output_scroll: usize, pub environment_vars: HashMap<String, String>, pub aliases: HashMap<String, String>, pub config: Config, pub completion_suggestions: Vec<String>, pub ai_conversation: Vec<Message>, pub ai_input_buffer: String, pub ai_response: Option<String>, pub ai_loading: bool, pub ai_mode: bool, pub onboarding: Option<OnboardingWizard>, pub settings_panel: Option<SettingsPanel>, pub analytics: Option<Analytics>, pub lesson_panel: Option<LessonPanel>, pub lesson_mode: bool, pub virtual_fs: Option<VirtualFileSystem>, pub lesson_menu: Option<LessonMenuPanel>, pub completed_lessons: HashSet<String>, pub user_stats: UserStats, pub challenge_manager: ChallengeManager, pub recommendation_engine: RecommendationEngine, pub achievements_panel: Option<AchievementsPanel>, pub progress_panel: Option<ProgressPanel>, pub challenges_panel: Option<ChallengesPanel>, pub pending_achievements: Vec<Achievement>, pub showing_notification: Option<NotificationPanel>, /* private fields */
}
Expand description

Main application state

Fields§

§should_quit: bool

Whether the application should quit

§active_panel: PanelId

Currently active panel

§session: Session

User session

§context: Context

Current context (project detection, etc.)

§analyzer: CommandAnalyzer

Command analyzer

§educator: Educator

Educator for explanations

§theme: Theme

Current theme

§show_help: bool

Show help overlay

§command_buffer: String

Command buffer for shell input

§last_explanation: Option<Explanation>

Last command explanation

§last_output: String

Last command output

§output_scroll: usize

Output panel scroll offset

§environment_vars: HashMap<String, String>

Environment variables set by export command

§aliases: HashMap<String, String>

Command aliases (name -> command)

§config: Config

Application configuration

§completion_suggestions: Vec<String>

Current completion suggestions (shown below shell input)

§ai_conversation: Vec<Message>

AI conversation history

§ai_input_buffer: String

AI input buffer (when in AI mode)

§ai_response: Option<String>

Last AI response

§ai_loading: bool

AI loading state

§ai_mode: bool

AI mode enabled (toggle between shell and AI)

§onboarding: Option<OnboardingWizard>

Onboarding wizard (shown on first run)

§settings_panel: Option<SettingsPanel>

Settings panel (interactive)

§analytics: Option<Analytics>

Analytics tracker

§lesson_panel: Option<LessonPanel>

Lesson panel for interactive lessons

§lesson_mode: bool

Lesson mode enabled (toggle between explanation and lesson)

§virtual_fs: Option<VirtualFileSystem>

Virtual filesystem for lesson sandboxing

§lesson_menu: Option<LessonMenuPanel>

Lesson menu for selecting lessons

§completed_lessons: HashSet<String>

Completed lesson IDs

§user_stats: UserStats

User statistics and progress tracking

§challenge_manager: ChallengeManager

Challenge manager for daily/weekly challenges

§recommendation_engine: RecommendationEngine

Recommendation engine for suggesting lessons

§achievements_panel: Option<AchievementsPanel>

Achievements panel

§progress_panel: Option<ProgressPanel>

Progress panel

§challenges_panel: Option<ChallengesPanel>

Challenges panel

§pending_achievements: Vec<Achievement>

Pending achievements to show notifications for

§showing_notification: Option<NotificationPanel>

Currently showing achievement notification

Implementations§

Source§

impl App

Source

pub fn new() -> Result<Self>

Create a new application

Source

pub async fn run(&mut self) -> Result<()>

Run the application

Source

pub fn update_context(&mut self) -> Result<()>

Update context (e.g., when directory changes)

Source

pub fn toggle_ai_mode(&mut self)

Toggle AI assistant mode

Source

pub fn toggle_lesson_mode(&mut self)

Toggle lesson mode

Source

pub async fn ask_ai(&mut self, question: String) -> Result<()>

Ask the AI assistant a question

Source

pub fn clear_ai_conversation(&mut self)

Clear AI conversation

Source

pub fn toggle_achievements_panel(&mut self)

Toggle achievements panel

Source

pub fn toggle_progress_panel(&mut self)

Toggle progress panel

Source

pub fn toggle_challenges_panel(&mut self)

Toggle challenges panel

Source

pub fn check_and_unlock_achievements(&mut self)

Check for newly unlocked achievements and queue notifications

Source

pub fn record_command_for_stats(&mut self, command: &str)

Record command execution for stats tracking

Source

pub fn record_lesson_completion( &mut self, lesson_id: String, difficulty: Difficulty, )

Record lesson completion and check for achievements

Auto Trait Implementations§

§

impl !Freeze for App

§

impl !RefUnwindSafe for App

§

impl !Send for App

§

impl !Sync for App

§

impl Unpin for App

§

impl !UnwindSafe for App

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> Downcast for T
where T: Any,

Source§

fn into_any(self: Box<T>) -> Box<dyn Any>

Convert Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>. Box<dyn Any> can then be further downcast into Box<ConcreteType> where ConcreteType implements Trait.
Source§

fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>

Convert Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be further downcast into Rc<ConcreteType> where ConcreteType implements Trait.
Source§

fn as_any(&self) -> &(dyn Any + 'static)

Convert &Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot generate &Any’s vtable from &Trait’s.
Source§

fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)

Convert &mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot generate &mut Any’s vtable from &mut Trait’s.
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, 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, 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<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