git_iris/
messages.rs

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}