feat: implement interactive lesson management and update command handling

This commit is contained in:
asepharyana
2026-07-13 02:53:30 +07:00
parent ab8b098a57
commit dc0f1c7647
10 changed files with 288 additions and 209 deletions
+3 -21
View File
@@ -21,29 +21,11 @@ pub fn apply_command(command: Command) -> Vec<Action> {
Command::Quit => {
vec![Action::QuitConfirm]
}
Command::LessonCreate(text) => {
vec![Action::SystemNote {
kind: "lesson".to_string(),
message: format!("/lesson {}", text),
}]
}
Command::LessonExport(path) => {
vec![Action::LessonExport { path }]
}
Command::LessonImport(path) => {
vec![Action::LessonImport { path }]
}
Command::LessonList => {
Command::LessonInteractive => {
vec![Action::OpenOverlay(Overlay::Learning)]
}
Command::LessonAccept(name) => {
vec![Action::LessonAccept { name }]
}
Command::LessonReject(name) => {
vec![Action::LessonReject { name }]
}
Command::Mode(mode) => {
vec![Action::SwitchMode(mode)]
Command::McpOpen => {
vec![Action::OpenOverlay(Overlay::Mcp)]
}
Command::ClearConfirm => {
vec![Action::OpenOverlay(Overlay::ClearConfirm)]