TheR1D / shell_gpt

A command-line productivity tool powered by AI large language models like GPT-4, will help you accomplish your tasks faster and more efficiently.
MIT License
8.84k stars 696 forks source link

Implement Ctrl-C (SIGINT) Handling for Graceful Interruption of Streaming #478

Open ryanfreckleton opened 4 months ago

ryanfreckleton commented 4 months ago

WHen the AI is actively generating output (streaming mode) with --repl, it would be nice if pressing -C would cancel streaming, allowing me to interact with the AI to correct what it's doing.

When there is not an active stream, -C should continue to exit the REPL.