Skip to repository content

tenant.openagents/omega

No repository description is available.

OpenAgents Git authority 2026-07-28T06:56:24.940Z Public web read
NIP-34 coordinate30617:7649603503856e5148d571eac2766b288a8ff1e9e35d380337a1d2b0015b4f92:omega
MaintainersHidden in public view
References2 branches · 1 tag
Read-only clonegit clone https://openagents.com/git/tenant.openagents/omega.git
Browse files

settings.rs

30 lines · 724 B · rust
1use anyhow::Result;
2use serde_json::Value;
3
4pub fn restructure_profiles_with_settings_key(value: &mut Value) -> Result<()> {
5    let Some(root_object) = value.as_object_mut() else {
6        return Ok(());
7    };
8
9    let Some(profiles) = root_object.get_mut("profiles") else {
10        return Ok(());
11    };
12
13    let Some(profiles_map) = profiles.as_object_mut() else {
14        return Ok(());
15    };
16
17    for profile_value in profiles_map.values_mut() {
18        if profile_value
19            .as_object()
20            .is_some_and(|m| m.contains_key("settings") || m.contains_key("base"))
21        {
22            continue;
23        }
24
25        *profile_value = serde_json::json!({ "settings": profile_value });
26    }
27
28    Ok(())
29}
30
Served at tenant.openagents/omega Member data and write actions are omitted.