Files
zesdex/src/app/mode/mod.rs
T
asepharyana c1ad206a00 feat: add lesson export and import functionality
- Implemented `LessonExport` and `LessonImport` actions in the action module.
- Added corresponding command parsing for lesson export and import.
- Created functions to handle lesson export and import in the memory module.
- Updated state management to reflect changes after lesson operations.
- Introduced deferred operations for handling asynchronous tasks in the event loop.
- Enhanced the tool execution context to include graduated checks for file operations.
- Added OAuth support with PKCE for secure authorization flows.
- Implemented a loopback server for handling OAuth redirects.
- Refactored various modules to improve code organization and maintainability.
2026-07-11 18:23:01 +07:00

92 lines
2.1 KiB
Rust

use serde::{Deserialize, Serialize};
#[expect(dead_code)]
pub mod agents;
#[expect(dead_code)]
pub mod bash;
#[expect(dead_code)]
pub mod editor;
#[expect(dead_code)]
pub mod effort;
#[expect(dead_code)]
pub mod help;
#[expect(dead_code)]
pub mod key_input;
#[expect(dead_code)]
pub mod loading;
#[expect(dead_code)]
pub mod mcp;
#[expect(dead_code)]
pub mod onboard;
#[expect(dead_code)]
pub mod onboard_provider;
#[expect(dead_code)]
pub mod picker;
#[expect(dead_code)]
pub mod quit_confirm;
#[expect(dead_code)]
pub mod rewind;
#[expect(dead_code)]
pub mod security;
#[expect(dead_code)]
pub mod session_hub;
#[expect(dead_code)]
pub mod settings;
#[expect(dead_code)]
pub mod todo;
#[expect(dead_code)]
pub mod workflow;
#[derive(Debug, Clone, Copy, PartialEq, Eq, Serialize, Deserialize)]
pub enum ModeKind {
Chat,
Agents,
Bash,
Workflow,
Help,
Settings,
SessionHub,
QuitConfirm,
Onboard,
OnboardProvider,
Picker,
KeyInput,
Editor,
Effort,
Mcp,
Security,
Todo,
Rewind,
Loading,
}
impl ModeKind {
pub fn name(&self) -> &'static str {
match self {
ModeKind::Chat => "Chat",
ModeKind::Agents => "Agents",
ModeKind::Bash => "Bash",
ModeKind::Workflow => "Workflow",
ModeKind::Help => "Help",
ModeKind::Settings => "Settings",
ModeKind::SessionHub => "SessionHub",
ModeKind::QuitConfirm => "QuitConfirm",
ModeKind::Onboard => "Onboard",
ModeKind::OnboardProvider => "OnboardProvider",
ModeKind::Picker => "Picker",
ModeKind::KeyInput => "KeyInput",
ModeKind::Editor => "Editor",
ModeKind::Effort => "Effort",
ModeKind::Mcp => "MCP",
ModeKind::Security => "Security",
ModeKind::Todo => "Todo",
ModeKind::Rewind => "Rewind",
ModeKind::Loading => "Loading",
}
}
pub fn is_overlay(self) -> bool {
!matches!(self, ModeKind::Chat | ModeKind::Agents | ModeKind::Bash | ModeKind::Workflow)
}
}