mirror of
https://github.com/Aider-AI/aider.git
synced 2025-05-29 16:54:59 +00:00
feat: Skip scanning files larger than 1MB for AI comments
This commit is contained in:
parent
22f140ac05
commit
e743394537
1 changed files with 4 additions and 0 deletions
|
@ -104,6 +104,10 @@ class FileWatcher:
|
|||
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
|
||||
|
||||
# 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