lazytask 0.5.0

A task manager built for AI coding agents — plain markdown files, strict CLI, keyboard-driven TUI
Documentation
mod dispatch;
mod input;
mod state;

use crate::services::TaskService;

pub use state::{AppState, CreateState, EditorMode, LogEntry, Mode};

pub(super) const LOG_CAPACITY: usize = 30;

pub struct App {
    pub(super) service: TaskService,
    pub(super) learn_threshold: usize,
    pub state: AppState,
}

impl App {
    /// Creates app state with empty task data and normal interaction mode.
    pub fn new(service: TaskService, learn_threshold: usize) -> Self {
        let limits = service.config.limits;
        Self {
            service,
            learn_threshold,
            state: AppState {
                tasks: Vec::new(),
                selected_index: 0,
                preview_text: "No tasks".to_string(),
                log_entries: std::collections::VecDeque::new(),
                last_deleted: None,
                mode: Mode::Normal,
                should_quit: false,
                limits,
            },
        }
    }
}