mirror of
https://github.com/Aider-AI/aider.git
synced 2025-06-01 02:05:00 +00:00
feat: Add --notifications flag to control terminal bell
This commit is contained in:
parent
665ffe3984
commit
2fe1b1e16e
2 changed files with 9 additions and 1 deletions
|
@ -236,6 +236,7 @@ class InputOutput:
|
|||
file_watcher=None,
|
||||
multiline_mode=False,
|
||||
root=".",
|
||||
notifications=False,
|
||||
):
|
||||
self.placeholder = None
|
||||
self.interrupted = False
|
||||
|
@ -243,6 +244,7 @@ class InputOutput:
|
|||
self.editingmode = editingmode
|
||||
self.multiline_mode = multiline_mode
|
||||
self.bell_on_next_input = False
|
||||
self.notifications = notifications
|
||||
no_color = os.environ.get("NO_COLOR")
|
||||
if no_color is not None and no_color != "":
|
||||
pretty = False
|
||||
|
@ -951,7 +953,7 @@ class InputOutput:
|
|||
|
||||
def ring_bell(self):
|
||||
"""Ring the terminal bell if needed and clear the flag"""
|
||||
if self.bell_on_next_input:
|
||||
if self.bell_on_next_input and self.notifications:
|
||||
print("\a", end="", flush=True) # Ring the bell
|
||||
self.bell_on_next_input = False # Clear the flag
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue