use serde::{Deserialize, Serialize};
#[derive(Debug, Clone, Default, Serialize, Deserialize)]
pub struct RenderConfig {
#[serde(skip_serializing_if = "Option::is_none")]
pub title: Option<String>,
#[serde(skip_serializing_if = "Option::is_none")]
pub theme: Option<String>,
#[serde(default, skip_serializing_if = "Vec::is_empty")]
pub sections: Vec<RenderSection>,
#[serde(default = "default_true")]
pub generate_preview: bool,
}
fn default_true() -> bool {
true
}
#[derive(Debug, Clone, Serialize, Deserialize)]
pub struct RenderSection {
pub id: String,
pub label: String,
#[serde(default = "default_true")]
pub visible: bool,
}
impl RenderConfig {
pub fn default_sections() -> Vec<RenderSection> {
vec![
RenderSection {
id: "summary".into(),
label: "Session Summary".into(),
visible: true,
},
RenderSection {
id: "participants".into(),
label: "Participant Strip".into(),
visible: true,
},
RenderSection {
id: "agent_graph".into(),
label: "Delegation & Collaboration Graph".into(),
visible: true,
},
RenderSection {
id: "timeline".into(),
label: "Mission Timeline".into(),
visible: true,
},
RenderSection {
id: "side_effects".into(),
label: "Side-Effect Ledger".into(),
visible: true,
},
RenderSection {
id: "proofs".into(),
label: "Proofs Panel".into(),
visible: true,
},
]
}
}