Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Refactor commands and websocket messages #9

Merged
merged 14 commits into from
Jan 2, 2025
3 changes: 3 additions & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,9 @@ serde = { version = "1.0.217", features = ["derive"] }
serde_yaml = "0.9.34"
chrono = "0.4.39"
actix-codec = "0.5.2"
serde_json = "1.0.134"
async-trait = "0.1.83"
crossterm = "0.28.1"


[dependencies.uuid]
Expand Down
100 changes: 100 additions & 0 deletions assets/data/random_messages.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,100 @@
Hey, are you coming to the party tonight?
Did you finish the homework for math class?
OMG, you won’t believe what just happened!
Can you call me when you’re free?
Running late, sorry! Be there in 10 mins.
What time are we meeting tomorrow?
I’m outside your house. Open the door.
Don’t forget to bring the charger!
Do you want to grab lunch later?
Happy Birthday! Hope you have an amazing day.
I just saw the funniest video. Sending it now!
Where did you leave the keys?
Stuck in traffic. Might take a while.
Can you pick up some milk on your way home?
Have you heard from Sarah lately?
I’m so bored. Entertain me!
Guess what? I got the job!
We need to talk.
That’s hilarious! I can’t stop laughing.
Let’s meet at the park at 5?
I’ll call you in a bit.
Ugh, today has been so exhausting.
What’s the plan for tonight?
Can’t wait to see you later!
Are you free this weekend?
I’m at the store, do you need anything?
Don’t forget your appointment at 3 PM.
I’ll send you the address now.
Just landed! I’ll text you when I get my bags.
Can you believe it’s already December?
I’m heading out now. See you soon!
Let me know when you’re ready.
Do you want to watch a movie tonight?
The weather is perfect today.
I’m starving. What’s for dinner?
That’s such a great idea!
Don’t worry about it. I’ve got it covered.
Can we reschedule our meeting?
You’re the best. Thanks!
Let’s grab coffee tomorrow morning.
Feeling really grateful today. Thanks for being you.
I’m stuck in a meeting. I’ll call after.
Do you know where my headphones are?
Why didn’t you tell me earlier?
You’re amazing. Just thought you should know.
Let’s make plans for next month.
I just saw your email. I’ll reply soon.
Are you still awake?
What do you think about this?
I can’t believe it’s already Friday.
Let’s go for a walk later.
Don’t forget to feed the cat.
Feeling really nervous about the presentation.
Call me ASAP.
I’m so excited for our trip next week!
Do you have the WiFi password?
Can you remind me what time the meeting is?
I love this song. Have you heard it?
I’m here. Where are you?
Thank you for everything. Really appreciate it.
The view from here is incredible!
Can you believe how cold it is today?
I just woke up. What did I miss?
Let’s cook dinner together tonight.
Got some good news! Can’t wait to share.
I’m heading to the gym now.
Do you need a ride?
Thanks for the recommendation. It was perfect!
I think I’m getting a cold.
Don’t forget to text me when you arrive.
We should do this more often.
Can you believe what she said?
I’m so proud of you.
Let’s FaceTime later?
What’s your ETA?
I’m at the usual spot. Waiting for you.
What’s for breakfast?
I’m not feeling great today.
Let’s grab tickets before they sell out.
I’ll bring dessert tonight.
Why is this so complicated?
Do you want to split the bill?
What’s the best time to call?
Just finished the book. It was amazing!
Do you have a moment to talk?
I’ll update you once I know more.
The sunset is beautiful today.
Don’t stay up too late.
Let me know if you need help with anything.
I’m at the airport. Flight got delayed.
Do you want to carpool tomorrow?
It’s been a while. Let’s catch up soon.
Thanks for being patient with me.
This reminds me of you.
What’s the next step?
The kids are asleep. Finally some quiet time.
I’m sending you a calendar invite now.
Let’s celebrate this weekend.
Miss you. Hope to see you soon.
That’s all for now. Let’s talk later!
23 changes: 23 additions & 0 deletions scripts/client_simulation.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
#!/bin/bash

# Run cargo build
cargo build
if [ $? -ne 0 ]; then
echo "Cargo build failed. Exiting."
exit 1
fi

# Start the client and redirect stdin
./target/debug/client -c client.yml &
CLIENT_PID=$!

# Allow the client to initialize
sleep 400

# Interact with the client via stdin
{
echo "/name User$(date +%s)" # Set a unique name based on timestamp
echo "/join commonchat" # Join the commonchat
} > /proc/$CLIENT_PID/fd/0

exit 1
2 changes: 1 addition & 1 deletion src/client/main.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
use rustic_reach::{
client::{
runtime::connect,
config::{parse_client_config, ClientConfig},
runtime::connect,
},
utils::constants::{
COMMAND_LINE_SYMBOL, DEFAULT_SERVER_PORT, ERROR_LOG, INFO_LOG, WARNING_LOG,
Expand Down
2 changes: 1 addition & 1 deletion src/client/mod.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
pub mod runtime;
pub mod config;
pub mod runtime;
pub mod state;
Loading
Loading