mirror of
https://github.com/Aider-AI/aider.git
synced 2025-06-03 03:05:00 +00:00
fix: handle file watcher operations only when it exists
This commit is contained in:
parent
41e6fb961b
commit
a04b9ea053
1 changed files with 6 additions and 3 deletions
|
@ -455,7 +455,7 @@ class InputOutput:
|
||||||
self.placeholder = None
|
self.placeholder = None
|
||||||
|
|
||||||
self.interrupted = False
|
self.interrupted = False
|
||||||
if not multiline_input:
|
if not multiline_input and self.file_watcher:
|
||||||
self.file_watcher.start()
|
self.file_watcher.start()
|
||||||
|
|
||||||
line = self.prompt_session.prompt(
|
line = self.prompt_session.prompt(
|
||||||
|
@ -478,11 +478,14 @@ class InputOutput:
|
||||||
except EOFError:
|
except EOFError:
|
||||||
return ""
|
return ""
|
||||||
except Exception as err:
|
except Exception as err:
|
||||||
dump(err)
|
self.tool_error(str(err))
|
||||||
|
# print the traceback ai!
|
||||||
|
return ""
|
||||||
except UnicodeEncodeError as err:
|
except UnicodeEncodeError as err:
|
||||||
self.tool_error(str(err))
|
self.tool_error(str(err))
|
||||||
return ""
|
return ""
|
||||||
finally:
|
finally:
|
||||||
|
if self.file_watcher:
|
||||||
self.file_watcher.stop()
|
self.file_watcher.stop()
|
||||||
|
|
||||||
if line.strip("\r\n") and not multiline_input:
|
if line.strip("\r\n") and not multiline_input:
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue