treeship_core/session/
render.rs1use serde::{Deserialize, Serialize};
7
8#[derive(Debug, Clone, Default, Serialize, Deserialize)]
10pub struct RenderConfig {
11 #[serde(skip_serializing_if = "Option::is_none")]
13 pub title: Option<String>,
14
15 #[serde(skip_serializing_if = "Option::is_none")]
17 pub theme: Option<String>,
18
19 #[serde(default, skip_serializing_if = "Vec::is_empty")]
21 pub sections: Vec<RenderSection>,
22
23 #[serde(default = "default_true")]
25 pub generate_preview: bool,
26}
27
28fn default_true() -> bool { true }
29
30#[derive(Debug, Clone, Serialize, Deserialize)]
32pub struct RenderSection {
33 pub id: String,
35
36 pub label: String,
38
39 #[serde(default = "default_true")]
41 pub visible: bool,
42}
43
44impl RenderConfig {
45 pub fn default_sections() -> Vec<RenderSection> {
47 vec![
48 RenderSection { id: "summary".into(), label: "Session Summary".into(), visible: true },
49 RenderSection { id: "participants".into(), label: "Participant Strip".into(), visible: true },
50 RenderSection { id: "agent_graph".into(), label: "Delegation & Collaboration Graph".into(), visible: true },
51 RenderSection { id: "timeline".into(), label: "Mission Timeline".into(), visible: true },
52 RenderSection { id: "side_effects".into(), label: "Side-Effect Ledger".into(), visible: true },
53 RenderSection { id: "proofs".into(), label: "Proofs Panel".into(), visible: true },
54 ]
55 }
56}