mirror of
https://github.com/Aider-AI/aider.git
synced 2025-05-31 17:55:01 +00:00
feat: Print changed file path and check before reading content
This commit is contained in:
parent
df1a0c5b8d
commit
591d294052
1 changed files with 4 additions and 4 deletions
|
@ -96,20 +96,20 @@ class FileWatcher:
|
|||
|
||||
rel_path = path_abs.relative_to(self.root)
|
||||
if self.verbose:
|
||||
dump(rel_path)
|
||||
print("Changed", rel_path)
|
||||
|
||||
if self.gitignore_spec and self.gitignore_spec.match_file(
|
||||
rel_path.as_posix() + ("/" if path_abs.is_dir() else "")
|
||||
):
|
||||
return False
|
||||
|
||||
if self.verbose:
|
||||
dump("ok", rel_path)
|
||||
|
||||
# Check file size before reading content
|
||||
if path_abs.is_file() and path_abs.stat().st_size > 1 * 1024 * 1024: # 1MB limit
|
||||
return False
|
||||
|
||||
if self.verbose:
|
||||
print("Checking", rel_path)
|
||||
|
||||
# Check if file contains AI markers
|
||||
try:
|
||||
comments, _, _ = self.get_ai_comments(str(path_abs))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue