1use crate::ui::{
2 AURORA_GREEN, CELESTIAL_BLUE, COMET_ORANGE, GALAXY_PINK, METEOR_RED, NEBULA_PURPLE,
3 PLASMA_CYAN, SOLAR_YELLOW, STARLIGHT,
4};
5use lazy_static::lazy_static;
6use rand::prelude::*;
7use ratatui::style::Color;
8
9#[derive(Clone)]
10pub struct ColoredMessage {
11 pub text: String,
12 pub color: Color,
13}
14
15lazy_static! {
16 static ref WAITING_MESSAGES: Vec<ColoredMessage> = vec![
17 ColoredMessage {
18 text: "๐ฎ Consulting the cosmic commit oracle...".to_string(),
19 color: NEBULA_PURPLE
20 },
21 ColoredMessage {
22 text: "๐ Aligning the celestial code spheres...".to_string(),
23 color: CELESTIAL_BLUE
24 },
25 ColoredMessage {
26 text: "๐ป Channeling the spirit of clean commits...".to_string(),
27 color: AURORA_GREEN
28 },
29 ColoredMessage {
30 text: "๐ Launching commit ideas into the coding cosmos...".to_string(),
31 color: METEOR_RED
32 },
33 ColoredMessage {
34 text: "๐ Exploring the galaxy of potential messages...".to_string(),
35 color: PLASMA_CYAN
36 },
37 ColoredMessage {
38 text: "๐ญ Peering into the commit-verse for inspiration...".to_string(),
39 color: SOLAR_YELLOW
40 },
41 ColoredMessage {
42 text: "๐ง Casting a spell for the perfect commit message...".to_string(),
43 color: GALAXY_PINK
44 },
45 ColoredMessage {
46 text: "โจ Harnessing the power of a thousand code stars...".to_string(),
47 color: STARLIGHT
48 },
49 ColoredMessage {
50 text: "๐ช Orbiting the planet of precise git descriptions...".to_string(),
51 color: CELESTIAL_BLUE
52 },
53 ColoredMessage {
54 text: "๐จ Weaving a tapestry of colorful commit prose...".to_string(),
55 color: PLASMA_CYAN
56 },
57 ColoredMessage {
58 text: "๐ Igniting the fireworks of code brilliance...".to_string(),
59 color: COMET_ORANGE
60 },
61 ColoredMessage {
62 text: "๐ง Syncing with the collective coding consciousness...".to_string(),
63 color: AURORA_GREEN
64 },
65 ColoredMessage {
66 text: "๐ Aligning the moon phases for optimal commit clarity...".to_string(),
67 color: STARLIGHT
68 },
69 ColoredMessage {
70 text: "๐ฌ Analyzing code particles at the quantum level...".to_string(),
71 color: NEBULA_PURPLE
72 },
73 ColoredMessage {
74 text: "๐งฌ Decoding the DNA of your changes...".to_string(),
75 color: GALAXY_PINK
76 },
77 ColoredMessage {
78 text: "๐บ Summoning the ancient spirits of version control...".to_string(),
79 color: METEOR_RED
80 },
81 ColoredMessage {
82 text: "๐ก Tuning into the frequency of flawless commits...".to_string(),
83 color: CELESTIAL_BLUE
84 },
85 ColoredMessage {
86 text: "๐ Charging the commit crystals with cosmic energy...".to_string(),
87 color: PLASMA_CYAN
88 },
89 ColoredMessage {
90 text: "๐ Translating your changes into universal code...".to_string(),
91 color: AURORA_GREEN
92 },
93 ColoredMessage {
94 text: "๐งช Distilling the essence of your modifications...".to_string(),
95 color: SOLAR_YELLOW
96 },
97 ColoredMessage {
98 text: "๐ธ๏ธ Unraveling the threads of your code tapestry...".to_string(),
99 color: NEBULA_PURPLE
100 },
101 ColoredMessage {
102 text: "๐ฆ Consulting the all-knowing git guardians...".to_string(),
103 color: CELESTIAL_BLUE
104 },
105 ColoredMessage {
106 text: "๐ต Harmonizing with the rhythms of the coding universe...".to_string(),
107 color: GALAXY_PINK
108 },
109 ColoredMessage {
110 text: "๐ Diving into the depths of the code ocean...".to_string(),
111 color: PLASMA_CYAN
112 },
113 ColoredMessage {
114 text: "๐ง Seeking wisdom from the repository sages...".to_string(),
115 color: AURORA_GREEN
116 },
117 ColoredMessage {
118 text: "๐งญ Calibrating the commit compass for true north...".to_string(),
119 color: SOLAR_YELLOW
120 },
121 ColoredMessage {
122 text: "๐ Unlocking the secrets of the commit constellations...".to_string(),
123 color: NEBULA_PURPLE
124 },
125 ColoredMessage {
126 text: "โญ Gathering stardust for your stellar commit...".to_string(),
127 color: STARLIGHT
128 },
129 ColoredMessage {
130 text: "๐ Focusing the lens of the code telescope...".to_string(),
131 color: CELESTIAL_BLUE
132 },
133 ColoredMessage {
134 text: "๐ Riding the waves of inspiration through the code cosmos...".to_string(),
135 color: PLASMA_CYAN
136 },
137 ];
138 static ref REVIEW_WAITING_MESSAGES: Vec<ColoredMessage> = vec![
139 ColoredMessage {
140 text: "๐ Scanning code dimensions for quality signatures...".to_string(),
141 color: NEBULA_PURPLE
142 },
143 ColoredMessage {
144 text: "๐ Traversing the architecture cosmos for patterns...".to_string(),
145 color: CELESTIAL_BLUE
146 },
147 ColoredMessage {
148 text: "๐ก๏ธ Invoking the guardians of code integrity...".to_string(),
149 color: AURORA_GREEN
150 },
151 ColoredMessage {
152 text: "โจ Illuminating shadow bugs with code starlight...".to_string(),
153 color: STARLIGHT
154 },
155 ColoredMessage {
156 text: "๐ฎ Gazing into the crystal orb of future maintainability...".to_string(),
157 color: PLASMA_CYAN
158 },
159 ColoredMessage {
160 text: "๐ Unrolling the ancient scrolls of best practices...".to_string(),
161 color: SOLAR_YELLOW
162 },
163 ColoredMessage {
164 text: "๐งช Distilling your code into its purest essence...".to_string(),
165 color: GALAXY_PINK
166 },
167 ColoredMessage {
168 text: "โ๏ธ Weighing your code on the scales of elegance...".to_string(),
169 color: CELESTIAL_BLUE
170 },
171 ColoredMessage {
172 text: "๐ Tracing the rainbow paths between your functions...".to_string(),
173 color: AURORA_GREEN
174 },
175 ColoredMessage {
176 text: "๐ Magnifying the subtle harmonies in your algorithms...".to_string(),
177 color: NEBULA_PURPLE
178 },
179 ColoredMessage {
180 text: "๐ง Communing with the collective wisdom of master coders...".to_string(),
181 color: METEOR_RED
182 },
183 ColoredMessage {
184 text: "๐ Diving into the depths of your code ocean...".to_string(),
185 color: PLASMA_CYAN
186 },
187 ColoredMessage {
188 text: "๐ฟ Consulting the monoliths of software architecture...".to_string(),
189 color: COMET_ORANGE
190 },
191 ColoredMessage {
192 text: "โณ Sifting through the time sands of execution paths...".to_string(),
193 color: SOLAR_YELLOW
194 },
195 ColoredMessage {
196 text: "๐งฉ Assembling the puzzle pieces of your code story...".to_string(),
197 color: GALAXY_PINK
198 },
199 ColoredMessage {
200 text: "๐ฌ Analyzing code particles at quantum precision...".to_string(),
201 color: CELESTIAL_BLUE
202 },
203 ColoredMessage {
204 text: "๐ Measuring the brightness of your code stars...".to_string(),
205 color: STARLIGHT
206 },
207 ColoredMessage {
208 text: "๐งต Following the threads of logic throughout your tapestry...".to_string(),
209 color: AURORA_GREEN
210 },
211 ColoredMessage {
212 text: "๐ฑ Summoning the trident of code quality dimensions...".to_string(),
213 color: NEBULA_PURPLE
214 },
215 ColoredMessage {
216 text: "๐ Spiraling through nested layers of abstraction...".to_string(),
217 color: PLASMA_CYAN
218 },
219 ColoredMessage {
220 text: "๐บ Examining the ancient artifacts of your repository...".to_string(),
221 color: METEOR_RED
222 },
223 ColoredMessage {
224 text: "๐ญ Unmasking the hidden characters in your code drama...".to_string(),
225 color: GALAXY_PINK
226 },
227 ColoredMessage {
228 text: "๐งฟ Warding off evil bugs with protective insights...".to_string(),
229 color: CELESTIAL_BLUE
230 },
231 ColoredMessage {
232 text: "๐ฅ Forging stronger code in the flames of analysis...".to_string(),
233 color: COMET_ORANGE
234 },
235 ColoredMessage {
236 text: "๐ฑ Nurturing the seeds of excellence in your codebase...".to_string(),
237 color: AURORA_GREEN
238 },
239 ColoredMessage {
240 text: "๐ฏ Pinpointing opportunities for cosmic refinement...".to_string(),
241 color: SOLAR_YELLOW
242 },
243 ColoredMessage {
244 text: "๐ธ๏ธ Mapping the intricate web of dependencies...".to_string(),
245 color: NEBULA_PURPLE
246 },
247 ColoredMessage {
248 text: "๐ง Calibrating the tools of code enlightenment...".to_string(),
249 color: PLASMA_CYAN
250 },
251 ColoredMessage {
252 text: "๐งฎ Computing the algorithms of optimal elegance...".to_string(),
253 color: STARLIGHT
254 },
255 ColoredMessage {
256 text: "๐ Charting the trajectory of your code evolution...".to_string(),
257 color: CELESTIAL_BLUE
258 },
259 ];
260 static ref USER_MESSAGES: Vec<ColoredMessage> = vec![
261 ColoredMessage {
262 text: "๐ Launching commit rocket".to_string(),
263 color: METEOR_RED
264 },
265 ColoredMessage {
266 text: "๐ Illuminating code cosmos".to_string(),
267 color: STARLIGHT
268 },
269 ColoredMessage {
270 text: "๐ญ Observing code constellations".to_string(),
271 color: CELESTIAL_BLUE
272 },
273 ColoredMessage {
274 text: "๐งโโ๏ธ Weaving code enchantments".to_string(),
275 color: GALAXY_PINK
276 },
277 ColoredMessage {
278 text: "โ๏ธ Splitting code atoms".to_string(),
279 color: PLASMA_CYAN
280 },
281 ColoredMessage {
282 text: "๐ Painting commit rainbows".to_string(),
283 color: AURORA_GREEN
284 },
285 ColoredMessage {
286 text: "๐ Unlocking git portals".to_string(),
287 color: SOLAR_YELLOW
288 },
289 ColoredMessage {
290 text: "๐ญ Staging code drama".to_string(),
291 color: COMET_ORANGE
292 },
293 ColoredMessage {
294 text: "๐ Expanding code universe".to_string(),
295 color: NEBULA_PURPLE
296 },
297 ColoredMessage {
298 text: "๐น Aiming commit arrows".to_string(),
299 color: METEOR_RED
300 },
301 ColoredMessage {
302 text: "๐จ Brushing commit strokes".to_string(),
303 color: PLASMA_CYAN
304 },
305 ColoredMessage {
306 text: "๐ฑ Growing code forests".to_string(),
307 color: AURORA_GREEN
308 },
309 ColoredMessage {
310 text: "๐งฉ Assembling code puzzle".to_string(),
311 color: GALAXY_PINK
312 },
313 ColoredMessage {
314 text: "๐ถ Orchestrating commit symphony".to_string(),
315 color: CELESTIAL_BLUE
316 },
317 ColoredMessage {
318 text: "โ๏ธ Balancing code forces".to_string(),
319 color: SOLAR_YELLOW
320 },
321 ];
322}
323
324pub fn get_waiting_message() -> ColoredMessage {
325 let mut rng = rand::rng();
326 WAITING_MESSAGES
327 .choose(&mut rng)
328 .cloned()
329 .unwrap_or_else(|| ColoredMessage {
330 text: "Processing your request...".to_string(),
331 color: SOLAR_YELLOW,
332 })
333}
334
335pub fn get_review_waiting_message() -> ColoredMessage {
336 let mut rng = rand::rng();
337 REVIEW_WAITING_MESSAGES
338 .choose(&mut rng)
339 .cloned()
340 .unwrap_or_else(|| ColoredMessage {
341 text: "Analyzing your code quality...".to_string(),
342 color: NEBULA_PURPLE,
343 })
344}
345
346pub fn get_user_message() -> ColoredMessage {
347 let mut rng = rand::rng();
348 USER_MESSAGES
349 .choose(&mut rng)
350 .cloned()
351 .unwrap_or_else(|| ColoredMessage {
352 text: "What would you like to do?".to_string(),
353 color: CELESTIAL_BLUE,
354 })
355}