elph 0.0.11

Minimalist AI agent companion for coding
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
use crate::runtime::{self, EXIT_INTERRUPTED, EXIT_SUCCESS, ExitCode};

/// Launch the TUI (default, no subcommand).
pub fn handle() -> ExitCode {
    runtime::run();

    use std::sync::atomic::Ordering;
    if runtime::WAS_INTERRUPTED.load(Ordering::Relaxed) {
        #[cfg(unix)]
        if runtime::SHOULD_KILL_PARENT.load(Ordering::Relaxed) {
            runtime::kill_parent();
        }
        return EXIT_INTERRUPTED;
    }

    EXIT_SUCCESS
}