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 USER_MESSAGES: Vec<ColoredMessage> = vec![
139        ColoredMessage {
140            text: "๐Ÿš€ Launching commit rocket".to_string(),
141            color: METEOR_RED
142        },
143        ColoredMessage {
144            text: "๐ŸŒŸ Illuminating code cosmos".to_string(),
145            color: STARLIGHT
146        },
147        ColoredMessage {
148            text: "๐Ÿ”ญ Observing code constellations".to_string(),
149            color: CELESTIAL_BLUE
150        },
151        ColoredMessage {
152            text: "๐Ÿง™โ€โ™‚๏ธ Weaving code enchantments".to_string(),
153            color: GALAXY_PINK
154        },
155        ColoredMessage {
156            text: "โš›๏ธ Splitting code atoms".to_string(),
157            color: PLASMA_CYAN
158        },
159        ColoredMessage {
160            text: "๐ŸŒˆ Painting commit rainbows".to_string(),
161            color: AURORA_GREEN
162        },
163        ColoredMessage {
164            text: "๐Ÿ”‘ Unlocking git portals".to_string(),
165            color: SOLAR_YELLOW
166        },
167        ColoredMessage {
168            text: "๐ŸŽญ Staging code drama".to_string(),
169            color: COMET_ORANGE
170        },
171        ColoredMessage {
172            text: "๐ŸŒŒ Expanding code universe".to_string(),
173            color: NEBULA_PURPLE
174        },
175        ColoredMessage {
176            text: "๐Ÿน Aiming commit arrows".to_string(),
177            color: METEOR_RED
178        },
179        ColoredMessage {
180            text: "๐ŸŽจ Brushing commit strokes".to_string(),
181            color: PLASMA_CYAN
182        },
183        ColoredMessage {
184            text: "๐ŸŒฑ Growing code forests".to_string(),
185            color: AURORA_GREEN
186        },
187        ColoredMessage {
188            text: "๐Ÿงฉ Assembling code puzzle".to_string(),
189            color: GALAXY_PINK
190        },
191        ColoredMessage {
192            text: "๐ŸŽถ Orchestrating commit symphony".to_string(),
193            color: CELESTIAL_BLUE
194        },
195        ColoredMessage {
196            text: "โš–๏ธ Balancing code forces".to_string(),
197            color: SOLAR_YELLOW
198        },
199    ];
200}
201
202pub fn get_waiting_message() -> ColoredMessage {
203    let mut rng = rand::rng();
204    WAITING_MESSAGES
205        .choose(&mut rng)
206        .cloned()
207        .unwrap_or_else(|| ColoredMessage {
208            text: "Processing your request...".to_string(),
209            color: SOLAR_YELLOW,
210        })
211}
212
213pub fn get_user_message() -> ColoredMessage {
214    let mut rng = rand::rng();
215    USER_MESSAGES
216        .choose(&mut rng)
217        .cloned()
218        .unwrap_or_else(|| ColoredMessage {
219            text: "What would you like to do?".to_string(),
220            color: CELESTIAL_BLUE,
221        })
222}