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.
This commit is contained in:
@@ -1,8 +1,10 @@
|
||||
use crossterm::event::{KeyCode, KeyEvent, KeyModifiers};
|
||||
|
||||
use crate::app::runtime::actions::Action;
|
||||
use crate::app::runtime::commands::apply_command;
|
||||
use crate::app::state::rest::AppStateRest;
|
||||
use crate::app::state::types::Overlay;
|
||||
use crate::controller::command::parse_command;
|
||||
|
||||
pub fn handle_key(key: KeyEvent, state: &AppStateRest) -> Vec<Action> {
|
||||
match key.code {
|
||||
@@ -18,7 +20,7 @@ pub fn handle_key(key: KeyEvent, state: &AppStateRest) -> Vec<Action> {
|
||||
}
|
||||
let text = state.input.buffer.clone();
|
||||
if text.starts_with('/') {
|
||||
return Vec::new();
|
||||
return apply_command(parse_command(&text));
|
||||
}
|
||||
vec![Action::SubmitInput(text)]
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user