Skip to repository content

tenant.openagents/omega

No repository description is available.

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

markdown_preview_settings.rs

23 lines · 731 B · rust
1use gpui::{Pixels, px};
2use settings::{RegisterSetting, Settings};
3
4/// The settings for the markdown preview.
5#[derive(Clone, Copy, Debug, Default, RegisterSetting)]
6pub struct MarkdownPreviewSettings {
7    /// The maximum width of the rendered markdown content, or `None` to render
8    /// content edge to edge.
9    pub max_width: Option<Pixels>,
10}
11
12impl Settings for MarkdownPreviewSettings {
13    fn from_settings(content: &settings::SettingsContent) -> Self {
14        let content = content.markdown_preview.clone().unwrap_or_default();
15        let max_width = if content.limit_content_width.unwrap_or(true) {
16            content.max_width.map(px)
17        } else {
18            None
19        };
20        Self { max_width }
21    }
22}
23
Served at tenant.openagents/omega Member data and write actions are omitted.