magi-code 0.62.0

Repository-aware CLI coding agent for terminal work
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
use crate::sessions::{Session, SessionEventKind, record_session_event};
use anyhow::Result;
use serde_json::json;
use std::path::Path;

pub(super) fn record_error(session: Option<&Session>, cwd: &Path, message: &str) -> Result<()> {
    record_session_event(
        session,
        cwd,
        SessionEventKind::Diagnostic,
        json!({"level":"error", "message": message}),
    )
    .map(|_| ())
}