darwincode 1.9.101

The open source terminal AI coding agent
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
use crate::app::core::{App, SubmitAction};

pub fn run(app: &mut App) -> Option<SubmitAction> {
    app.begin_load_chat_models().map(SubmitAction::LoadModels)
}

#[cfg(test)]
mod tests {
    use super::*;
    use crate::config::StoredConfig;

    #[test]
    fn test_models_run() {
        let mut app = App::new(Some(StoredConfig::default()));
        let action = run(&mut app);
        assert!(action.is_some());
    }
}