Skip to content

Commit

Permalink
Exits properly in colab
Browse files Browse the repository at this point in the history
  • Loading branch information
KillianLucas committed Oct 12, 2023
1 parent 42a6905 commit 771274f
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions interpreter/terminal_interface/terminal_interface.py
Original file line number Diff line number Diff line change
Expand Up @@ -163,8 +163,13 @@ def terminal_interface(interpreter, message):
break

except KeyboardInterrupt:
# Exit gracefully (this cancels LLM, returns to the interactive "> " input)
# Exit gracefully
if active_block:
active_block.end()
active_block = None
continue

if interactive:
# (this cancels LLM, returns to the interactive "> " input)
continue
else:
break

0 comments on commit 771274f

Please sign in to comment.