mirror of
https://github.com/Aider-AI/aider.git
synced 2025-06-02 02:34:59 +00:00
feat: add exit event tracking for Control-C and /exit commands
This commit is contained in:
parent
c1c4193b1d
commit
295040c94c
2 changed files with 5 additions and 1 deletions
|
@ -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")
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue