diff --git a/aider/coders/base_coder.py b/aider/coders/base_coder.py index e7dc988d8..646f0e64b 100755 --- a/aider/coders/base_coder.py +++ b/aider/coders/base_coder.py @@ -885,6 +885,7 @@ class Coder: thresh = 2 # seconds if self.last_keyboard_interrupt and now - self.last_keyboard_interrupt < thresh: self.io.tool_warning("\n\n^C KeyboardInterrupt") + self.event("exit", reason="Control-C") sys.exit() self.io.tool_warning("\n\n^C again to exit") diff --git a/aider/commands.py b/aider/commands.py index fdb6ea4b8..a06a9ba2c 100644 --- a/aider/commands.py +++ b/aider/commands.py @@ -909,6 +909,7 @@ class Commands: def cmd_exit(self, args): "Exit the application" + self.coder.event("exit", reason="/exit") sys.exit() def cmd_quit(self, args): @@ -1085,7 +1086,9 @@ class Commands: self.io.tool_error("To use /voice you must provide an OpenAI API key.") return try: - self.voice = voice.Voice(audio_format=self.args.voice_format, device_name=self.args.voice_input_device) + self.voice = voice.Voice( + audio_format=self.args.voice_format, device_name=self.args.voice_input_device + ) except voice.SoundDeviceError: self.io.tool_error( "Unable to import `sounddevice` and/or `soundfile`, is portaudio installed?"