1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
//! Transcript data model types for the Recursive TUI.
//!
//! Contains the screen enum and the types used to represent rendered
//! transcript blocks (user messages, assistant replies, tool calls/results,
//! diffs, etc.).
// ──────────────────────────────────────────────────────────────────────
// Screens
// ──────────────────────────────────────────────────────────────────────
/// Which top-level screen is currently rendered.
///
/// Goal 147 removed the `PlanReview` variant — the plan-mode
/// confirmation now lives on the modal stack as
/// [`crate::tui::ui::modal::Modal::PlanReview`], so we are down to one
/// screen: the chat surface. The splash screen was replaced by a
/// startup banner printed to stdout before the inline TUI starts.
// ──────────────────────────────────────────────────────────────────────
// Transcript model
// ──────────────────────────────────────────────────────────────────────
/// One unit of context within a [`Diff`] block.
///
/// We model only the three line kinds we need to colour-code: addition,
/// removal, and unchanged context.
/// A single line inside a diff hunk.
/// A grouped sequence of diff lines belonging to one logical change.
/// Result payload of a tool execution. Lives inside a
/// [`TranscriptBlock::ToolCall`] once the runtime delivers the
/// matching `UiEvent::ToolResult`.
///
/// The UI used to keep `ToolCall` and `ToolResult` as two separate
/// blocks, but Claude-Code-style renderings pair them into a single
/// "function call" unit: one bullet, then the result on the next
/// line. `None` on the call side means the tool is still running.
/// One renderable transcript block.
///
/// The chat screen renders a `Vec<TranscriptBlock>` in order, with one
/// blank line between adjacent blocks. Each variant has a corresponding
/// renderer in [`crate::tui::ui::transcript`].