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 {
29 true
30}
31
32#[derive(Debug, Clone, Serialize, Deserialize)]
34pub struct RenderSection {
35 pub id: String,
37
38 pub label: String,
40
41 #[serde(default = "default_true")]
43 pub visible: bool,
44}
45
46impl RenderConfig {
47 pub fn default_sections() -> Vec<RenderSection> {
49 vec![
50 RenderSection {
51 id: "summary".into(),
52 label: "Session Summary".into(),
53 visible: true,
54 },
55 RenderSection {
56 id: "participants".into(),
57 label: "Participant Strip".into(),
58 visible: true,
59 },
60 RenderSection {
61 id: "agent_graph".into(),
62 label: "Delegation & Collaboration Graph".into(),
63 visible: true,
64 },
65 RenderSection {
66 id: "timeline".into(),
67 label: "Mission Timeline".into(),
68 visible: true,
69 },
70 RenderSection {
71 id: "side_effects".into(),
72 label: "Side-Effect Ledger".into(),
73 visible: true,
74 },
75 RenderSection {
76 id: "proofs".into(),
77 label: "Proofs Panel".into(),
78 visible: true,
79 },
80 ]
81 }
82}