Skip to repository content

tenant.openagents/omega

No repository description is available.

OpenAgents Git authority 2026-07-28T04:03:56.231Z 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

zlog_settings.rs

31 lines · 834 B · rust
1//! # zlog_settings
2use collections::HashMap;
3
4use gpui::App;
5use settings::{RegisterSetting, Settings, SettingsStore};
6
7pub fn init(cx: &mut App) {
8    cx.observe_global::<SettingsStore>(|cx| {
9        let zlog_settings = ZlogSettings::get_global(cx);
10        zlog::filter::refresh_from_settings(&zlog_settings.scopes);
11    })
12    .detach();
13}
14
15#[derive(Clone, Debug, RegisterSetting)]
16pub struct ZlogSettings {
17    /// A map of log scopes to the desired log level.
18    /// Useful for filtering out noisy logs or enabling more verbose logging.
19    ///
20    /// Example: {"log": {"client": "warn"}}
21    pub scopes: HashMap<String, String>,
22}
23
24impl Settings for ZlogSettings {
25    fn from_settings(content: &settings::SettingsContent) -> Self {
26        ZlogSettings {
27            scopes: content.log.clone().unwrap(),
28        }
29    }
30}
31
Served at tenant.openagents/omega Member data and write actions are omitted.