eclaw 0.0.12

Personal AI assistant powered by Elph
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
use elph_agent::write_json_file;

use super::InitError;
use super::paths::Paths;

pub struct TrustStore;

impl TrustStore {
    pub fn ensure(paths: &Paths) -> Result<(), InitError> {
        let path = paths.trust_path();
        if path.exists() {
            return Ok(());
        }

        write_json_file(&path, &serde_json::json!({}))?;
        Ok(())
    }
}