laramux 1.3.0

A TUI application for managing Laravel development processes
#![allow(dead_code)]

use crossterm::event::KeyEvent;

use crate::app::SystemStats;
use crate::log::LogEntry;
use crate::process::types::ProcessId;

/// Events that can occur in the application
#[derive(Debug, Clone)]
pub enum Event {
    /// Keyboard input from the user
    Input(KeyEvent),

    /// Output line from a managed process
    ProcessOutput {
        id: ProcessId,
        line: String,
        is_stderr: bool,
    },

    /// A managed process has exited
    ProcessExited {
        id: ProcessId,
        exit_code: Option<i32>,
    },

    /// Request to auto-restart a process (after backoff delay)
    ProcessAutoRestart { id: ProcessId },

    /// New content from log files
    LogUpdate(Vec<LogEntry>),

    /// Terminal resize event
    Resize(u16, u16),

    /// Tick event for periodic updates
    Tick,

    /// Output from a command runner (Commands tab)
    CommandOutput { line: String, is_stderr: bool },

    /// A command has exited
    CommandExited { exit_code: Option<i32> },

    /// System stats update
    SystemStatsUpdate(SystemStats),
}